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

Subcribing to the Odometry

asked 2016-11-28 08:19:21 -0500

manju gravatar image

Hi, I have a gazebo model which is moved by teleop_keyboard. My model has a node which publishes Odometry values in X and Y and it has nav msgs.. I want to subscribe the turtlesim(topic turtle1/pose) to my model node and make it move in the same coordinates. How can I do this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-11-28 16:19:59 -0500

petern3 gravatar image

updated 2016-11-28 16:21:00 -0500

Because the nav_msgs/Odometry is a different message type from turtlesim/Pose, you might have to write yourself a node to convert the two. Before you do that, check to see if there isn't already a topic publishing the pose you want.

Fortunately one of the values of Odometry is a Pose (see rosmsg show nav_msgs/odometry), unfortunately this is a geometry_msgs/Pose rather than a turtlesim/Pose (use rosmsg show [msg] to see what each contains). They are different, most notably the turtlesim Pose does not use a quaternion.

I hope this helps!

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-28 08:19:21 -0500

Seen: 523 times

Last updated: Nov 28 '16