Robotics StackExchange | Archived questions

rtabmap_ros remote mapping bad tf tree

Hi, I'm following the remote mapping tutorial, and I can't make it working.

If i run the command "rosrun tf view_frames" to print the frames, it looks like it's really split in two. Output of the command is available here:

Shall I merge the two branches? If yes, how? Any other suggestion?

Thanks

This is the launch file I'm currently using:

<launch>
  <!-- Kinect cloud to laser scan -->
    <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan">
      <remap from="image"       to="/camera/depth_registered/image_raw"/>
      <remap from="camera_info" to="/camera/depth_registered/camera_info"/>
      <remap from="scan"        to="/kinect_scan"/>
      <param name="range_max" type="double" value="4"/>
    </node>

  <!-- SLAM -->
  <group ns="rtabmap">
    <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_scan" type="bool" value="true"/>

          <!-- <remap from="odom" to="/base_controller/odom"/> -->
          <remap from="odom" to="/odom"/>
          <remap from="scan" to="/kinect_scan"/>

          <remap from="rgb/image"       to="/camera/rgb/image_rect_color"/>
          <remap from="depth/image"     to="/camera/depth_registered/image_raw"/>
          <remap from="rgb/camera_info" to="/camera/rgb/camera_info"/>

          <param name="queue_size" type="int" value="10"/>

          <!-- RTAB-Map's parameters -->
          <param name="RGBD/ProximityBySpace"     type="string" value="false"/>
          <param name="RGBD/AngularUpdate"        type="string" value="0.01"/>
          <param name="RGBD/LinearUpdate"         type="string" value="0.01"/>
          <param name="RGBD/OptimizeFromGraphEnd" type="string" value="false"/>
          <param name="Reg/Force3DoF"             type="string" value="true"/>
          <param name="Vis/MinInliers"            type="string" value="12"/>
    </node>
  </group>
</launch>

And this is the output:

SUMMARY
========

PARAMETERS
 * /depthimage_to_laserscan/range_max: 4.0
 * /rosdistro: melodic
 * /rosversion: 1.14.9
 * /rtabmap/rtabmap/RGBD/AngularUpdate: 0.01
 * /rtabmap/rtabmap/RGBD/LinearUpdate: 0.01
 * /rtabmap/rtabmap/RGBD/OptimizeFromGraphEnd: false
 * /rtabmap/rtabmap/RGBD/ProximityBySpace: false
 * /rtabmap/rtabmap/Reg/Force3DoF: true  
 * /rtabmap/rtabmap/Vis/MinInliers: 12   
 * /rtabmap/rtabmap/frame_id: base_footprint
 * /rtabmap/rtabmap/queue_size: 10
 * /rtabmap/rtabmap/subscribe_depth: True
 * /rtabmap/rtabmap/subscribe_scan: True 

NODES
  /
    depthimage_to_laserscan (depthimage_to_laserscan/depthimage_to_laserscan)
  /rtabmap/
    rtabmap (rtabmap_ros/rtabmap)

ROS_MASTER_URI=http://192.168.1.15:11311

