这个包给导航功能包集提供了一种修复机制,它尝试让机器人执行360度旋转来完成清理空间。
1 Overview
rotate_recovery::RotateRecovery是一种简单的修复机制,通过机器人执行360度旋转完成代价地图中空间清理,继承了接口nav_core::RecoveryBehavior ,以插件方式用于move_base node。
2 RotateRecovery
rotate_recovery::RotateRecovery将功能以 C++ ROS Wrapper导出,在初始化时指定的ROS命名空间中使用。
以下是创建rotate_recovery::RotateRecovery对象的一个示例:
#include <tf/transform_listener.h>
#include <costmap_2d/costmap_2d_ros.h>
#include <rotate_recovery/rotate_recovery.h>
...
tf::TransformListener tf(ros::Duration(10));
costmap_2d::Costmap2DROS global_costmap("global_costmap", tf);
costmap_2d::Costmap2DROS local_costmap("local_costmap", tf);
rotate_recovery::RotateRecovery rr;
rr.initialize("my_rotate_recovery", &tf, &global_costmap, &local_costmap);
rr.runBehavior();
2.1 API Stability
- The C++ API is stable.
- The ROS API is stable.
2.2 ROS Parameters
rotate_recovery::RotateRecovery对象假定move_base node使用的局部规划器是base_local_planner::TrajectoryPlannerROS。
2.2.1 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.
- The frequency in HZ at which to send velocity commands to the mobile base.
2.2.2 TrajectoryPlannerROS Parameters
这些参数在base_local_planner::TrajectoryPlannerROS局部规划器已经配置过, 只有当导航功能包集中的其它局部规划器被rotate_recovery::RotateRecovery使用时才有必要设置。
~TrajectoryPlannerROS/yaw_goal_tolerance (double, default: 0.05)
- The tolerance in radians for the controller in yaw/rotation when achieving its goal
- The rotational acceleration limit of the robot in radians/sec^2
- The maximum rotational velocity allowed for the base in radians/sec
- The minimum rotational velocity allowed for the base while performing in-place rotations in radians/sec