# ROS path planner and inflation

I have recently made a node to compute a path for my robot using lidar sensor. To do this, I use a costmap ( costmap_2d::Costmap2DROS ) and a planner ( navfn::NavfnROS ). I have configured the inflation radius but it seems that the planner don't take the correct value every time. For your information, I use ROS HYDRO (when I used Groovy, I haven't this issue).

You can find a part of my config file here :

  inflater:
cost_scaling_factor: 10.0

plugins:
-
name: obstacles
type: "costmap_2d::ObstacleLayer"
-
name: inflater
type: "costmap_2d::InflationLayer"


Here is a video of the problem : http://www.youtube.com/watch?v=_X5llN...

In the video, you can see in gray the unoccupied cells, and in black the occupied/inflated cells. In color (some kind of rainbow) is the potential computed to acheive the asked goal (red arrow). Finally, in green is the computed path every 2 seconds. As you can see, the potential sometime are going on the occupied cells so it seem the inflation radius is changing.

Have you ever seen this problem? Do you have a solution to that ?

The code used to compute the path :

void TrajectoryManager::computePath(void)
{
std::vector<geometry_msgs::PoseStamped> global_plan;
nav_msgs::Path tmp_path;

while (sem < 1) {
usleep(10000);
}
sem = 0;

//make sure we have a costmap for our planner
if(planner_costmap_ == NULL){
ROS_ERROR("move_base cannot make a plan for you because it doesn't have a costmap");
//return false;
}

tf::Stamped<tf::Pose> global_pose;
if(!planner_costmap_->getRobotPose(global_pose)){
ROS_ERROR("move_base cannot make a plan for you because it could not get the start pose of the robot");
//return false;
}

geometry_msgs::PoseStamped start;
//if the user does not specify a start pose, identified by an empty frame id, then use the robot's pose
tf::poseStampedTFToMsg(global_pose, start);

current_pose = start;

if(planner_->makePlan(start, final_pose, global_plan)){
//ROS_ERROR("planner makes plan");
if(!global_plan.empty()){
global_plan.push_back(final_pose);
//ROS_ERROR("globalplan filled");
}
}

tmp_path.poses = global_plan;

// lock
my_path = tmp_path;
// unlock
sem = 1;

}