Effect of wheel slip on position

By | May 31, 2022

Suppose your micromouse is travelling in the maze at a steady speed. If there are breaks in the walls to left or right, and the mouse is correctly positioned you would expect the breaks to be seen every 180mm for a classic mouse.

It seems obvious to use the detected wall breaks to correct for any errors in forward motion and ensure the mouse is compensating for any forward errors.

But, what if the mouse is travelling very quickly and/or accelerating hard? Acceleration in particular will always be associated with some amount of wheel slip. The harder you accelerate, the worse it will be. Because of that slip the robot will think it has traveled further than it actually has. Braking is the same but now the robot will have slipped further than it thinks it has moved. So long as the slip is the same for both acceleration and braking, these two effects will tend to cancel each other out in a simple straight run. Things get more complicated if you are starting from rest and accelerating up to turning speed as you approach a corner. Now the robot will not have moved as far as it has calculated and you must look for a wall break to set the position of the turn more accurately.

Let’s have a look at how much the slip can affect things. Here is a graph showing the sensor record for a classic mouse moving down a passage of 8 cells. on the left is a continuous wall to keep the robot correctly oriented. On the right is a ‘comb’ – a series of perpendicular walls. The first and last cells have walls on both sides. Robot acceleration is about 10m/s/s and the maximum speed is 1m/s.

You can clearly see the right sensor (green) detecting the posts on the right. The magenta trace is a measure of the slope of the sensor trace. It can be used to detect the positions of the edges quite reliably. The robot has started with its back up against the wall so the sensor peaks are not on the 180mm grid but the distances between them are quite consistent at around 180mm. If the edge positions are tabluted for this run, this is what we get.

positiondelta
205205
383178
563180
747184
930183
1111181
1293182
1490197

The first delta is larger because of the starting position and the last one is affected by the wall in the final cell. Between that, the sensed lengths of the cells is pretty consistent and acceptably accurate. If you expected much better accuracy you are probably destined for a life of misery in your micromouse endeavours. Or, of course, you are much better at this than I am. Either seems likely.

Now, what if you accelerate to the half-way point and then brake for the rest of the way. This is what you might get:

You might notice from the left sensor trace that the robot is not quite so well aligned in this run. More importantly, the right sensor trace (green) shows the posts appearing significantly later than expected. Because the robot is moving much faster, the sensor slope (magenta) values are much bigger. Top speed in this run is nearly 4m/s. Have a look at the apparent positions of the detected edges and the distance between them.

positiondelta
228228
427199
628201
821193
994173
1160166
1319159
1487168

The observed cell lengths during acceleration are all greater than 180mm while those observed during braking are all smaller than 180mm. Because braking and acceleration are symmetrical at about 10m/s/s, the robot gains during braking what it loses during acceleration and you can see that the final edge in both cases is detected at about the same position.

It is up to you how you compensate for these changes in observed position due to slip. If you are confident that the effect will even out over a run, you might choose to ignore it except at the ends. If you are accelerating harder than you brake, you will always end up short of the intended position. Whatever you do, it is useful to note that every turn will have a wall/post break, or falling edge, just before it and that is the one that is most important in deciding where the turn must start.

Efficient rotation of a list in Python

By | April 10, 2020

While working on a Python application to do real time plotting of data, I needed a way to update the data. The data arrives over the serial line and can be received at quite a high rate. – easily a few thousand elements per second. The basic idea was to have the data stored in a list. When a new item arrives, the list must be shifted down one place and the new item placed at the end. Clearly, this should happen as quickly as possible.

Continue reading

2nd International Symposium on Micromouse

By | February 25, 2020

Call for Papers

The 2nd Micromouse Symposium 1st May 2020, Vila Real, Portugal, the 2nd International Symposium on Micromouse, will be held in Vila Real, Portugal, 1st May 2020. Industry experts, researchers and academics are expected to gather together to share ideas and experiences surrounding frontier technologies, breakthroughs, innovative solutions, research results, as well as initiatives related to the Micromouse Robotic Contest. Micromouse Symposium 2020 offers you a conference with wonderful experience in Vila Real.  

Submission of Papers

The working language of the conference is English. Prospective authors are requested to submit full papers (6 pages max) following the guidelines available on the conference website. Accepted papers will be included in Symposium open archive. Each accepted paper should be presented at the conference by one of the authors.  

Submission Schedule:
Submission of Full Papers: March 21, 2020
Acceptance notifications: April 4, 2020
Submission of Paper Final Version: Apr. 15, 2020
Early Bird Registration: April 18, 2020
Micromouse Symposium 2020: 1st May 2020

We look forward to welcoming you in Micromouse Symposium 2020 and wish you a fruitful and enjoyable stay in Vila Real, Portugal. 

General Chairs 
Antonio Valente (Portugal)
Salviano Soares (Portugal)

