The PID Linefollower code seems to work very well out of the box, but I wanted to speed up in straight sections of any linefollowing course. This video shows a low speed test where the max speed is set to a very sedate value, it is successfully detecting when it can ramp up the speed to more than double. The only problem it has is when it goes into a curve there is a braking effect and the robot tends to nosedive as it slows down. I might work on ramping down the speed to reduce that effect.
Or I could just set the speed up for a faster test as shown in this video, it speeds up even faster in the straight sections. It can’t double the speed in this case since that would drive the setting higher than 255 (the highest value that set_motors() expects to see); the value is limited to a “safe” value, ie, one that the robot can recover from when it has to slow down in some unknown curve ahead.
Obviously the 3pi gurus here will have no difficulty duplicating this effort, and might even integrate the concept into the curve handling code, ie, mild curves could ramp up or down to some mid level of increased speed. I will post a sanitized code sample soon, I don’t want to give all of my testing secrets away just in case someone from Las Vegas shows up at one of our robot club meetings and wants to do a Las Vegas style line follower competition.
By the way, if anyone knows how to get a cool sound clip such as “Wipe Out”, “Radar Love” or “Living in the USA” into C code for the 3pi please pass it along!