
Mongoliensis special page
Here are some Python programs and libraries you can download or look at.
Useful programs:| Date | Name | Link | Comments |
|---|---|---|---|
| 16/5/2023 | may16.py | Download View |
Python wall following code |
| 21/5/2023 | may21.py | Download View |
Another update |
| 24/5/2023 | may23.py | Download View |
Tuning 1-3 updated |
| 17/6/2023 | june17C4PO.py | Download View |
Extra TVR commands 4,5,6 + Tuning |
| 19/6/2023 | june19C4PO.py | Download View |
Start the run with the Button, after hand wave |
| solver | faster_maze_solver_new.py | Download View |
Malcolm's solver. (Object oriented) |
| movementV6 | movementV6.py | Download View |
Toby's maze movements. |
Log in here to upload files Link to see uploaded files
Diary
November 14th: Drag racer
"BackToDrag" was tested withdifferent speeds, proportions, and derivative. Using Akili's v2 program
A stable and quick group of settings was found at switch position 0.
A fast start was attempted to last 250 Loopcounts. This failed because the speed switch that sets myspeed to
either normal, or normal-15 depending on whether it has fallen off or not, was over-riding the speed setting.
See AkiliV2a.txt for explanation.
November 7th: Update
R4D4 is now called TROODON.
The human interface testTVR25 was used to test the simple fwd routine..
It doesn't detect walls missing (for steering) and doesn't stop on distance. (reason unknown)
November 6th:
Here are my notes on movementV7Better.py:
You need a hierarchy of program files.
the lower down ones do simple things, but don't make many decisions, they talk with the hardware.
The higher one make tactical decisions, leaving the detail to the lower ones.
they import the lower ones that they need.
MovementV7Better.py
===================
8 TROODON is imported by movement, is itself is imported by TROODON!! this is infinite recursion.
which one is the boss?
20 lmotor = Motor("L", 1.14) tuning for different robots will be different put this as a tuning item at the top
26 explain what Intenb does and why it's needed
45 read_walls_avg() readwalls takes 15ms this takes twice that long
49 function def read_walls_avg() is already defined in TROODON.
Calculation of error : " error = l - r " doesn't take into account the difference between RTarget and LTarget.
- Also it doesn't allow for absent walls. (Which do occur in the maze)
July 16t
October 14th: New page on this website
July 16th
PicOne maze solver
July 11th Understanding R3D3 code.
I am compiling a User Guide document that I will update here.
see the 1st lines of Sequencer.py:
#SW1: 1 up = wall_follow | 0 down = maze solver
#SW2: 1 up = Bluetooth Frequency | 0 down = TV Frequency
#SW3: 1 up = human_contol() | 0 down = maze()
#SW4: 1 up = start with remote/Bluetooth | 0 down = start with hand
Up = towards front Down = towards battery
June 26th Maze solving prep.
We will need routines for moving between cells under controlof a solver (human or programmer)
see movements See also sequencer.py which is the main program file.
June 21st.22nd Minos meet at StAlbans
see the results at https://ukmars.org/2025/06/minos-2025-contest-results/
Plans for the future:
- To write some "Movement" code that can be run by a given "Solver" program to do maze-solving.
- To log the runs of the current code to
a) show that they are consistent over several runs
b) know the length of a corrdors so that when we start one, we know when to slow down
c) use encoders to measure (or prevent) the kink that comes from detecting loss of left wall.
- we could do this to a file, or by bluetooth.
June 19th
The button can now be used to start the run, after the handwave,
a TV remote is not needed to start.
See the Minos schedule
June 17th
Extra TVR commands.
4 does one movement according to walls. 5 and 6 does 2 and 3 movements.
FT value for ending corridor depends on tuning. "Fstp"
June 7th
Some thoughts on the robot.
Its unusual features include:
- Display screen, TV remote, 4-way switches. These help the operator control and understand what's going on.
- Pi pico controller gives us Python language coding, and a file store to save data.
- an SSD 1306 OLED display to see what's going on.
- Peter Hinch's micropthon IR device driver for TV Remote reception.
- We can attach Bluetooth, but don't make use of it yet.
- We sometimes use a long (3 metres) USB cable to reprogram.
We haven't yet
- used the wheel encoders (+ screen) to adjust parameters,
- used holding the button down while you are switching it on.
Programming specials:
- We detect all walls missing, to be the operator lifting the robot out of the maze, and ending the run.
- We can run single manoeuvres (left turn,right spin, corridor), under control of the TV remote. This helps tuning.
The Future.
- One day, we will record the lengths of the corridors, so we know when to speed up in later runs.
May 23rd
- Tuning of speeds 1-3 now done. Video is available of speed 3
- the use of left wall to correct after a right spin was removed.
Logging (both to file and Bluetooth) is the next step
May 25tth
- R4D4 will run may23 code, but needed the spin right constant (TOBY)reducing. Different size wheels??
--------------------------------------------------------------------------------------------------------------------------------------------------------------------
May 21st
- Changes have been made to speed up tuning for the Summer meeting. see below
Saved Calibration
1 SW4 is no longer part of SVVAL it is now only used to enable stored calib values
2 tune() function now prints number to serial port. It tune(0) now sets parameters speed = 8000
Tune() stops and sleeps 0.4 second for displaying numbers THIS WILL AFFECT RUNNING
3 SW4 doesn't clear the log
4 screen shows if saved calibration values are used
5 Right spin uses faster right wheel reverse speed
6 Calibrate() function used.
It returns saved values if SW4 is on, otherwise it saves real readings after measuring (if SW4 is off)
7 Screen message when waiting for TVR to start button. (Not suitable for competition)
8 Message about button after lifting is improved
9 TVR "1","2","3" accepted after lift to change tuning
More tuning needed..
Corridor tuning:
speed,mult,Kd FT fraction for stop, LT fraction for stop
Left turn tuning:
Right kink, Forward movement, left/right speed ratios, left sensor stop level.
Right spin tuning:
Spin speeds r &l ,encoder count to stop,encoder count to slow down
see here to download latest version may21.py
--------------------------------------------------------------------------------------------------------------------------------------------
May 16th:
- We got rid of tuning option zero. The zero button on the TV remote is for stopping.
- We got rid of the BOH() subroutine, and made Corridor run faster if the global variable "moneyForNothing_Remastered1996_" was set to True
(it is now set to true by TV remote "*")
- got Option 0 running reasonably OK:
- tightened left turn LSPD = 0.7 (was 1)
- forward movement before left turn increased velociraptor_mongoliensis = 80 (was 70)
- removed right kink before forward movement manospondylus_gigas = 0 (was 10)
- Option 1 improved but not OK yet
We had to put white paper on some maze walls to get it to run OK.
© Copyright St Albans Robots