Ask Your Question

octomap in dynamic environment

asked 2013-09-09 00:40:24 -0500

BenMa gravatar image

updated 2013-09-09 00:42:05 -0500


I am using a 3D lidar together with octomap package to build a 3D map for an indoor environment. Since my lidar is stationary, I actually don't need any transform between lidar frame and map frame. Everything works fine except that when there are moving objects, the 3D map produced seems to be messy. Those occupied cells are not cleared even when the moving objects moved away. I know this has sth to do with the update rule of the octomap and I have been trying to play around with the octomap parameters but no success. What am I missing here? Thanks a lot!

My platform: Ubuntu 12.04, ROS Fuerte, Octomap is the one checked out from ROS wiki page.

edit retag flag offensive close merge delete


They should be cleared. Are they not changing at all or at least changing a bit, but slowly? Were they at max likelihood before? Are you getting lidar measurements through the places where objects were?

dornhege gravatar imagedornhege ( 2013-09-09 00:51:59 -0500 )edit

Another strange observation: if I pass the PCL2 generated by the lidar directly to the octomap server, the dynamic objects are actually cleared!. However, if I use the PCL filter (such as outlier removal) to filter the raw PCL2 and pass the filtered PCL2 to the octomap server, the dynamic objects are not cleared. A walking person will left a trail (3D cells) behind him. And, sometimes I got "Not enough inliners found to support a model (0)! returning the same coefficients" error. Back to your questions: Where can I check max likelihood? My lidar is in the centre of an indoor space where people walked by occasionally.

BenMa gravatar imageBenMa ( 2013-09-09 17:39:31 -0500 )edit

That seems to me like the filter, filters out something. Might be time to look at both point clouds and see what's happening.

dornhege gravatar imagedornhege ( 2013-09-09 23:09:59 -0500 )edit

The filtered PCL looks normal, at least in rviz.

BenMa gravatar imageBenMa ( 2013-09-09 23:32:44 -0500 )edit

Is it maybe downsampled?

dornhege gravatar imagedornhege ( 2013-09-09 23:41:08 -0500 )edit

In the case of voxel filter, the PCL are downsampled. The dynamic object won't clear completely. It left a sparse trail behind. In the case of passthroughfilter (Z axis), the PCL are limted to certain height, the dynamic object will left a trail on the floor.

BenMa gravatar imageBenMa ( 2013-09-09 23:55:35 -0500 )edit

I guess that might be the problem. If it's downsampled, you have less end points to go through. Thus you get some traces, but not enough, so that some cells "in between" the rays are never visited and thus not cleared. If that's the case it should look like the objects are "thinned out in density".

dornhege gravatar imagedornhege ( 2013-09-10 00:01:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2013-09-10 00:01:43 -0500

AHornung gravatar image

updated 2013-09-10 00:03:04 -0500

Remove the passthrough filter with a z-range limit.

There is a configurable z-range limit which you can configure instead directly in octomap_server. You should include enough of the z range so that the ground plane can be used for clearing obstacles. When you cut it away, you can no longer clear obstacles in between. Instead, just enable the ground plane filter in octomap_server, it will clear properly.

Edit regarding voxel grid filter: It's usually a good idea to run that in order to speed up the integration in OctoMap. However, you must choose a resolution at most as small as your octomap resolution.

edit flag offensive delete link more


It works! Thank a lot! "You should include enough of the z range so that the ground plane can be used for clearing obstacles. When you cut it away, you can no longer clear obstacles in between", why this happened? Could you explain a bit more? Thanks!

BenMa gravatar imageBenMa ( 2013-09-10 15:16:50 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-09-09 00:40:24 -0500

Seen: 1,426 times

Last updated: Sep 10 '13