ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

# Revision history [back]

I had similar confusion when I first went to configure the costmap to inflate differently.

The inflation_radius is actually the radius to which the cost scaling function is applied. Inside the inflation radius, the cost scaling function is applied, but outside the inflation radius, the cost of a cell is not inflated using the cost function.

Take a look at the documentation for the cost_scaling_factor. What you have to do is basically solve the equation there ( exp(-1.0 * cost_scaling_factor * (distance_from_obstacle - inscribed_radius)) * (costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1)) for the correct cost_scaling_factor, using your distance from obstacle and the cost value you want that cell to have.

You'll have to make sure to set the inflation radius large enough that it includes the distance you need the cost function to be applied out to, as anything outside the inflation_radius will not have the cost function applied.

I had similar confusion when I first went to configure the costmap to inflate differently.

The inflation_radius is actually the radius to which the cost scaling function is applied. applied, not a parameter of the cost scaling function. Inside the inflation radius, the cost scaling function is applied, but outside the inflation radius, the cost of a cell is not inflated using the cost function.

Take a look at the documentation for the cost_scaling_factor. What you have to do is basically solve the equation there ( exp(-1.0 * cost_scaling_factor * (distance_from_obstacle - inscribed_radius)) * (costmap_2d::INSCRIBED_INFLATED_OBSTACLE - 1)) for the correct cost_scaling_factor, using your distance from obstacle and the cost value you want that cell to have.

You'll have to make sure to set the inflation radius large enough that it includes the distance you need the cost function to be applied out to, as anything outside the inflation_radius will not have the cost function applied.