Drive_cm( xx,True) never returned


Just when I thought Carl was really catching onto this docking thing!

After 38 successful undock - dock cycles Carl became “incommunicado.” His last words were “Backing onto dock”, and the ctrl-c interrupt stated:

File “./”, line 374, in dock
egpg.drive_cm( backingDistanceInCM, True)
File “build/bdist.linux-armv7l/egg/”, line 245, in drive_cm

I’m going to try moving the docking approach point a millimeter further out to see if I can get more reliable return on the blocking command. I’m hoping I can avoid the bunch of work to write my own blocking drive_cm(distance, blocking, timeout).


The timeout is something we have on our list of things to do, but I can’t give you a timeline yet.

If you end up writing one, we would appreciate a PR. Extra help is always appreciated!


1 Like

Re drive_cm() with timeout: Perhaps if things had not gone as well as they did.

I added a silly millimeter to the dock staging distance, and have not run into this condition again. I’m up to 30 in a row successful test dockings headed into another “leave Carl running overnight” test.

The major reliability improvement came from making a rear castor guide, with a little reliability improvement through software - tuning the backing distance calculation. I only have 4-5 millimeters distance tolerance, and maybe +/- 3 degrees angle tolerance so I am actually very impressed with the GoPiGo3 system repeatability and accuracy.

The Distance Sensor variance is around 3%, and the measurement error is 3% at close distances. I average out the variance with multiple readings, and run the average through a distance measurement error linear equation so that I can measure the +/- 6 millimeter variance to within 1mm when positioning Carl in front of the dock. Factoring the measured position into the backing distance calculation with some more magic allows Carl to back onto the dock with a precision usually only possible with stepper motors and sticky wheels on a heavy platform.

My premiere design principles are “Plan for errors” and use the basic platform to the fullest before using more sensing. Humans don’t measure where we are exactly, and somehow we make it from the bed to the bathroom with mostly closed eyes. My Carl / GoPiGo3 is more capable in some aspects; I just have to figure out how to make him smart enough to use his capabilities to the fullest.

1 Like