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-tp696p711.html

I am working on ROS Indigo. I downloaded the latest version of rgbd_mapping.launch.

My launch file is as shown below,

 
  
  <!-- 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 /hector_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>
 
   
  <!-- Start rviz visualization with preset config -->
  <node pkg="rviz" type="rviz" name="rviz" args="-d $(find hector_quadrotor_demo)/rviz_cfg/indoor_slam.rviz"/>
 

I tried to remove,
<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" />

but the tf changes to,


without removing the scanmatcher_to_base_footprint, I tried

$ roslaunch hector_quadrotor_demo indoor_kinect_slam_gazebo_hector_mapping.launch

$ roslaunch rtabmap_ros rgbd_mapping.launch rtabmapviz:=false rtabmap_args:="--delete_db_on_start" rgb_topic:=/camera/rgb/image_raw depth_registered_topic:=/camera/depth/image_raw camera_info_topic:=/camera/rgb/camera_info visual_odometry:=false odom_topic:=/scanmatch_odom subscribe_scan:=true scan_topic:=/scan


The rosgraph and tf,




rtabmap is not subscribing to /scan topic.

You asked me to change the tf tree to,
you should have /world -> /map -> /scanmatch_odom -> /base_footprint.

where you refering to /scanmatcher_frame when you mentioned, /scanmatch_odom frame?