ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to calculate velocity for a tracked robot

asked 2016-03-10 04:58:24 -0500

Marcus Barnet gravatar image

updated 2016-03-10 04:58:51 -0500

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..

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-03-11 04:29:49 -0500

Humpelstilzchen gravatar image

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.

edit flag offensive delete link more

Comments

Thank you for your support and help! My total circumference is 260 cm, so I'm using this formula to calculate the traveled distance: Dist = (Enc_ticks/360) * Circ For the velocity V = S/T, how can I calculate the time? Can you suggest me any solution, please?

Marcus Barnet gravatar image Marcus Barnet  ( 2016-03-11 06:38:35 -0500 )edit

Sorry I don't think I understood the question on how to calculate the time.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2016-03-11 09:39:22 -0500 )edit

I mean: in order to calculate the velocity, I need to use the equation: V = S/T where [S = (Enc_ticks/360) * Circ], but how can I calculate the time? Is there any specific function in ROS which allows me to calculate time or do I have to use a timer?

Marcus Barnet gravatar image Marcus Barnet  ( 2016-03-12 10:00:18 -0500 )edit
1

Take a look at the Navigation/Odometry tutorial on how to use ros::Time for this.

Humpelstilzchen gravatar image Humpelstilzchen  ( 2016-03-12 14:02:40 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2016-03-10 04:58:24 -0500

Seen: 2,415 times

Last updated: Mar 11 '16