Overview

The carrot_planner::CarrotPlanner is a simple global planner that adheres to the nav_core::BaseGlobalPlanner interface found in the nav_core package and can be used as a global planner plugin for the move_base node. The planner takes a goal point from an external user, checks if the user-specified goal is in an obstacle, and if it is, it walks back along the vector between the user-specified goal and the robot until a goal point that is not in an obstacle is found. It then passes this goal point on as a plan to a local planner or controller. In this way, the carrot planner allows the robot to get as close to a user-specified goal point as possible.

planner_overview.png

CarrotPlanner

The carrot_planner::CarrotPlanner 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::BaseGlobalPlanner interface found in the nav_core package.

Example creation of a carrot_planner::CarrotPlanner object:

   1 #include <tf/transform_listener.h>
   2 #include <costmap_2d/costmap_2d_ros.h>
   3 #include <carrot_planner/carrot_planner.h>
   4 
   5 ...
   6 tf::TransformListener tf(ros::Duration(10));
   7 costmap_2d::Costmap2DROS costmap("my_costmap", tf);
   8 
   9 carrot_planner::CarrotPlanner cp;
  10 cp.initialize("my_carrot_planner", &costmap);

API Stability

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

ROS Parameters

~<name>/step_size (double, default: Resolution of the associated costmap)

  • The size steps to take backward in meters along the vector between the robot and the user-specified goal point when attempting to find a valid goal for the local planner.
~<name>/min_dist_from_robot (double, default: 0.10)
  • The minimum distance from the robot in meters at which a goal point will be sent to the local planner.

C++ API

The C++ carrot_planner::CarrotPlanner class adheres to the nav_core::BaseGlobalPlanner interface found in the nav_core package. For detailed documentation, please see CarrotPlanner Documentation.

Wiki: carrot_planner (last edited 2018-01-10 14:16:44 by NickLamprianidis)