ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# Silly odometry question

Hi all,

I wanted to ask - if I publish a twist topic, are the velocities interpreted as intrinsic or extrinsic (by the navigation stack, for example).

I'll elaborate: Lets say i start at zero position with my robot, and turn 45 degrees right. Now I drive it 1 [m/s] forward (just for the sake of calculations). Should I be publishing the intrinsic ("robot coordinates") velocities, meaning Vx=1 and Vy=0, or should I be publishing the extrinsic ("world coordinates") velocities, meaning Vx=Vy=1/sqrt(2) ? I would go for the robot coordinates (saving Vy for holonomic robots), but had to ask for sure....

Many thanks, Steve

edit retag close merge delete

Sort by » oldest newest most voted

You get to specify what you mean within the message itself so that there is no ambiguity. Check out ROS REP 105, where some common coordinate frames and their meanings are discussed. What you are calling "robot coordinates" is called base_link, and "world coordinates" is called odom. Note that there are multiple extrinsic frames, with map and utm being the other common extrinsic frames in addition to odom.

The way that you specify which coordinate frame you are using is by setting the Header/frame_id field. It is then up to the nodes subscribing to your messages to correctly interpret the data. Very often, tf is used to transform data into the appropriate frame for the specific receiving node. If there is no Header/frame_id field (as is the case for the basic Twist message) then I have seen most subscribing nodes assume that the Twist data is in the base_link frame. If possible, it is nicer to use the TwistStamped or TwistWithCovarianceStamped variants of the message type for this reason.

For your specific question, I have mostly seen robot velocity measurements (from GPS, wheel encoders, Kalman filters, etc.) be published and interpreted as being in the base_link (or intrinsic, "robot coordinates") frame.

more

Thank you very much, I forgot to specifically mention the sole existence of "odom" and "base_link" frames. This completely answered my question.

( 2017-09-21 02:52:48 -0600 )edit

## Stats

Seen: 139 times

Last updated: Sep 20 '17