I have a robot with a differential drive, using an omedeter to infer its position.
I use standard equations:
WheelBase = 35.5cm;
WheelRadius = 5cm;
WheelCircumference = (WheelRadius * 2 * Math.PI);
WheelCircumferencePerEncoderClick = WheelCircumference / 360;
DistanceLeft = WheelCircumferencePerEncoderClick * EncoderCountLeft
DistanceRight = WheelCircumferencePerEncoderClick * EncoderCountRight
DistanceTravelled = (DistanceRight + DistanceLeft) / 2
AngleChange (Theta) = (DistanceRight - DistanceLeft) / WheelBase
My (DIY) chassis has a small feature where the wheels are displaced during the wheelbase (35.5 cm), since the left wheel is 6.39 mm (I am a software person, not a hardware person!) There are more “forwards”, than the right wheel. (Wheels are the middle of the robot.)
I am not sure how to calculate what I should add to my formulas in order to give me the correct values. This does not affect the robot, unless it happens on the spot, and my values go away, I think that causes it.
, , ... -.
? - ? , , , ( ).