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

Getting the navigation goal from RVIZ

asked 2014-11-03 11:06:03 -0600

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
4

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

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

edit flag offensive delete link more

Comments

1

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

David Lu gravatar image David Lu  ( 2014-11-03 12:20:58 -0600 )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 -0600 )edit

What do you mean by goal coordinate?

David Lu gravatar image David Lu  ( 2014-11-25 16:43:13 -0600 )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 -0600 )edit

If you look at http://wiki.ros.org/move_base_msgs you'll see that all MoveBaseGoal contains is a PoseStamped.

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

Question Tools

3 followers

Stats

Asked: 2014-11-03 11:06:03 -0600

Seen: 3,460 times

Last updated: Nov 03 '14