Data in rtabmap/cloud_map and rtabmap/scan_map empty

Posted by arrinay on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Data-in-rtabmap-cloud-map-and-rtabmap-scan-map-empty-tp4400.html

Hi,

I'm trying to get a pointcloud using rtabmap. To do this, I am subscribing to the rtabmap/cloud_map topic. However, while I do receive the sensor_msgs/PointCloud2 messages periodically in my node, these messages only report empty point clouds. When inspecting the topic with rostopic echo, I see that the height is 1 and width is 0, and the data array is empty.

The rtabmap/mapData topic does report the correct data, albeit not in a PointCloud. When I use rtabmapviz, I can see the visualization of the point cloud. Also when using rviz I can see the point cloud (using the MapCloud visualization).

Example of one cloud_map message:

---
header: 
  seq: 1254
  stamp: 
    secs: 3842
    nsecs: 530000000
  frame_id: "map"
height: 1
width: 0
fields: 
  - 
    name: "x"
    offset: 0
    datatype: 7
    count: 1
  - 
    name: "y"
    offset: 4
    datatype: 7
    count: 1
  - 
    name: "z"
    offset: 8
    datatype: 7
    count: 1
  - 
    name: "rgb"
    offset: 16
    datatype: 7
    count: 1
is_bigendian: False
point_step: 32
row_step: 0
data: []
is_dense: True
---

My rqt_graph and screenshot of rtabmapviz can be found here.

Any idea what I could be missing here? Do I need to set a parameter to enable the generation of the pointcloud using the mapData?