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

Does ROS Navstack use the Twist part of the Odom message

asked 2022-02-10 22:10:53 -0500

electrophod gravatar image

updated 2022-02-12 00:29:53 -0500

The nav_msgs/Odometry message type contains the Twist as well as the Pose message types. Generally odometry only means the Pose i.e. the position and the orientation of the robot. Does ROS NavStack use this Twist in the nav_msgs/Odometry message to control the velocities? Or does it just refer to the Pose part of the Odom message?

EDIT : I started analysing the source code of base_local_planner (1 and 2) and I noticed that it only the Twist part of the message is being used. Now, this is confusing me even more as the stack should use the position and orientation (Pose) of the robot to correct the velocity commands being sent to it.

Can someone explain where exactly I'm going wrong?

Thanks

edit retag flag offensive close merge delete

Comments

Another side question is that does ROS Navstack have the feature of velocity control? Does it make sure that the robot moves with the velocity it told to go?

electrophod gravatar image electrophod  ( 2022-02-10 23:05:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2022-02-13 10:12:34 -0500

Mike Scheutzow gravatar image

updated 2022-02-13 10:15:31 -0500

The ROS navigation stack has two different functions: 1) estimate where the robot is, and 2) given a goal, move the robot to that goal. These two are mostly independent of each other. Odometry is in (1), so that Twist does not directly have anything to do with moving the robot - it's merely an estimate of what the robot is doing right now (position and velocity).

The Local Planner is in (2). It sends Twist messages to a "controller", which after another calculation, results in the robot wheels turning. This Twist message is not taken directly from the Odom message. Instead, part of the job of the Local Planner is examine the difference between its next-internal-short-term goal and the current odometry, and decide on a new Twist msg to publish. For a robot with wheels, typically Local Planners do this about 5 times per second.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2022-02-10 22:10:53 -0500

Seen: 255 times

Last updated: Feb 13 '22