@jimrh Not by looking at the motor, but @cleoqc has been busy creating a multi-faceted approach to this issue:
- added ticks to the gpg_config.json handling
- if no ticks in config file, compare GoPiGo3 serial number against list of many “new GoPiGo3”,
if in list set ticks=16, else =6
- A new desktop GUI calibration (and maybe GPGOS browser home?) app checks 1 and 2 above,
then if needed tries ticks=6 first and if the bot only traveled 1/3-1/2 the calibrated distance, the app suggests user press “retry” and it tries ticks=16.
If you want to manually check a serial number:
- python /home/pi/Dexter/GoPiGo3/Software/Python/Examples/Read_Info.py
- see if the serial number appears in the pickle file viewable on github (link above)
There may be some “rogue” GoPiGo3, with uncertainty with respect to encoder ticks, that the “retry if way off” feature will return to civility.
@cleoqc’s solution and MR’s attention to the problem really show the “new owners” are committed to supporting our favorite little bot!
Actually, there is but not just looking:
- place a mark on the encoder disk at one of the “detectors”. I used a silver Sharpie.
- Launch “python /home/pi/Dexter/GoPiGo3/Software/Python/Examples/Motor_Encoder.py”
- Note the right and left encoder values
- Manually turn the encoder disk with a light touch exactly one revolution
(Do not try to do this by turning the robot’s wheel/tires)
- Note the new value of the rotated encoder
- The number of ENCODER_TICKS_PER_ROTATION is twice the difference in encoder value
Because the encoder API divides the encoder ticks by two.
If you see a difference of 8 for one revolution of the encoder disk, you have a “new” GoPiGo3 that needs ENCODER_TICKS_PER_ROTATION = 16 (and results in MOTOR_TICKS_PER_DEGREE = 5.3333333333)
ENCODER_TICKS_PER_ROTATION = 16
MOTOR_TICKS_PER_DEGREE = ((MOTOR_GEAR_RATIO * ENCODER_TICKS_PER_ROTATION) / 360.0) # encoder ticks per output shaft rotation degree