Viz.: Your original posting at:
After reading your treatise above, I decided to “take a whack” at getting some kind of reasonable calibration for Charlie.
My “test track” is an uneven wooden floor in my living room. Since the GoPiGo wheels are sufficiently “soft” and “sticky”, (get decent traction), I figured a wooden floor would be best.
Unlike Carl, my battery pack is in the back as I have other ideas for the top - like displays or other sensors, etc. I am also still using the “stock” metal ball since I didn’t have a chance to get the nice plastic one like you have.
Objectives:
Using the GoPiGo3 control panel:
-
Measure out an approximate 2 meter length. (I used my folding carpenter’s ruler) and calibrate Charlie to, (at least reasonably), accurately pace off the two meters. Obviously the closer the better and the more repeatable the better.
-
Using a thin crack on the floor as a reference mark, calibrate Charlie to make 360’s that return the rear castor to sit on the thin crack, ideally returning to the same spot after five or six revolutions.
Challenges: (Potential sources of error)
-
The floor is NOT smooth.
The individual floor-boards, being “utility grade” pine, have developed a significant amount of “bow” across their width, in some cases being a significant fraction of a millimeter, if not more. -
Because the floor is not smooth, getting Charlie to drive in a repeatable straight line is not trivial; perhaps not even possible, despite my best efforts. (There is always a certain amount of “yaw”, left or right, of the intended path.)
- I for one, want to know how you accurately align Carl along a straight line.
- I for one, want to know how you accurately align Carl along a straight line.
-
I’m still using the metal ball caster instead of the nice plastic one you have.
-
I’m eyeballing things like “center of robot”, “alignment on the crack” that is my reference line for linear travel, along with the alignment of Charlie’s bumper with the beginning of the folding ruler.
-
Since I’m using the GoPiGo3 control panel, I only get “two” degrees of freedom - a straight line and a right-hand spin.
Setup:
-
I had lost one of the two wheel-spacers when I was working with Charlie a while back. I took two out of the new bag of spare kit I bought and replaced the one that was left - and was about 2mm thick, with two that were about 1mm thick. This way I hoped to get reasonably constant and accurate wheel spacing.
-
I discovered that sensor #3 on the bottom of the line-follower board was as close to the center of the bot as I could eyeball it.
-
Since I knew MY calibration constants were WAY off, I started with yours as a reference point.
Calibration Methodology:
-
Straight line:
- Align Charlie as accurately on the reference line, (crack), as possible.
- Make a few test runs - some of which yaw to the left, some to the right, trying to minimize the deviation from a straight line. (I never really was able to solve that problem.)
- Correct the “wheel diameter” by a relatively large jump and repeat until Charlie goes beyond the end of the ruler. (He was always coming up short before.)
- Using the highly technically calibrated method of “split the difference”, I attempted to zero-in on the end of the ruler.
- When I reached the point where the error in yaw was significantly greater than the error in line, I called it “good enough” for now. Hopefully I’ll find a better floor and can figure out how to make Charlie run a repeatable line that I can accurately measure.
-
360 degree spin:
- Find a place on the floor, maybe a little bit bigger than Charlie, that’s not unreasonably warped. This really doesn’t exist, but I tried. . . .
- As close as I could eyeball, I centered Charlie on the crack, with his rear caster sitting directly on it.
- Using the GoPiGo3 control panel, I executed 360 spins, varying the wheel spacing by relatively large jumps until he began crossing the line - going past 360.
- Again, using the very heavily computationally intensive method of “split the difference”, I reduced the angular error to the point that after five or six revolutions, the caster would return to its point on the line.
Results:
I’m not going to try to “map the world” with Charlie’s current calibration, but it should dramatically reduce the error in line, and especially the angular error, that I’ve been seeing with Charlie.
My eventual calibration constants became:
- Wheel Diameter: 64.6
- Wheel Spacing: 120.5
I didn’t try for anything better than 0.1 increment accuracy since there are still too many things working against me
Stretch Goal:
Find a way to incorporate these updated calibration constants into DexterOS so that my, and my granddaughters, blockly programs make reasonably accurate turns.
Any ideas on how to improve this?
Thanks!