Package Summary

Simple navigation package

  • Maintainer status: developed
  • Maintainer: Jim Vaughan <jimv AT mrjim DOT com>, Rohan Agrawal <send2arohan AT gmail DOT com>
  • Author: Jim Vaughan <jimv AT mrjim DOT com>
  • License: BSD
  • Source: git (branch: kinetic-devel)


This package provides the move_basic ROS Node which provides a very basic navigation node.


The move_basic node performs very basic navigation. Path planning consists of rotating in place to face the goal and then driving straight towards it. It is designed to provide the same software interfaces as move_base, that is, it implements a SimpleActionServer (see actionlib documentation), that takes in goals containing geometry_msgs/PoseStamped messages.

It is assumed that we are dealing with imperfect localization data: map->base_link is accurate but may be delayed and is at a slow rate and odom->base_link is more frequent, but drifts, particularly after rotating. To counter these issues, move_basic plans in the map frame, and waits a short time after each step, and executes movement in the odom frame. If goals in the base_link frame are received, they are interpreted as relative to the robot's current position. This behavior is different to that of move_base, which will not accept goals in the base_link frame.

Obstacle Avoidance

If data from a laser scanner or sonars is available, obstacle avoidance can be performed. If an obstacle is detected, it will slow or stop in an attempt to avoid a collision.


Some of the data produced by move_basic can be visualized with rviz. In the screen shot below, the portion of the laser scan data (in white) which is currently in the path of the robot is depicted as a red line. The light purple line shows the path planned by the robot. A navigation goal can be sent to move_basic by rviz by pressing the 2D nav goal button and clicking on the map.


During rotation, the footprint of the robot is shown as a blue rectangle. The red box, if shown shows the rotation that can be performed without collision. If no obstacles are detected that obstruct a rotation, the red box is not shown.


Subscribed Topics

/move_base/goal (move_base_msgs/MoveBaseActionGoal)
  • A goal for move_basic to pursue in the world via the actionlib interface.
/move_base/cancel (actionlib_msgs/GoalID)
  • A request to cancel a specific goal.
/move_base_simple/goal (geometry_msgs/PoseStamped)
  • A goal for move_basic to pursue via the simple interface.
/scan (sensor_msgs/LaserScan)
  • Laser scanner data for obstacle detection.
/sonars (sensor_msgs/Range)
  • Sonar data for obstacle detection
/tf (tf2_msgs/TFMessage)
  • The tf between map and base_link is used for planning if it is available. Otherwise, the tf between odom and base_link is used. The tf between odom and base_link is always used for execution. If laser scan data is available, it is assumed to be in the laser frame. Hence, the tf between base_link and laser must be published. If sonar sensors are available, their frame is determined from the messages they publish.

Published Topics

/move_base/feedback (move_base_msgs/MoveBaseActionFeedback)
  • Feedback contains the current position of the base in the world.
/move_base/status (actionlib_msgs/GoalStatusArray)
  • Provides status information on the goals that are sent to the move_base action.
/move_base/result (move_base_msgs/MoveBaseActionResult)
  • Result is empty for the move_base action.
/cmd_vel (geometry_msgs/Twist)
  • Velocity commands meant for execution by a mobile base.
/plan (nav_msgs/Path)
  • A visualization of the planned path (this is a straight line).
/obstacle_distance (std_msgs/Float32)
  • Distance to the nearest obstacle in the forward direction, in meters.
/obstacle_viz (visualization_msgs/Marker)
  • A visualization of detected obstacles.


~min_angular_velocity (double, default: 0.05)
  • The minimum speed for rotation in radians/sec.
~max_angular_velocity (double, default: 1.0)
  • The maximum speed for rotation in radians/sec.
~angular_acceleration (double, default: 0.3)
  • The rate to ramp between min_angular_velocity and max_angular_velocity when starting and stopping rotation.
~angular_tolerance (double, default: 0.01)
  • The maximum angular error that will be deemed successful.
~min_linear_velocity (double, default: 0.1)
  • The minimum speed for linear movement in meters/sec.
~max_linear_velocity (double, default: 0.5)
  • The maximum speed for linear movement in meters/sec.
~linear_acceleration (double, default: 0.25)
  • The rate to ramp between min_linear_velocity and max_linear_velocity when starting and stopping linear movement.
~linear_tolerance (double, default: 0.01)
  • The maximum linear error that will be deemed successful.
~localization_latency (double, default: 0.5)
  • How long (in seconds) to pause between each movement step to ensure localization is accurate.
~rotation_attempts (int, default: 1)
  • How many times to attempt to rotate. This is useful if the odometry is not accurate due to wheel slippage, and extra rotation cycles are needed.
~obstacle_wait_limit (double, default: 10.0)
  • How long to pause for a detected obstacle before deciding it is not transient, in seconds.
~reverse_without_turning_threshold (double, default: 0.5)
  • An upper threshold in meters for moving backwards without turning to face the goal.
~map_frame (string, default: map)
  • Name of the global frame.
~robot_width (double, default: 0.35)
  • Distance from base_link to the side of the robot, ie half the width.
~robot_front_length (double, default: 0.11)
  • Distance from base_link the front-most part of the robot.
~robot_back_length (double, default: 0.21)
  • Distance from base_link the rear-most part of the robot.


sudo apt install ros-kinetic-move-basic


To move forward one meter using rostopic (note that bash completion will provide an empty message that can be filled out):

rostopic pub /move_base_simple/goal geometry_msgs/PoseStamped "header:
  seq: 0
    secs: 0
    nsecs: 0
  frame_id: 'base_link'
    x: 1.0
    y: 0.0
    z: 0.0
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0" 

This is an example of a relative goal, since the frame_id is set to base_link. The position of the target pose is set to 1 meter in the forward direction, and the orientation is the identity quaternion.

Wiki: move_basic (last edited 2018-02-25 23:38:51 by JimVaughan)