Micromouse in Mumbai

By | August 25, 2019

From Abinav Kumar: The Indian Institute of Technology, Bombay is regarded as one of the premier institutes in India for imparting education of one of its kind and to provide resources for the cutting edge technology recognized all over the world.

Techfest is IIT Bombay’s annual science and technology festival to promote technology, scientific thinking, and innovation and has surpassed 22 golden years of creating an unmatched aura year after year. It is well established as Asia’s Largest Science and Technology Festival patronized by UNESCO, UNICEF, STARTUP INDIA, DIGITAL INDIA, SAYEN and CEE with a footfall more than 175,000 people comprising mainly of the youth from across the nation and an outreach of over 2500 colleges across India and over 500 colleges overseas.

Techfest has proved to be a great success in attracting International countries like Australia, Singapore, Indonesia, Sweden, France, Brazil, Spain, Thailand, Sri Lanka, Nepal, Pakistan, Bangladesh as well as from Denmark, Egypt, Ethiopia, Russia, Syria, South Africa, and UAE in previous editions.

We are organizing International Micromouse Competition which will be held during 3rd-5th January, 2020. The total prize money of International Round is INR 175,000.

Below are some of the resources of Techfest, IIT Bombay which shall give you a clear picture of the festival. 

Lookback Brochure: Techfest Lookback Brochure
Problem Statement: International Micromouse Competition
Techfest Aftermovie: AftermovieTechfest Facebook Page

Micromouse contest in Egypt – an invitation

By | August 24, 2019

From Mohamed Orabi : “We are organizing a new micromouse competition during the IEEE Conference on Power Electronics and Renewable Energy, that will be hold during Oct. 23-25, 2019 in Aswan, Egypt
www.ieee-cpere.org

We would like to invite teams from world wide to participate. To encourage team, The conference will provide each team with free registrations and accommodation for two members.
Please share this information”
Conference Chair

Time taken to run a straight

By | June 29, 2019

Calculating the time needed to run a straight between two turns in the micromouse contest

When a micromouse robot is trying to determine the best path from start to goal, it is helpful to be able to calculate the amount of time it will take to run along the straight path that connects two turns. This is not an obviously simple calculation because there is the question of how fast the robot is travelling at the start and end of the straight, the available acceleration and the maximum speed limit.

Some simplifying assumptions will help a lot. First, assume that the start and end speed for the straight is the same That is, all turns are made at the same speed. Second, assume that the robot is always either accelerating or decelerating. That is, there is no top speed limit. For many actual straight section in the maze, that is likely to be the case. Finally, assume that the acceleration and deceleration is the same so that the straight run is symmetrical.

Orthogonal moves

The classical equations of motion give an expression for the time taken to move by a distance, s, if the acceleration, a, and start speed, u, are known (suvat-rearranged)

