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

Why is there a Twist in Odometry message

asked 2014-03-19 06:07:14 -0600

Maya gravatar image

Hello,

Everything basically is in the title. I've been here and I know it's position and speed of the robot. But I'm wondering why you need the speed in the Odometry as it's going to be the exact same thing as the cmd_vel topic.

For example if I'm doing a motor driver taking a Twist as input, should I return the exact same Twist in the /Odometry message afterward ? It seems rather useless to me and I feel like I'm missing something but I don't know what.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
4

answered 2014-03-19 06:47:39 -0600

The Twist you send on the "cmd_vel" topic is the desired motion you command your robot to perform. The Twist in the nav_msgs/Odometry message you get back is the measured/estimated motion that the robot performed. In an ideal world (with perfect controllers and sensing), these would be the same, but that world doesn´t exist ;)

edit flag offensive delete link more

Comments

So the driver should be able to return the actual speed of the motor. But wouldn't that be implied by the odometry?

Maya gravatar image Maya  ( 2014-03-19 07:14:01 -0600 )edit

In many applications yes, but getting the position of the robot at a given timestamp is only redundant with velocity if the latter doesn´t change between samples.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-03-19 21:33:49 -0600 )edit

I'm sorry I don't get it. What should not change between samples ?

Maya gravatar image Maya  ( 2014-03-19 21:47:34 -0600 )edit
1

If the velocity of the robot does not change over time, the position data is redundant with velocity data (you can get one from the other). If velocity changes over time, it is not redundant, because a given (odometry) position for a timestamp could have been reached with infinitely many velocity profiles. In that case, the additional Twist information is not redundant.

Stefan Kohlbrecher gravatar image Stefan Kohlbrecher  ( 2014-03-20 00:47:39 -0600 )edit

Haaaa I get it ! Thanks a lot for the explanation !

Maya gravatar image Maya  ( 2014-03-20 01:02:46 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2014-03-19 06:07:14 -0600

Seen: 3,543 times

Last updated: Mar 19 '14