The rotate_recovery::RotateRecovery is a simple recovery behavior that attempts to clear out space in the navigation stack's costmaps by rotating the robot 360 degrees if local obstacles allow. It adheres to the nav_core::RecoveryBehavior interface found in the nav_core package and can be used as a recovery behavior plugin for the move_base node.


The rotate_recovery::RotateRecovery object exposes its functionality as a C++ ROS Wrapper. It operates within a ROS namespace (assumed to be name from here on) specified on initialization. It adheres to the nav_core::RecoveryBehavior interface found in the nav_core package.

Example creation of a rotate_recovery::RotateRecovery object:

   1 #include <tf/transform_listener.h>
   2 #include <costmap_2d/costmap_2d_ros.h>
   3 #include <rotate_recovery/rotate_recovery.h>
   5 ...
   6 tf::TransformListener tf(ros::Duration(10));
   7 costmap_2d::Costmap2DROS global_costmap("global_costmap", tf);
   8 costmap_2d::Costmap2DROS local_costmap("local_costmap", tf);
  10 rotate_recovery::RotateRecovery rr;
  11 rr.initialize("my_rotate_recovery", &tf, &global_costmap, &local_costmap);
  13 rr.runBehavior();

API Stability

  • The C++ API is stable.
  • The ROS API is stable.

ROS Parameters

The rotate_recovery::RotateRecovery object assumes that the local planner used by the move_base node is the base_local_planner::TrajectoryPlannerROS documented in the base_local_planner package and reads some of its parameters accordingly. It will work on its own, but this requires the user to specify additional parameters.

RotateRecovery Parameters

~<name>/sim_granularity (double, default: 0.017)

  • The distance in radians between checks for obstacles when checking if an in-place rotation is safe. Defaults to 1 degree.
~<name>/frequency (double, default: 20.0)
  • The frequency in HZ at which to send velocity commands to the mobile base.

TrajectoryPlannerROS Parameters

These parameters are already set when using the base_local_planner::TrajectoryPlannerROS local planner, they only need to be set explicitly for the rotate_recovery::RotateRecovery recovery behavior if a different local planne is used with the navigation stack.

~TrajectoryPlannerROS/yaw_goal_tolerance (double, default: 0.05)

  • The tolerance in radians for the controller in yaw/rotation when achieving its goal
~TrajectoryPlannerROS/acc_lim_th (double, default: 3.2)
  • The rotational acceleration limit of the robot in radians/sec^2
~TrajectoryPlannerROS/max_rotational_vel (double, default: 1.0)
  • The maximum rotational velocity allowed for the base in radians/sec
~TrajectoryPlannerROS/min_in_place_rotational_vel (double, default: 0.4)
  • The minimum rotational velocity allowed for the base while performing in-place rotations in radians/sec


The C++ rotate_recovery::RotateRecovery class adheres to the nav_core::RecoveryBehavior interface found in the nav_core package. For detailed documentation, please see RotateRecovery documentation.

Wiki: rotate_recovery (last edited 2019-11-04 12:41:19 by ArvidNorlander)