Ask Your Question
0

RTABMAP: Save recently added points of /cloud_map topic

asked 2020-06-05 13:16:47 -0500

I am using the RTABMAPS /voxel_cloud topic to generate a pointcloud that only contains tree trunks from a .BAG recording in a forest plot. I am only interested in points that correspond to a tree trunk, so I am forced to use points that are not yet aligned into a global cloud like the /cloud_map topic is. In other words I want to selectively add points to the cloud.

This is what my program generates using the /voxel_cloud topic iSparse pointcloud of trunks

I would prefer to use points from the /cloud_map topic Dense pointcloud of trunks

I am wondering if it is possible to extract only the most recently added points to the /cloud_map topic, because the /cloud_map is more dense. If I were to use the /cloud_map topic in my program, I would be saving existing trees multiple times since the /cloud_map is aligned.

One way I have imagined is to save the cloud_map topic every time it is updated, and compare all point when it is updated to determine which ones are most recently added. This would become extremely slow with a large cloud and is probably not the best way to approach the problem.

Best Regards, Nick

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-23 12:56:20 -0500

matlabbe gravatar image

I see two approaches:

  1. Using a pcl::search::KdTree, it is possible to do a diff between two clouds received. Example here: https://github.com/introlab/rtabmap/b...

  2. Modifying rtabmap_ros's MapsManager code to publish the incremented cloud added to cloud_map. Here you have the points added to cloud_map: https://github.com/introlab/rtabmap_r.... cloud_subtract_filtering parameter should be enabled. With that cloud, a new publisher would be created to publish it there directly.

However with those two approaches, if there is a loop closure, the whole map has to be updated. So it would difficult to track which points are new or those are old.

edit flag offensive delete link more

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

Stats

Asked: 2020-06-05 13:16:47 -0500

Seen: 16 times

Last updated: Jun 23