Robotics StackExchange | Archived questions

costmap_2d::ObstacleLayer meets problem with calculating cost value of obtacles inside footprint

Hello everyone, I am using costmap2d::ObstacleLayer to calculate local costmap of 2D laserscan. Normally, the obstacles inside footprint are ignored and not be calculated cost value. However, sometimes, whether the robot moves or stands still, somehow, the costmap2d::ObstacleLayer still calucates cost value of these obstacles, especially those near the footprint boundary. You can see my photo photo link. I have tried spatiotemporalvoxel_layer, and I met the same problem. I guess there are some missing in logic of implementation of these plugins.

Anyone here solved the problem ? Thanks in advance and have a nice day!

Asked by N.N.Huy on 2022-09-12 22:15:28 UTC

Comments

Answers

As a workaround, some people set the config parameter <obstacle layer>.footprint_clearing_enabled to true.

The idea is that if your robot already occupies that space, then there wasn't really an obstacle there. Just be careful how this feature interacts with robot footprint padding.

Asked by Mike Scheutzow on 2022-09-13 07:38:29 UTC

Comments

Do you know the reason of this ?

Asked by N.N.Huy on 2022-09-13 23:22:02 UTC

You are asking why there are false objects left behind on the obstacle layer? No, I don't know for sure. I suspect it is because the base_link update is out of sync with the lidar update.

Asked by Mike Scheutzow on 2022-09-14 07:15:01 UTC

As in my Photo, the laser dot is still inside the footprint while there is an costmap dot near the laser dot, but outside the footprint. When the robot moves, the costmap dot appears frequently beside the laser dot. This situation happens both in real robot and gazebo simulation. Anyway, thanks for your idea ! If you have any more evidence, please let me know.

Asked by N.N.Huy on 2022-09-17 04:13:11 UTC