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

Getting the navigation goal from RVIZ

asked 2014-11-03 11:06:03 -0500

Giza gravatar image

I am able to get the initial pose of my turtlebot using :

rospy.wait_for_message('initialpose', PoseWithCovarianceStamped)

rospy.Subscriber('initialpose', PoseWithCovarianceStamped)

This allows me to get a the initial pose when a user clicks sets the 2d Pose estimate in RVIZ. My question is threefold

  • How do I achieve the same with the 2d Navigation Goal (getting it fom RVIZ)?
  • What message should I wait for and subscribe to?
  • What TYPE of message am I looking for? For example with initialpose I get a PoseWithCovarianceStamped message.
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-11-03 12:08:44 -0500

rviz publishes goals on the topic /move_base_simple/goal as a geometry_msgs/PoseStamped.

edit flag offensive delete link more



The specific topic can be changed using the Tool Properties panel.

David Lu gravatar image David Lu  ( 2014-11-03 12:20:58 -0500 )edit

@David thanks got it. Do you know how I can now convert this to a goal coordinate. Im not having any luck

Giza gravatar image Giza  ( 2014-11-25 13:15:27 -0500 )edit

What do you mean by goal coordinate?

David Lu gravatar image David Lu  ( 2014-11-25 16:43:13 -0500 )edit

Sorry about that. How do I convert the PoseStamped to MoveBaseGoal() if at all possible?

Giza gravatar image Giza  ( 2014-11-26 12:10:55 -0500 )edit

If you look at you'll see that all MoveBaseGoal contains is a PoseStamped.

David Lu gravatar image David Lu  ( 2014-11-28 15:28:36 -0500 )edit

Question Tools



Asked: 2014-11-03 11:06:03 -0500

Seen: 3,415 times

Last updated: Nov 03 '14