Ask Your Question
0

rtabmap-ros mapping without loop closure detection

asked 2016-02-14 13:26:08 -0500

Randa gravatar image

updated 2016-02-14 13:27:44 -0500

Hi,

I'm using rtabmap_ros with kinect and a simulation environment (Gazebo) and ubuntu 14.04 and ros indigo

I'm trying to 3D map a very big structure model (Aircraft model) placed in a Gazebo environment..the 3D mapping is done using a kinect placed on a UAV that autonomously navigates around the structure ... the map starts to be created successfully and incrementally but after a several hours the first mapped parts disappears. covering the structure takes alot of time. The path that the UAV follows is too long and does not include loop closure so I increased the RGBD/localimmunizationRatio from 0.025 to 0.5 to handle longer paths and I set up the RGBD/LocalLoopDetectionSpace to false but still I have the same problem so what could be the problem in my case ??

Here is the launch file part with the parameters I used:

<group ns="$(arg ns)">
<node if="$(arg rgbd_odometry)" pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
  <param name="frame_id"           type="string" value="iris/xtion_sensor/camera_depth_optical_frame"/>
  <param name="wait_for_transform" type="bool"   value="true"/>
  <param name="Odom/Force2D"       type="string"   value="true"/>
  <remap from="rgb/image"       to="/iris/xtion_sensor/iris/xtion_sensor_camera/rgb/image_raw"/>
  <remap from="depth/image"     to="/iris/xtion_sensor/iris/xtion_sensor_camera/depth/image_raw"/>
  <remap from="rgb/camera_info" to="/iris/xtion_sensor/iris/xtion_sensor_camera/rgb/camera_info"/>
</node>      
<node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="$(arg args)">
  <param name="database_path"       type="string" value="$(arg database_path)"/>
  <param name="frame_id"            type="string" value="/iris/xtion_sensor/ground_truth/iris/xtion_sensor/ground_truth/odometry_sensor_link"/>
  <param name="odom_frame_id"       type="string" value="world"/>
  <param name="subscribe_depth"     type="bool"   value="true"/>
  <remap from="odom" to="/iris/ground_truth/odometry"/>

  <remap from="rgb/image"       to="/iris/xtion_sensor/iris/xtion_sensor_camera/rgb/image_raw"/>
  <remap from="depth/image"     to="/iris/xtion_sensor/iris/xtion_sensor_camera/depth/image_raw"/>
  <remap from="rgb/camera_info" to="/iris/xtion_sensor/iris/xtion_sensor_camera/rgb/camera_info"/>
  <remap from="rtabmap/get_map" to="/iris/get_map"/>

  <param name="RGBD/LocalLoopDetectionSpace" type="string" value="false"/>   
  <param name="RGBD/OptimizeFromGraphEnd"    type="string" value="false"/> 
  <param name="Kp/MaxDepth"                  type="string" value="8.5"/>
  <param name="LccIcp/Type"                  type="string" value="1"/>     
  <param name="LccIcp2/CorrespondenceRatio"  type="string" value="0.05"/>
  <param name="LccBow/MinInliers"            type="string" value="10"/>  
  <param name="LccBow/InlierDistance"        type="string" value="0.1"/>  
  <param name="RGBD/AngularUpdate"           type="string" value="0.1"/>  
  <param name="RGBD/LinearUpdate"            type="string" value="0.1"/>    
  <param name="RGBD/LocalImmunizationRatio"  type="string" value="0.50"/>    
  <param name="Rtabmap/TimeThr"              type="string" value="700"/>
  <param name="Mem/RehearsalSimilarity"      type="string" value="0.30"/>   

  <!-- localization mode -->
  <param     if="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="false"/>
  <param unless="$(arg localization)" name="Mem/IncrementalMemory" type="string" value="true"/>
  <param name="Mem/InitWMWithAllNodes" type="string" value="$(arg localization)"/> 
</node>

 <node if="$(arg rtabmapviz)" pkg="rtabmap_ros" type="rtabmapviz" name="rtabmapviz" args="-d $(find rtabmap_ros)/launch/config/rgbd_gui.ini" output="screen">
  <param name="subscribe_depth"     type="bool"   value="true"/>
  <param name="frame_id"            type="string" value="/iris/xtion_sensor/ground_truth/iris/xtion_sensor/ground_truth/odometry_sensor_link"/>
  <param name="wait_for_transform"  type="bool"   value="true ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-15 09:53:07 -0500

matlabbe gravatar image

Hi,

In your setup, the memory management of rtabmap is enabled:

<param name="Rtabmap/TimeThr" type="string" value="700"/>

That means that when the map update takes more than 700 ms, some oldest locations would be transferred to its long-term memory to keep the algorithm online, splitting the map so that the oldest part is not shown anymore (unless you come back in that area). However, the global map is still available at the end of the run: rtabmap should be paused first then we call publish_map (params: global, optimized, graphOnly) service with global parameter set to 1:

$rosservice call /rtabmap/pause
$rosservice call /rtabmap/publish_map 1 1 1

The graphOnly parameter can be set to 0 to make rtabmap node republish all data (point clouds) on the mapData topic (if rtabmapviz or MapCloud rviz plugin has already cached all the previous clouds, you can only republish the global graph).

To reconstruct the global map offline, you can open the database in rtabmap standalone application, and just click "Edit->Download all clouds".

Note on simulation

You said that there is no loop closure in your path, does that mean you assume perfect odometry? In that case (you need only to assemble the point clouds), you could even disable loop closure detection of rtabmap, thus saving some computational time:

<param name="Kp/WordsPerImage" type="string" value="-1"/>

However, if you plan to work on a real robot, you may have to plan your path with loop closures so that odometry errors can be corrected.

cheers

edit flag offensive delete link more

Comments

Thanks for your clarification and suggestion, but I have a question about the ""Rtabmap/TimeThr" parameter, I found that the default value of this paramter is 0(means infinity) so is it better to increase the parameter value in my case or just use the default value??

Randa gravatar imageRanda ( 2016-02-17 01:01:58 -0500 )edit

Setting it to 0 disables the memory management, so you will not experience parts of map disappearing. However, the processing time will not be bounded, so no guaranty that updates will be done under 1 sec (default Rtabmap/DetectionRate) for long-term mapping.

matlabbe gravatar imagematlabbe ( 2016-02-17 06:37:47 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-02-14 13:26:08 -0500

Seen: 648 times

Last updated: Feb 15 '16