Rtabmap with Realsense D415 launch file error

asked 2018-07-25 05:15:24 -0600

buckbuck gravatar image

updated 2018-07-25 16:42:00 -0600

matlabbe gravatar image

When we try to roslaunch our launch file after starting realsense node:

  <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_link"/>

          <param name="subscribe_depth" type="bool" value="true"/>
          <param name="subscribe_scan" type="bool" value="true"/>

          <remap from="odom" to="/fused/odom"/>
          <remap from="scan" to="/scan"/>

          <remap from="rgb/image" to="/camera/color/image_raw"/>
          <remap from="depth/image" to="/camera/aligned_depth_to_color/image_raw"/>
          <remap from="rgb/camera_info" to="/camera/color/camera_info"/>

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

          <!-- RTAB-Map's parameters -->
          <param name="RGBD/NeighborLinkRefining" type="string" value="true"/>
          <param name="RGBD/ProximityBySpace"     type="string" value="true"/>
          <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="Optimizer/Slam2D"          type="string" value="true"/>
          <param name="Reg/Strategy"              type="string" value="1"/> <!-- 1=ICP -->
          <param name="Reg/Force3DoF"             type="string" value="true"/>
          <param name="Vis/MinInliers"            type="string" value="5"/>
          <param name="Vis/InlierDistance"        type="string" value="0.1"/>
          <param name="Rtabmap/TimeThr"           type="string" value="700"/>
          <param name="Mem/RehearsalSimilarity"   type="string" value="0.45"/>

This error is produced:

[ WARN] [1532506304.213371657]: Could not get transform from base_link to camera_color_optical_frame after 0.200000 seconds (for stamp=1532506303.902335)! Error="canTransform: target_frame base_link does not exist.. canTransform returned after 0.20185 timeout was 0.2.".

[ERROR] [1532506304.213408698]: TF of received image 0 at time 1532506303.902335s is not set!
[ERROR] [1532506304.213440664]: Could not convert rgb/depth msgs! Aborting rtabmap update...

Note - No errors when executed as a bash command:

roslaunch rtabmap_ros rtabmap.launch rtabmap_args:="--delete_db_on_start" rviz:=true rtabmapviz:=false depth_topic:=/camera/aligned_depth_to_color/image_raw rgb_topic:=/camera/color/image_raw camera_info_topic:=/camera/color/camera_info odom_topic:=/fused/odom scan_topic:=/scan

Some help with this issue would be much appreciated thanks

edit retag flag offensive close merge delete


rtabmap.launch uses camera_link frame by default for frame_id parameter, in your launch try changing base_link to camera_link. If you are on a robot, you may need to add tf between base_link and camera_link instead

matlabbe gravatar image matlabbe  ( 2018-07-25 16:44:43 -0600 )edit

thanks !!!

buckbuck gravatar image buckbuck  ( 2018-08-23 00:05:16 -0600 )edit