ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

ROS2 Nav2 Costmap2D not returning LETHAL_OBSTACLE when occupied cells are completely inside footprint

asked 2023-03-13 14:44:35 -0500

ahopsu gravatar image

updated 2023-03-13 16:35:14 -0500

Function footprintCostAtPose calls function footprintCost, which calls function lineCost. Seems, that the overall footprint cost in a certain place of the costmap is calculated on how the edges of the footprint hit the costmap cells. Therefore, if there is an occupied cell completely inside the footprint, but not along the edges of the footprint, the footprintCostAtPose function will not return LETHAL_OBSTACLE, which should not be the result? As this gives false information at a specific place on the costmap by stating it being collision free.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-03-14 12:07:52 -0500

The idea is that if you're checking collision regularly (as you would if you're concerned about running into stuff, e.g. everyone) then there would never be a point where there are costs within the inside of the footprint there those costs did not also cross the footprint's boundary line. Even if you're processing new sensor data so things can pop up, they can't pop up in the footprint if your robot is occupying that space.

Additionally, the costmaps commonly have a "clear under footprint" parameter enabled. This will do what it sounds like: clear all costs under the robot footprint since we know its freespace, since the robot is occupying it. So even if we did check the volume, in most places and applications, the volume would be free!

Checking the bounding line is much cheaper computationally than checking the volume of the robot, so this is a performance optimization. But, if its truly necessary and you're willing to take the computational hit, it would be a reasonable contribution to add a function that seeds the center of the robot and Breadth First Search's the interior volume of the footprint and have that be an option for applications using the utility.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2023-03-13 14:44:35 -0500

Seen: 186 times

Last updated: Mar 14 '23