Ask Your Question

unable to update octomap correctly using insertPointcloud

asked 2020-01-17 15:36:27 -0500

zhefan gravatar image


I would like to use octomap for turtlebot path planning. My issue is:

I want to update my map after my robot reaching the desired position. To do this, I use the octomap method insertPointCloud(pointcloud, sensor_origin). The pointcloud data is obtained from projectLaser method (which convert /scan to /poincloud2). And sensor_origin is the odometry of turtlebot.

The result map I get is "overlapping" which is not correct. (sorry for unable to upload pic here) Anyone have thoughts what could be the potential reasons for that?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-01-19 19:53:22 -0500

Namal Senarathne gravatar image


The API call you use in Octomap expects the input pointclouds to be correctly registered (i.e. aligned) with respect to the global coordinate frame. (In fact Octomap library doesn't do any form of pointcloud alignment at all, so you are responsible in providing the correctly aligned pointclouds). You can play around with something like PCL pointcloud registration ( to align the pointclouds correctly.

Also, you would most definitely would require to use a localization or a SLAM solution that generates a more accurate estimation of the current pose of the sensor, as opposed to using the odometry of the turtlebot.

edit flag offensive delete link more


Thank you very much! Your answer really makes sense to me. I also find another method in Octomap InsertPointCloud(pointcloud, sensor_origin, frame_origin). I wonder if this method can deal with unregistered pointcloud? (Just want to know if I can avoid using PCL)

zhefan gravatar image zhefan  ( 2020-01-19 20:06:25 -0500 )edit

Hi, no even with InsertPointCloud(pointcloud, sensor_origin, frame_origin) you still need to compute the transform (i.e. do the registration)

Namal Senarathne gravatar image Namal Senarathne  ( 2020-01-23 20:28:04 -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: 2020-01-17 15:36:27 -0500

Seen: 118 times

Last updated: Jan 19 '20