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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 76 times

Last updated: Nov 28 '16