Skip to content

Commit

Permalink
Warn if inflation_radius_ < inscribed_radius_ (ros-navigation#4423)
Browse files Browse the repository at this point in the history
* Warn if inflation_radius_ < inscribed_radius_

Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com>

* convert to error

Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com>

---------

Signed-off-by: Tony Najjar <tony.najjar.1997@gmail.com>
  • Loading branch information
tonynajjar authored and Manos-G committed Aug 1, 2024
1 parent 803239f commit ec76d7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions nav2_costmap_2d/plugins/inflation_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,16 @@ InflationLayer::onFootprintChanged()
computeCaches();
need_reinflation_ = true;

if (inflation_radius_ < inscribed_radius_) {
RCLCPP_ERROR(
logger_,
"The configured inflation radius (%.3f) is smaller than "
"the computed inscribed radius (%.3f) of your footprint, "
"it is highly recommended to set inflation radius to be at "
"least as big as the inscribed radius to avoid collisions",
inflation_radius_, inscribed_radius_);
}

RCLCPP_DEBUG(
logger_, "InflationLayer::onFootprintChanged(): num footprint points: %zu,"
" inscribed_radius_ = %.3f, inflation_radius_ = %.3f",
Expand Down

0 comments on commit ec76d7b

Please sign in to comment.