Skip to content

Commit

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

Signed-off-by: Tony Najjar <[email protected]>

* convert to error

Signed-off-by: Tony Najjar <[email protected]>

---------

Signed-off-by: Tony Najjar <[email protected]>
  • Loading branch information
tonynajjar authored Jun 18, 2024
1 parent d512820 commit 91b4f8e
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 91b4f8e

Please sign in to comment.