Re: rtabmap with octomap and hector slam

Posted by matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/rtabmap-with-octomap-and-hector-slam-tp696p713.html

Hi boon,

I checked again the demo_hector_mapping.launch file, and the TF tree is:



I was wrong, you need "scanmatcher_to_base_footprint" node. However, the "world_to_map" would be:
<node pkg="tf" type="static_transform_publisher" name="world_to_map" 
    args="0.0 0.0 0.0 0.0 0.0 0.0 /world /map 100" />
as rtabmap will publish /map -> /hector_map transform.

For the /scan topic, there is maybe an error in rgbd_mapping.launch. I suggest to launch rtabmap in your launch file like that (inspired from demo_hector_mapping.launch):
<group ns="rtabmap">
    <!-- args: "delete_db_on_start" parameter deletes database on start -->
    <node name="rtabmap" pkg="rtabmap_ros" type="rtabmap" output="screen" args="--delete_db_on_start">
	  <param name="frame_id"            type="string" value="base_footprint"/>
	  <param name="subscribe_depth"     type="bool"   value="true"/>
	  <param name="subscribe_laserScan" type="bool"   value="true"/>
	
          <!-- Inputs -->
	  <remap from="odom"            to="/scanmatch_odom"/>
	  <remap from="scan"            to="/scan"/>
	  <remap from="rgb/image"       to="/camera/rgb/image_raw"/>
  	  <remap from="depth/image"     to="/camera/depth/image_raw"/>
  	  <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>

	  <!-- RTAB-Map's parameters -->
	  <param name="LccIcp/Type"                  type="string" value="2"/> 
          <param name="RGBD/OptimizeSlam2D"          type="string" value="true"/>
          <param name="RGBD/LocalLoopDetectionSpace" type="string" value="true"/>
	  <param name="LccIcp2/CorrespondenceRatio"  type="string" value="0.25"/>
	  <param name="LccBow/MaxDepth"              type="string" value="10.0"/>      
	  <param name="LccBow/InlierDistance"        type="string" value="0.1"/>
          <param name="LccBow/MinInliers"            type="string" value="10"/> 
    </node>
</group>

cheers