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

exact rotational speed of a wheel

asked 2018-11-13 07:07:25 -0600

girpon gravatar image

hello there,

i was wondering if there is a way of calculating or extracting the exact rotational speed of each wheel of a jackal from ROS or Gazebo.

is there a topic containing this information? i need this to calculate how much slip is generated.

i dont know how to deduce this from a velocity command to lets say cmd_vel. as i dont know how this works when making turns.

greeting Girpon

edit retag flag offensive close merge delete

Comments

Are you trying to find out the actual speed of a physical or simulated wheel or the speed that it is expected to be moving at given a particular cmd_vel twist message?

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-11-13 10:14:30 -0600 )edit

actually i would like to know both, but i can get the actual wheel speed from gazebo by taking the speed provided by link_states and dividing it by the wheel radius of the jackal (includes slip). but i also want to know the simulated rotational speed of the wheel (without slip).

girpon gravatar image girpon  ( 2018-11-14 05:17:25 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-11-14 06:39:05 -0600

As you've said you can get the actual simulated wheel speed from gazebo using the information provided by joint_states. So that is half the problem solved, the next bit is a little more difficult.

You need to work out the rate at which the robot is actually moving and work out the rate at which a 'non-slipping' wheel would have to turn to produce the same motion. The different between these two wheel rates will tell you the slippage.

When you know the actual linear x velocity and rotational z velocity from gazebo you can work out the 'non-slipping' wheel rates as below:

double vr; // x velocity in m/s
double va; // z anglular velocity in rads/s

// calculate the left and right wheel speeds in rads/s
wheel_speed_left = (vr - va * wheel_separation_ / 2.0) / wheel_radius;
wheel_speed_right = (vr + va * wheel_separation_ / 2.0) / wheel_radius;

Now you're left with the final task of getting the actual robot position from Gazebo. This previous question covers this quite well, although it's giving you the absolute location not the movement rate, so you'll have to differentiate this yourself to get the rover velocity.

To summarise measuring the actual wheel rate is fairly easy from gazebo, but to work out the slippage you need to know how fast the robot body is actually moving in gazebo. From this actual movement rate you can work out the wheel speed as if they weren't slipping at all. The difference between the two will give you the slippage.

Hope this helps.

edit flag offensive delete link more

Comments

ahh this is really helpfull, altho i dont know what the wheel_radius is of the jackal, do you happen to know? or is this obtainable from gazebo?

girpon gravatar image girpon  ( 2018-11-14 06:43:30 -0600 )edit

It will be defined somewhere in the URD/SDF file for the Jackal.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2018-11-14 06:48:45 -0600 )edit

so now im wondering, shud i take link _states and divide speed by wheel radius. or does joint_states simply give me the rotational speed in rad/s, i cant find it concretely anywhere. also the position in joint_states is the position with respect to what? is 360 a full circle? or is it different? thx

girpon gravatar image girpon  ( 2018-11-15 06:09:50 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-11-13 07:07:25 -0600

Seen: 1,604 times

Last updated: Nov 14 '18