# How to calculate velocity for a tracked robot

Hi to all,

I've built my own skid-steering tracked robot and I wrote a simple ROS node which allows me to control it by using my keyboard. Since I'm using encoders for both motors, I would like to be able to calculate the tracks velocity and displacement so I can publish these values as ROS topics.

The problem is that I'm not able to find the correct formula to use, can you help me please?

The total tracks length is 275 cm. After a full driving wheel rotation, the rubber tracks displacement is 125 cm. The tracks rubber footprint is 85 cm. Encoder pulses for a full driving wheel rotations are 200.000. Max output driving wheel RPMs are 51, but I think this is not relevant.

What kind of formula do I have to use if I want to calculate velocity and displacement for each track?

I know I should use the classical formula V = S / T and S = V x T but I can't understand how to use these relations for my robot since it uses tracks instead of wheels. Is it possible to calculate the overall angular velocity for the robot?

I hope you can help me..

Originally posted by Marcus Barnet on ROS Answers with karma: 287 on 2016-03-10

Post score: 0

For the translation part tracks are identical to wheels, the track length does not matter here, because distance traveled is identical to the wheel inside the track + the track thickness.

So for the translation you just calculate the distance traveled using the Circumference of the wheel with r = wheel radius + track thinkness. For the velocity you already got the right formula. If you are still unsure you could just drive the robot 1m or 10m and count the pulses on each track and divide that by the distance traveled.

Now the problem is the rotation part. Tracks have the bad attribute to slip a lot while turning. (Try to turn your robot by hand without slipping on the ground to understand it), possible solutions include:

• Turn the robot by 360° and count the pulses. Problem is that this value is different for each underground

• Get the rotation from another sensor, like an IMU.

Originally posted by Humpelstilzchen with karma: 1504 on 2016-03-11

This answer was ACCEPTED on the original site

Post score: 2