Re: rtabmap with octomap and hector slam

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

I updated the launch file as follows,
<?xml version="1.0"?>

<launch>
   
  <!-- Start Gazebo with wg world running in (max) realtime -->
    <!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
  <include file="$(find gazebo_ros)/launch/empty_world.launch">    
    <arg name="world_name" value="$(find chefbot_gazebo)/worlds/complete_hotel.sdf"/>
  </include>
   
  <!-- Spawn simulated quadrotor uav -->
  <include file="$(find hector_quadrotor_gazebo)/launch/spawn_quadrotor.launch" >
    <arg name="model" value="$(find hector_quadrotor_description)/urdf/quadrotor_hokuyo_utm30lx_kinect.gazebo.xacro"/>
    
  </include>
   
  <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" />

  <node pkg="tf" type="static_transform_publisher" name="scanmatcher_to_base_footprint" 
    args="0.0 0.0 0.0 0.0 0.0 0.0 /scanmatcher_frame /base_footprint 100" />

  <!-- Odometry from laser scans -->
  <!-- We use Hector mapping to generate odometry for us -->
  <node pkg="hector_mapping" type="hector_mapping" name="hector_mapping">
    
    <!-- Frame names -->
    <param name="map_frame" value="hector_map" />
    <param name="base_frame" value="base_footprint" />
    <param name="odom_frame" value="odom" />
    
    <!-- Tf use -->
    <param name="pub_map_odom_transform" value="false"/>
    <param name="pub_map_scanmatch_transform" value="true"/>
    <param name="pub_odometry" value="true"/>
    
    <!-- Map size / start point -->
    <param name="map_resolution" value="0.050"/>
    <param name="map_size" value="2048"/>
    <param name="map_multi_res_levels" value="2" />
    
    <!-- Map update parameters -->
    <param name="map_update_angle_thresh" value="0.06" />
    
    <!-- Advertising config --> 
    <param name="scan_topic" value="/scan"/>
  </node>
 
   <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>


  <!-- Start rviz visualization with preset config -->
  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_quadrotor_demo)/rviz_cfg/indoor_slam.rviz"/>
   
   
</launch>

The tf and rosgraph,




Now, the rtabmap subscribes to /scan topic but no message is received in /rtabmap/cloud_map topic.
rtabmap is not publishing /map -> /hector_map transform and I get the warning,

Parameter name changed: LccBow/MaxDepth -> LccReextract/MaxDepth. Please update your launch file accordingly.

Since there is no transform between world and hector_map frame, I also get status error in rviz


I installed rtabmap_ros with apt-get,
$ sudo apt-get install ros-indigo-rtabmap-ros
would it be required to build the package manually to include latest changes?