Ask Your Question
2

Why is there a Twist in Odometry message

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

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
2

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

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 imageMaya ( 2014-03-19 07:14:01 -0500 )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 imageStefan Kohlbrecher ( 2014-03-19 21:33:49 -0500 )edit

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

Maya gravatar imageMaya ( 2014-03-19 21:47:34 -0500 )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 imageStefan Kohlbrecher ( 2014-03-20 00:47:39 -0500 )edit

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

Maya gravatar imageMaya ( 2014-03-20 01:02:46 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 1,151 times

Last updated: Mar 19 '14