General usage

The navigator is a ROS node that implements a path planner for navigation and is supposed to be used in conjunction with the 'operator' node. Beside this, the whole functionality is provided by the RobotNavigator class, which is exported by this package and can be used from within other nodes as well.

Interaction with the Navigator is implemented using the actionlib interface. This allows other nodes (e.g. some high level mission control) to start actions like goal navigation or exploration, monitor the progress and eventually cancel an action in progress. The following four actions are available:

  • MoveToPosition2D
  • StartMapping

  • StartExploration

  • Localize


See the Navigator Tutorial for an example how to setup the Navigator in Stage with a given map of the environment.

ROS Interface

The navigator takes a map and the robot's position in this map to generate a path to a goal point and send motion commands to the operator.

Subscribed Topics

scan (sensor_msgs/LaserScan)
  • Laser scans to update local costmap.
tf (tf/tfMessage)
  • Transforms.

Published Topics

cmd (nav2d_operator/cmd)
  • Motion command to the Operator.
~plan (nav_msgs/GridCells) ~markers (visualization_msgs/Marker)
  • Used to show current target. (Useful during exploration)


robot_id (int, default: 1)
  • Unique ID among robots in a Team.
map_frame (string, default: "map")
  • TF frame of the map.
robot_frame (string, default: "robot")
  • TF frame of the robot.
map_service (string, default: "get_map")
  • Name of the service to get the map from. The Navigator will always query for a map using this service and not listen to a map topic.
~robot_radius (double, default: 0.3)
  • Radius of the robot, should be large enough so that the robot can turn in place anytime. (meter)
~map_inflation_radius (double, default: 1.0)
  • Radius to increase cell costs around obstacles in the map. MUST be larger then robot_radius! (meter)
~navigation_goal_distance (double, default: 1.0)
  • Stop navigation when distance to target is smaller then this value. Can be overitten by the MoveToPosition2D-ActionGoal. (meter)
~navigation_goal_angle (double, default: 1.0)
  • Tolerance when turning to target direction upon reaching the goal. When set to 0, ignore target heading. Can be overitten by the MoveToPosition2D-ActionGoal. (radians)
~navigation_homing_distance (double, default: 3.0)
  • Turn off obstacle avoidance (Operator drive_mode = 1) when distance to target is smaller then this value. Required to reach targets near obstacles. (meter)
~exploration_strategy (string, default: "NearestFrontierPlanner")
  • Select the exploration module to load. Currently available are "NearestFrontierPlanner", "MultiWavefrontPlanner" and "MinPosPlanner". The different strategies might have additional parameters.
~exploration_goal_distance (double, default: 3.0)
  • Start checking for a new goal when distance to target is smaller then this value during exploration mode. (meter)
~min_replanning_period (double, default: 3.0)
  • Replan period during navigation and exploration. (seconds)
~max_replanning_period (double, default: 1.0)
  • Minimum time between replanning cycles, used during exploration only. (seconds)


Send a goal to the navigator via action interface.

Subscribed Topics

goal (geometry_msgs/PoseStamped)
  • Goal pose to be reached.


Initialize mapping (drive forward and turn) via action interface.


StartMapping (nav2d_navigator/SendCommand)
  • Has to be called with param "3" for historic reasons.


Start exploration via action interface.


StartExploration (nav2d_navigator/SendCommand)
  • Has to be called with param "2" for historic reasons.

Wiki: nav2d_navigator (last edited 2015-10-23 07:56:24 by SebastianKasperski)