Closed CleoQc closed 5 years ago
Opinion: no change needed - Users wanting to fine tune their turns or distance need only set the values in the instantiation:
# if someone finds greater drive_cm() or turn_degrees() accuracy with alternate values
egpg = easygopigo3.EasyGoPiGo3(use_mutex = True)
wd = 64.5 #default is 65.0
wbw = 119.0 #default is 117
egpg.WHEEL_DIAMETER = wd
egpg.WHEEL_CIRCUMFERENCE = wd * pi
egpg.WHEEL_BASE_WIDTH = wbw
egpg.WHEEL_BASE_CIRCUMFERENCE = wbw * pi
Indeed, glad to see confirmation of our internal discussion. Anyone wishing for greater control will have to take this approach.
For discussion: We've had a few complaints lately that the 90 degrees turn isn't a real 90 degrees. Yesterday I picked a GPG3 that wasn't giving me a nice right angle turn. Turns out this particular one has a wheel base of 119mm and not 117. Fixing that got the right angle turn to behave. However, it implies re-installing the library in order to bring such a change. And that means each update would lose this change.
By exposing wheel_base_width in the instantiation call, we offer an extra choice to the user. The wheel base can be set programmatically. The previous method of editing gopigo3.py is still available.
Other possibility to explore, if we want: save the wheel base width somewhere on the SD card so that the user doesn't have to remember to pass it in the instantiation call, and it won't go away when the user does an update. Worth it, or not?