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

Revision history [back]

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}}}'

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.

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.