Cloud map only shows on floor

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

Cloud map only shows on floor

maogic
Hi matlabbe,

I tried to used rtabmap with the rgbd camera+odom+scan setting, but I can't get the correct cloud map.
As shown in the image, the cloud map I got are only those white points on the floor, which seem to be identical to the laser scan. I can't get any points above the floor. The rgbd camera is working properly. What should I look into to get a correct cloud map? Thank you!

Here is my launch file setting:

 
  <arg name="rviz"                    default="false" />
  <arg name="rtabmapviz"              default="false" /> 
 
 
  <arg name="localization"            default="false"/>
 
 
  <arg name="rtabmapviz_cfg"          default="~/.ros/rtabmap_gui.ini" />
  <arg name="rviz_cfg"                default="$(find rtabmap_ros)/launch/config/rgbd.rviz" />
 
  <arg name="frame_id"                default="base_link"/>   
  <arg name="database_path"           default="~/.ros/rtabmap.db"/>
  <arg name="rtabmap_args"            default=""/>             
  <arg name="launch_prefix"           default=""/>             
  <arg name="approx_sync"             default="true"/>         
   
  <arg name="rgb_topic"               default="/hsrb/head_rgbd_sensor/rgb/image_rect_color" />
  <arg name="depth_registered_topic"  default="/hsrb/head_rgbd_sensor/depth_registered/image_raw" />
  <arg name="camera_info_topic"       default="/hsrb/head_rgbd_sensor/rgb/camera_info" />
  <arg name="compressed"              default="false"/>
   
  <arg name="subscribe_scan"          default="true"/>         
  <arg name="scan_topic"              default="/hsrb/base_scan"/>
 
  <arg name="subscribe_scan_cloud"    default="false"/>         
  <arg name="scan_cloud_topic"        default="/scan_cloud"/>
 
  <arg name="visual_odometry"         default="true"/>         
  <arg name="odom_topic"              default="/hsrb/odom"/>       
  <arg name="odom_frame_id"           default=""/>             
   
  <arg name="namespace"               default="rtabmap"/>
  <arg name="wait_for_transform"      default="0.2"/>

Reply | Threaded
Open this post in threaded view
|

Re: Cloud map only shows on floor

matlabbe
Administrator
Hi,

When subscribing to scan, we have to explicitly tell rtabmap to generate the occupancy grid map from the depth image:
<node pkg="rtabmap_ros" type="rtabmap" name="rtabmap">
   ...
   <param name="Grid/FromDepth" value="true"/>
</node>
The /rtabmap/cloud_map topic will be generated from the depth camera instead.

cheers,
Mathieu