ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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: