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

What does Velocity in nav_msgs/Odometry actually mean?

asked 2016-07-02 20:00:00 -0600

Joy16 gravatar image

I am confused with this type of data. What does the twist.twist.linear.x and twist.twist.linear.y actually represent?

I have a robot that can move either forward or backward and can ofcourse turn. In that case, doesn't the robot exhibit just velocity along X direction. Even if it turns, the robot's frame turns as well, still giving it a linear velocity along X direction. How come I am getting both X and Y velocity values here?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2016-07-03 23:24:42 -0600

billy gravatar image

Your understanding is correct. For a differential drive robot, the odom.twist.twist.linear.y = 0 as it is referred to the base_link frame. The other part of the Odometry message though will include X and Y position in the Odom frame.

See this page where the to different frames are called out. http://docs.ros.org/api/nav_msgs/html...

As to why you are getting X and Y velocities, you'll have to provide some info on what your setup is.

.

edit flag offensive delete link more

Comments

Thanks for your reply! I have a differential robot that follows a path. Child frame id is base_footprint. I am getting X,Y lin vel and Z for ang. vel . I need to trace the path in rviz, so I need to convert the velocity to distance and transform it to the world frame.

Joy16 gravatar image Joy16  ( 2016-07-04 14:49:02 -0600 )edit

Also in this tutorial, they seem to have taken both X and Y velocity for calculating the odometry

link text

Joy16 gravatar image Joy16  ( 2016-07-04 14:54:05 -0600 )edit

The tutorial does include a y velocity component, so I take it to mean that the simulated data (robot) is not for a differential drive, but perhaps a holonomic type. Can you post the code for the publisher of the odom? It shouldn't matter but is the robot real or simulated?

billy gravatar image billy  ( 2016-07-05 00:29:35 -0600 )edit

Hey! I don't have the code though. But it is a real robot. I just have the rosbag file recorded. I guess, when the frame is in map frame, it will have both X and Y velocity. It can have just X velocity when the frame of reference is in robot's frame(base_footprint). What do you think?

Joy16 gravatar image Joy16  ( 2016-07-05 15:16:09 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-07-02 20:00:00 -0600

Seen: 2,272 times

Last updated: Jul 03 '16