Skip to content
Snippets Groups Projects
Commit f8b2cbc3 authored by Steven Macenski's avatar Steven Macenski Committed by Michael Jeronimo
Browse files

adding warning when lethal threshold is outside expected range (#249)

parent 96f37e02
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,12 @@ Costmap::Costmap(
: node_(node), trinary_costmap_(trinary_costmap), track_unknown_space_(track_unknown_space),
lethal_threshold_(lethal_threshold), unknown_cost_value_(unknown_cost_value)
{
lethal_threshold_ = std::max(std::min(lethal_threshold_, 100), 0);
if (lethal_threshold_ < 0. || lethal_threshold_ > 100.)
{
RCLCPP_WARN(node_->get_logger(), "Costmap: Lethal threshold set to %.2f, it should be within"
" bounds 0-100. This could result in potential collisions!", lethal_threshold_);
//lethal_threshold_ = std::max(std::min(lethal_threshold_, 100), 0);
}
}
Costmap::~Costmap()
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment