Ask Your Question
5

Publishing to /move_base_simple/goal

asked 2012-11-11 05:21:03 -0500

Ammar gravatar image

Hello All, This is a fairly straightforward question, however I have not been able to find it so far. Could someone please tell me the terminal command to publish move_base_simple/goal. I know it is something like: rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped ..........

Really appreciate it. Thank you Ammar

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
17

answered 2012-11-11 05:52:15 -0500

Lorenz gravatar image

updated 2012-11-11 05:53:29 -0500

rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped '{header: {stamp: now, frame_id: "map"}, pose: {position: {x: 1.0, y: 0.0, z: 0.0}, orientation: {w: 1.0}}}'

See here for an overview of the command line yaml syntax.

But if you want to send goals programmatically, consider using actionlib. It allows you to preempt goals, i.e. stop the robot, while it is moving. Have a look at this tutorial.

edit flag offensive delete link more
1

answered 2019-05-14 14:13:48 -0500

bergercookie gravatar image

updated 2019-05-14 14:14:13 -0500

For the sake of completeness and given that this is something rather useful to do especially for debugging reasons, here's the same command in ROS 2:

ros2 topic pub /move_base_simple/goal geometry_msgs/PoseStamped '{header: {stamp: {sec: 0, nanosec: 0}, frame_id: "map"}, pose: {position: {x: 1.0, y: 0.0, z: 0.0}, orientation: {w: 1.0}}}'
edit flag offensive delete link more
0

answered 2012-11-11 05:53:59 -0500

Ammar gravatar image

Never mind! Found the answer. It is simply:

rostopic pub /robot_0/move_base_simple/goal geometry_msgs/PoseStamped '{ header: { frame_id: "/map" }, pose: { position: { x: 0.25, y: 0 }, orientation: { x: 0, y: 0, z: 0, w: 1 } } }'

Thanks

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

Stats

Asked: 2012-11-11 05:21:03 -0500

Seen: 16,785 times

Last updated: May 14