introlab / rtabmap_ros

RTAB-Map's ROS package.
http://wiki.ros.org/rtabmap_ros
BSD 3-Clause "New" or "Revised" License
957 stars 556 forks source link

OctoMap fails to fully detect moving objects #1194

Open csvicbot-7 opened 1 month ago

csvicbot-7 commented 1 month ago

Hi @matlabbe

I'm encountering an issue with OctoMap when using it to detect obstacles. Initially, when I launch RTAB-Map, OctoMap detects all obstacles correctly. However, when someone walks around the LiDAR sensor, OctoMap fails to detect the person’s entire body.

octomap_fail_2

https://github.com/user-attachments/assets/9e70dc4a-75e4-4d00-9fab-479631def5b5

In the attached files, you can see the contrast between the two topics: /rtabmap/local_grid_obstacle (red points) and /rtabmap/octomap_obstacles (cubes). OctoMap detects only a small part of the person's body, while the /rtabmap/local_grid_obstacle topic captures the person's body more accurately.

To illustrate this issue further, I’ve attached the following files in the link

Additionally, I am unable to visualize the /rtabmap/octomap_full topic in RViz. I have already installed the octomap_rviz_plugins package, but I receive the error message "Failed to create octree structure." octomap_fail

Could you please provide some advice on how to resolve these issues?

Thanks.

matlabbe commented 1 month ago

You should use ColorOccupancyGrid display type: image

Looking at the octomap, we see more cubes added: Peek 2024-08-15 19-51

However, if the obstacle cloud doesn't get updated similarly, it means the occupancy probability inside those cubes are below GridGlobal/OccupancyThr (default 0.5). Here showing cell probability: Peek 2024-08-15 20-02

Not sure why in your video there are no points added around the head where it seems keeping more bright green cubes. A rosbag with the ouster point cloud could be useful to test with.

Note also that OctoMap is not meant to track dynamic obstacles as its refresh rate is low (1 Hz by default). For fast dynamic objects, consider using a local voxel grid.