Filter custom area in point cloud
Posted by arrinay on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Filter-custom-area-in-point-cloud-tp5178.html
Hi,
I am using rtabmap in ROS and I was wondering whether it is possible to change the original/internal point cloud which is constructed by rtabmap. More specifically, I want to filter out some unwanted points in the map. To do this, I keep a list of areas which need to be filtered out. The reason I need to do the filtering is because I am having other mobile robots in my environment, which pollute my point cloud with points which are only there very momentarily.
As I understand it, ROS doesn't use shared memory for the ROS messages, so accessing the original point cloud seems impossible. And even if shared memory was used, I checked the code of fromROSMessage() here, and it seems that a copy of the point cloud is made, preventing to make permanent changes to the original point cloud from rtabmap anyway. One possible solution for me would be to use ExtractIndices from pcl every time again when I receive the point cloud from rtabmap, but that would be very inefficient as the list of to be filtered area's grows really long over time. So now I was wondering whether there is any way to filter out those points once and for all, so they wouldn't be present in the point cloud I receive in the next callback from rtabmap (similar of how the ground plane is filtered out in some published topics - but in a more generic way so I can define which points are filtered).
Thank you in advance!