Closed Tobias-Fischer closed 9 years ago
Hi, I quickly put some code together which concatenates the point clouds, and that's working fine. However, obviously the clouds are overlapping, leading to the case that some objects are duplicated in the new cloud as they were moved around. So to refine my question, is it somehow possible to use the point cloud by the camera for the area currently perceived by the camera, and the assembled cloud for the other areas?
Thanks!
Hi,
pcl::CropHull filter could be used to "crop" the camera field of view from the assembled cloud of the map, then add the point cloud of the camera. The shape of the hull used to filter the point cloud would look like a frustrum used in computer graphics. The camera parameters are sent over camera_info messages.
Another way could be to filter cameras looking in the same direction as the current camera. This would be faster than filtering the whole point cloud, but I think the first approach would be more precise.
cheers
Hi,
sorry for the delay in getting back to you. Thanks very much, I'll use CropHull to do the job :+1:
Best, Tobias
I forgot to mention it, but last week I needed to do something like this... then I remembered there was already in PCL a filter called pcl::FrustumCulling
class (pcl/filters/frustum_culling.h
). I've made a wrapper function for convenience called util3d::frustumFiltering(...). It is integrated with /rtabmap/cloud_map
topic when ROS parameter cloud_frustum_culling
is true for the rtabmap
node.
cheers
Cool, nice work! I'll have a look at this soon :).
Hi @matlabbe, First of all, thanks again for making RTAB-Map open source, it's a great piece of software :)! I am playing around with the map assembler, and I was wondering whether it is possible to assemble the map data as it is implemented already, but on top of that merge the point cloud acquired by the Kinect.
I am thinking about concatenating the two point clouds, in another ROS node, but I am not sure whether there would be an easier way directly in the map assembler.
Thanks very much, Tobias