(1)   \[t = {1 \over a }({\sqrt{2as + u^2}-u)\]

Considering orthogonal moves first, the distance, s, can be expressed as some multiple, n, of the length of one cell, x.

(2)   \[s = nx\]

Substitute into (1) to get:

(3)   \[t = {1 \over a }({\sqrt{2anx + u^2}-u)\]

It is now convenient to specify the start speed, u, as some constant, k, times the distance through one cell.

    \[u = kx.mm/s\]

and the acceleration, a, as

    \[a = k^2x.mm/s/s\]

For example, for k = 10, a classic micromouse might be able to turn at 1800mm/s and accelerate at 18,000 mm/s/s.

Substituting into (2):

(4)   \[t = {1 \over k^2x }({\sqrt{2k^2x^2n + k^2x^2}-kx)\]

)

    \[t = {1 \over k^2x }(kx{\sqrt{2n + 1}-kx)\tag5}\]

(6)   \[t = {1 \over k }({\sqrt{2n + 1}-1)\]

Equation 6 describes the time taken to accelerate to some top speed over n cells. The micromouse robot will accelerate for half that number of cells and then brake for the remaining half. Split the motion into two parts:

    \[t = {1 \over k }(({\sqrt{n + 1}-1)+{\sqrt{n + 1}-1))\]

(7)   \[t = {2 \over k }({\sqrt{n + 1}-1)\]

This result is easily pre-calculated in a table of ({\sqrt{n + 1}-1) for suitable values of n and so it will be easy to determine the time needed to run any straight or arbitrary length with a simple multiply. Note that this only works because of the common factor, k, in the speed and acceleration.

Diagonals

For diagonal movements, each cell traversed is x/\sqrt{2} mm long and so the time is calculated from:

(8)   \[t = {2 \over k }({\sqrt{{n \over {\sqrt{2}}} + 1}-1)\]

Note that you cannot simply multiply the result from equation (7) by 1/\sqrt{2}.

UK Micromouse at Techfest 2019

By | June 3, 2019

The UK Micromouse contest took place on Jun 1st at the Techfest 2019 event. I am happy to report that, from a personal perspective, it was almost entirely without drama.

[update: full results are here: https://ukmars.org/index.php/TechFest_2019 ]

There was a worrisome moment when the program would not build on the new laptop but that was just unfamiliarity with the process having done it differently for a good few years.

The maze had quite a long path – I took the magenta route which was a little over 14m long.

UK Micromouse 2019 – final maze.

And my final time was 6.37 seconds – an average of about 2.2m/s. It felt like it should have been quicker but there were no long straights. The top speed reached was only 3.9 m/s. 

The first speed run took about 8.2 seconds – I don’t have the detailed timing data yet. The last run was performed at the maximum available speed setting and there were no visible errors. The penultimate run clipped a post. I heard it but saw no sign of disturbance.

There were 33 turns and 17 straights in the path. The search took a while and the battery voltage was down to 7.5 Volts at the start of the first fast run and just 7.14 Volts at the start of the last fast run. That will have limited the top speed a little.

We did not have a huge entry list this year but here are the fastest times:

UK Micromouse 2019 final times.

Schools Micromouse at Techfest 2019

By | June 2, 2019

On Saturday 1st June the 2019 National Schools and Colleges Micromouse Competition was held by the UKMARS organisation and hosted by Birmingham City University as part of the annual City Centre Campus TechFest event.

As usual three events were run: The Drag Race – a 6 metre sprint following a white line; the Line Follower – a circuit of straights and curves of varying radii, again following a white line and the Wall Follower – finding a route from the start cell to a target cell in a maze by following the left-hand wall.

A total of 20 mice were entered.  Many of them were capable of, with a change of sensors and wheels, competing in all three events. There were kit mice and scratch built mice on show.  The lightest weighed 97 grams and the heaviest 330 grams.

New to the competition this year were Kesgrave High School, Ipswich who had been working on their designs since October 2018.  They are an after-school club formed by retired teachers Simon Clapson and John Fisher, both stalwarts of Micromouse who previously enjoyed great success in this competition with their former school.  Schools are desperately keen to get STEM ambassadors to run robotics clubs but are generally very inflexible regarding using school computers to run suitable programming software. John and Simon were very limited in the choice of microprocessor for their students’ robots and had to abandon their tried and tested Picaxe programs, eventually settling for Crumble, an icon based software system similar to Scratch.

Several clubs and schools from Buckinghamshire were again represented and there was one entry from a primary school pupil, Maxwell Bayliss from Pershore Junior.  Unusually there were four entrants who were veterans of the 2018 competition making a return appearance: Kaviyashree Damodaran, Nathesa Sivakumaran, Lahari Ballina and Bethan Edwards.

Bethan Edwards was the stand-out performer on the day.  Her mouse “Jerry” came first in the Line Follower (beating her brother Owain into second place by 0.05 seconds), second in the Wall Follower and third in the Drag Race.

Medals were on offer for any competitor who completed a successful timed run in each of the three events.  There were also trophies for 1st, 2nd and 3rd placed mice in each event.  Grateful thanks are due to Duncan Louttit of Swallow Systems who donated all the Schools awards and was Chief Judge on the day.  Thanks are also due to Chris Evans and the BCU team and Ian Butterworth, Chairman of UKMARS for providing us with excellent facilities.  Last, but by no means least, we would like to thank the parents and teachers who supported the competitors and saw their charges fully focused and highly competitive perhaps for the first time.

Summary of Results

Lightest Mouse:  97.12g “Jerry”, Bethan Edwards, Wycombe Warriors.

Best Recorded Mouse: “Thanos”, Lekha Ballina, Wycombe High School.

Judges Award: “Wally”, Kyle Baker, Kesgrave High School, Ipswich.

Kyle wrote the program for his mouse in just three after school sessions.  His entry completed the wall follower event successfully – an outstanding achievement.

DRAG RACE

1st Place: “Sivan”, Nathesa Sivakumaran, Beaconsfield High. (2.304s)

2nd Place: “Mozzarella”, Kaviyashree Damodaran, Beaconsfield High. (2.419s)

3rd Place: “Jerry”, Bethan Edwards, Wycombe Warriors. (2.462s)

LINE FOLLOWER

1st Place: “Jerry”, Bethan Edwards, Wycombe Warriors. (10.411s)

2nd Place: “Idea”, Owain Edwards, Wycombe Warriors. (10.461s)

3rd Place: “Sivan”, Nathesa Sivakumaran, Beaconsfield High. (10.798s)

WALL FOLLOWER

1st Place: “Human Being”, Abigail Robinson, Wycombe High School. (34.06s)

2nd Place: “Jerry”, Bethan Edwards, Wycombe Warriors. (34.50s)

3rd Place: “Maze Finder”, Maanya Shankar, Wycombe High School. (34.85s)