I’ve lamented the simplicity of the base GoPiGo3 sensor suite before, and again the lack of a bumper and a few obstacle sensors has complicated my life. When I add a set of asynchronous state machines to control my robot’s stimulus/response behavior to the lack of stimulus sensors, I am nearly going crazy.
To simulate obstacle sensors, I am panning the distance sensor quickly left and right looking for nearby obstacles.
To simulate a bumper, I interpret a “really, really close obstacle” as a bump from that direction.
The first problem I’m having - “avoid left obstacle by commanding a clockwise rotation but robot turns counter-clockwise” has to be a logic issue that more logging will elucidate.
The bigger problem is that the distance sensor, mounted above the GoPiGo3 top chassis and pointed horizontally forward, does not see low obstacles like office chair legs and wheels.
Being stubborn as I am about adding hardware solutions when more free software might due, I really would like to use the GoPiGo3 get_motor_status() function. It has an “Overloaded” status when the actual motor speed is less than the commanded motor speed and the applied power is at or over 100%.
Theoretically, If the GoPiGo3 is stopped by an unseen obstacle this flag should say “hey I’m pushing with all my might but the wheels are not turning, or are not turning as fast as I am commanding”. Indeed it does sometimes, but not always, and it also comes on when the bot is first ramping up to a commanded speed.
I seems like I need to train a neural net to give me a reliable bumper from this “GoPiGo3 sensor” (like that is really going to happen…)