0
$\begingroup$

Rosanswers logo

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

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Original comments

Comment by Marcus Barnet on 2016-03-11:
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?

Comment by Humpelstilzchen on 2016-03-11:
Sorry I don't think I understood the question on how to calculate the time.

Comment by Marcus Barnet on 2016-03-12:
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?

Comment by Humpelstilzchen on 2016-03-12:
Take a look at the Navigation/Odometry tutorial on how to use ros::Time for this.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.