rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

Using `Grid/MaxObstacleHeight` with OctoMap is not working as expected with ray tracing

Open matlabbe opened this issue 1 year ago • 0 comments

Refer to this discussion: https://github.com/introlab/rtabmap_ros/issues/1194#issuecomment-2395204102

The issue is that points over the obstacle threshold won't be used for ray tracing, so some dynamic obstacles even smaller than max obstacle height may still remain in the OctoMap after it is gone. We should handle Grid/MinGroundHeight and Grid/MaxObstacleHeight differently if both Grid/3D and Grid/RayTracing are enabled. We should not filter the cloud like this: https://github.com/introlab/rtabmap/blob/538bc681d4a382ad06333ee1e17c6ac120e82c80/corelib/include/rtabmap/core/impl/LocalMapMaker.hpp#L111-L117 Instead, forward Grid/MinGroundHeight and Grid/MaxObstacleHeight to OctoMap and treat them like Grid/RangeMax parameter, so that ray tracing can clear obstacles for which the background is seen outside the obstacle volume. https://github.com/introlab/rtabmap/blob/538bc681d4a382ad06333ee1e17c6ac120e82c80/corelib/src/global_map/OctoMap.cpp#L530-L541

matlabbe avatar Oct 05 '24 21:10 matlabbe