Hi Folks
So I am a complete newbie to robotics and just got the assembled Zumo 32u4 (https://www.pololu.com/product/3125) recently with 50:1 microgears (51.45). I think the microgears used in the assembly is the ones in https://www.pololu.com/product/3039.
I am trying to see how I can calculate the distance using encoders.
is the below correct ?
Distance traveled = (# of counts) * Wheel rotations * circumference
where:
.# of counts - is retrieved from calling the getCountsAndResetLeft from the encoder (https://pololu.github.io/zumo-32u4-arduino-library/class_zumo32_u4_encoders.html).
circumference: I think the sprocket’s diameter is 35 mm in diameter (https://www.pololu.com/file/0J1360/sprocket-set-for-zumo-chassis-dimensions.pdf), so
circumference = pi * diameter
= pi * 35mm
= 109.95574287
wheel rotations = (Degrees turned / 360)
= (Encoder ticks / 360)
= 51.45* 12 / 360
= 1.715 counts / revolution
This is from where there is a set number of pulses that the encoders shoot out every revolution. According to the manual (pg 14 in http://www.zigobot.com/images/stories/Produit/Z3125_Zumo-32u4-robot-kit/zumo_32u4_robot.pdf), I should multiply 12 * 51.45 = 617.4 Counts per revolution.
So:
Distance traveled = (# of counts) * Wheel Rotations * circumference
Distance traveled = (# of counts) * (Encoder ticks / 360) * circumference
Distance traveled = (# of counts) * (Encoder ticks / 360) * pi * diameter
Distance traveled = (# of counts) * 1.715 * pi * 35mm
Distance traveled = (# of counts) * 1.715 * pi * 35mm
Distance traveled = (# of counts) * 188.574 099mm
.# of counts = Distance traveled / 188.574 099mm
Is the above correct ?
Thanks
Toqeer