See the Operator Tutorial for an example how to setup the Operator in Stage and use a Joystick to simulate commands from a higher level node.
operatorThe operator takes motion commands from a path planner and outputs control commands to the robot hardware avoiding obstacles in front of the robot.
Subscribed Topicsscan (sensor_msgs/LaserScan)
- Laser scans to update local costmap.
- Motion command comming from a higher level node, e.g. a path planner. Velocity ranges from full speed backward (-1.0) over stop (0.0) to full speed forward (1.0). Turn ranges from maximum left (-1.0, turn in place ccw) over straight (0) to maximum right (1.0, turn in place cw). The parameter Mode defines how to handle obstacles, either by avoiding them (0) or stopping in front of them (1).
Published Topicscmd_vel (geometry_msgs/Twist)
- Control command to robot platform.
- Visualizes the received input command.
- Visualizes the control command send to the robot.
- Visualizes the internal Costmap2D.
Parameters~max_free_space (double, default: 5.0)
- Maximum considered trajectory length. All turn directions with longer trajectories will have an equal distance-value of 1.0.
- Obstacles will be discounted by this value for every cell distance in the costmap. A lower value (<1.0) causes the robot to avoid obstacles later and ignore obstacles that are far away.
- Maximum velocity command to be send to the robot when no obstacles present. A value of 1.0 means 100% of the platforms own max speed.
- Relative influence of a trajectories distance to obstacles.
- Relative influence of free space in front of the robot.
- Relative influence of the conformance with the desired turn direction from path planner etc.
- Relative influence of the continuity of control commands.
- Whether to publish the desired and route topics.