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

Revision history [back]

click to hide/show revision 1
initial version

Are you referring to this tutorial ?

It does send a goal similar to rviz does (to move_base, not gmapping). It does not tell the robot to go forward, left, etc., it just tells it where the robot should end up and lets the move_base node figure out how to do that best.

Going to a fixed location is the intended purpose, just set the fixed location as target pose and give it a the proper frame_id (e.g. map).

As for the example from the tutorial that moves the base 1m forward. It only does that by telling the robot the goal is 1m ahead relative to the robot (i.e. /base_link). Setting the target 1m ahead will usually result in the robot, just driving ahead for 1m, but it doesn't need to do that exactly.

To drive a square, there thus are two possibilities:

  1. Choose the 4 cornerpoints of a square as targets in the map and give those as goals.
  2. Use the "go X meters ahead trick" 4 times, you should also be able to turn 90° in the same way.