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

Silly odometry question

asked 2017-09-20 07:36:28 -0500

StevenCoral gravatar image

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-09-20 08:03:15 -0500

Thomas D gravatar image

updated 2017-09-20 14:53:06 -0500

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.

edit flag offensive delete link more

Comments

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

StevenCoral gravatar image StevenCoral  ( 2017-09-21 02:52:48 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-09-20 07:36:28 -0500

Seen: 158 times

Last updated: Sep 20 '17