False Positives and Line Following

 I've finally got around to laying out the Garden Path challenge and tested it with an unmodified line follower code used (supposed to be used) in Lava Plava. Needless to say, it kinda crashed and burned. It's not quite as bad as I expected but which fork the robot took was more by luck than any programming on our part.

I set up a Pi4 and camera pointing at my monitor with a "rolling road" displaying the computers view to determine how best to handle the junctions the robot will come across. The frame rate is nowhere near what we achieve on the robot, as the image is being streamed across SSH. However, for the purposes of recognising the junction patterns, it should be ok. The red border shows the detected line and the blue line shows the heading the robot needs to turn to to get the line back in the centre of view. The red figures indicate motor overall power (g) and, left(l) and right(r) motor power between 0 and 1. Turning right reduces the motor on the right keeping the left motor at 100%. The amount of reduction depends on the distance of the blue line from the centre.

For a straight line, we can snapshot it pretty reasonably.



Although when approaching a junction,


The robot takes an image of the whole junction. 


This will not trouble the robot as the general advance is forward. However, if we were supposed to turn left, then it would be an issue.  



Now the robot will have a problem as the weighting is to go left and then the short stub will get the robot's attention.

The next step is to either stop and wait for an audio command, signpost each junction or attempt to decode each junction by giving each an id.

To be continued...






Comments

Popular posts from this blog

Add a timer to your video submissions

Happy New Year (and we hope its better than the last)

Into the unknown with Voice Commands.