How to use NodeData

classic Classic list List threaded Threaded
2 messages Options
FOG
Reply | Threaded
Open this post in threaded view
|

How to use NodeData

FOG
Hi Mathieu,

I am trying to unterstand how to use mapData on ROS. As far as I know RTAB-Map adding 3D-Data (NodeData) on the graph (MapGraph). I want to use the latest added Pointcloud e.g. as sensor_msgs::Pointcloud2. But when I am subscribing to the lastest set of Points from wordPts (sensor_msgs::Pointcloud2), there are just a sparse set of (feature?)-points without header data.


How can I subscribe to the complete Pointcloud?


Many Thanks!
Florenz
Reply | Threaded
Open this post in threaded view
|

Re: How to use NodeData

matlabbe
Administrator
Hi Florenz,

What you are seeing is the cloud of the visual features, not the dense point cloud. To generate the dense point cloud, convert the NodeData of the MapData message in Signature using rtabmap_ros::nodeDataFromROS(). With the Signature, you can create the point cloud with rtabmap::util3d::cloudRGBFromSensorData(signature.sensorData()), which will return a pcl::PointCloudXYZRGB cloud.

If you are interested not only by the cloud of the latest node, but by the cloud of the whole map, you can subscribe to /rtabmap/cloud_map directly.

cheers,
Mathieu