process[depthimage_to_laserscan-1]: started with pid [2229]
process[rtabmap/rtabmap-2]: started with pid [2230]
[ INFO] [1607975437.577841910]: Starting node...
[ INFO] [1607975437.685391299]: Initializing nodelet with 4 worker threads.
[ INFO] [1607975438.258272367]: /rtabmap/rtabmap(maps): map_filter_radius          = 0.000000
[ INFO] [1607975438.258419870]: /rtabmap/rtabmap(maps): map_filter_angle           = 30.000000
[ INFO] [1607975438.258495028]: /rtabmap/rtabmap(maps): map_cleanup                = true
[ INFO] [1607975438.258563675]: /rtabmap/rtabmap(maps): map_always_update          = false
[ INFO] [1607975438.260204382]: /rtabmap/rtabmap(maps): map_empty_ray_tracing      = true
[ INFO] [1607975438.260274175]: /rtabmap/rtabmap(maps): cloud_output_voxelized     = true
[ INFO] [1607975438.260320947]: /rtabmap/rtabmap(maps): cloud_subtract_filtering   = false
[ INFO] [1607975438.260367875]: /rtabmap/rtabmap(maps): cloud_subtract_filtering_min_neighbors = 2
[ INFO] [1607975438.267989161]: /rtabmap/rtabmap(maps): octomap_tree_depth         = 16
[ INFO] [1607975438.425760930]: rtabmap: frame_id      = base_footprint
[ INFO] [1607975438.425872755]: rtabmap: map_frame_id  = map
[ INFO] [1607975438.425942392]: rtabmap: use_action_for_goal  = false
[ INFO] [1607975438.426003695]: rtabmap: tf_delay      = 0.050000
[ INFO] [1607975438.426055154]: rtabmap: tf_tolerance  = 0.100000
[ INFO] [1607975438.426111770]: rtabmap: odom_sensor_sync   = false
[ INFO] [1607975439.491130948]: Setting RTAB-Map parameter "RGBD/AngularUpdate"="0.01"
[ INFO] [1607975439.510238748]: Setting RTAB-Map parameter "RGBD/LinearUpdate"="0.01"
[ INFO] [1607975439.548219864]: Setting RTAB-Map parameter "RGBD/OptimizeFromGraphEnd"="false"
[ INFO] [1607975439.565334294]: Setting RTAB-Map parameter "RGBD/ProximityBySpace"="false"
[ INFO] [1607975439.602424716]: Setting RTAB-Map parameter "Reg/Force3DoF"="true"
[ INFO] [1607975439.911307749]: Setting RTAB-Map parameter "Vis/MinInliers"="12"
[ WARN] [1607975440.371054842]: Setting "Grid/FromDepth" parameter to false (default true) as "subscribe_scan" or "subscribe_scan_cloud" is true. The occupancy grid map will be constructed from laser scans. To get occupancy grid map from cloud projection, set "Grid/FromDepth" to true. To suppress this warning, add <param name="Grid/FromDepth" type="string" value="false"/>
[ INFO] [1607975440.371197345]: Setting "Grid/RangeMax" parameter to 0 (default 5.000000) as "subscribe_scan" or "subscribe_scan_cloud" is true.
[ INFO] [1607975440.373662911]: RTAB-Map detection rate = 1.000000 Hz
[ INFO] [1607975440.374659857]: rtabmap: Deleted database "/root/.ros/rtabmap.db" (--delete_db_on_start or -d are set).
[ INFO] [1607975440.374819807]: rtabmap: Using database from "/root/.ros/rtabmap.db" (0 MB).
[ INFO] [1607975440.672118756]: rtabmap: Database version = "0.20.0".
[ INFO] [1607975440.727014400]: /rtabmap/rtabmap: subscribe_depth = true
[ INFO] [1607975440.727124506]: /rtabmap/rtabmap: subscribe_rgb = true
[ INFO] [1607975440.727185497]: /rtabmap/rtabmap: subscribe_stereo = false
[ INFO] [1607975440.727375657]: /rtabmap/rtabmap: subscribe_rgbd = false (rgbd_cameras=1)
[ INFO] [1607975440.727440658]: /rtabmap/rtabmap: subscribe_odom_info = false
[ INFO] [1607975440.727490398]: /rtabmap/rtabmap: subscribe_user_data = false
[ INFO] [1607975440.727540191]: /rtabmap/rtabmap: subscribe_scan = true
[ INFO] [1607975440.727586963]: /rtabmap/rtabmap: subscribe_scan_cloud = false
[ INFO] [1607975440.727634776]: /rtabmap/rtabmap: subscribe_scan_descriptor = false
[ INFO] [1607975440.727685975]: /rtabmap/rtabmap: queue_size    = 10
[ INFO] [1607975440.728164317]: /rtabmap/rtabmap: approx_sync   = true
[ INFO] [1607975440.728450781]: Setup depth callback
[ INFO] [1607975440.788321307]:
/rtabmap/rtabmap subscribed to (approx sync):
   /odom,
   /camera/rgb/image_rect_color,
   /camera/depth_registered/image_raw,   
   /camera/rgb/camera_info,
   /kinect_scan
[ INFO] [1607975441.260359232]: rtabmap 0.20.0 started...
[ WARN] [1607975443.437600036]: Could not get transform from base_footprint to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1607975443.136633)! Error="Could not find a connection between 'base_footprint' and 'camera_rgb_optical_frame' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.200822 timeout was 0.2.".
[ERROR] [1607975443.438192599]: TF of received image 0 at time 1607975443.136633s is not set!
[ERROR] [1607975443.439792263]: Could not convert rgb/depth msgs! Aborting rtabmap update...
[ WARN] [1607975444.538102694]: Could not get transform from base_footprint to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1607975444.239071)! Error="Could not find a connection between 'base_footprint' and 'camera_rgb_optical_frame' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.201296 timeout was 0.2.".
[ERROR] [1607975444.538355771]: TF of received image 0 at time 1607975444.239071s is not set!
[ERROR] [1607975444.538470305]: Could not convert rgb/depth msgs! Aborting rtabmap update...
[ WARN] [1607975445.537845599]: Could not get transform from base_footprint to camera_rgb_optical_frame after 0.200000 seconds (for stamp=1607975445.239243)! Error="Could not find a connection between 'base_footprint' and 'camera_rgb_optical_frame' because they are not part of the same tree.Tf has two or more unconnected trees.. canTransform returned after 0.20199 timeout was 0.2.".

Asked by Batstru on 2020-12-14 15:31:28 UTC

Comments

Answers