Re: Could not get transform from base_link to /camera_rgb_optical_frame

Posted by beckhz on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Could-not-get-transform-from-base-link-to-camera-rgb-optical-frame-tp2921p2930.html

I copied the launch file from this turtorial:http://wiki.ros.org/rtabmap_ros/Tutorials/SetupOnYourRobot#Kinect

And modified like this:
<launch>
  <group ns="rtabmap">
   
    <node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
      <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/depth_registered/camera_info"/>
      < param name="frame_id" type="string" value="base_link"/>
      < param name="wait_for_transform_duration" type="double" value="2"/>
    </node>

    <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"/>
          <remap from="odom" to="odom"/>
          <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"/>
          < param name="wait_for_transform_duration" type="double" value="2"/>

         
          < param name="RGBD/AngularUpdate" type="string" value="0.01"/>
          < param name="RGBD/LinearUpdate" type="string" value="0.01"/>
          < param name="Rtabmap/TimeThr" type="string" value="700"/>
          < param name="Mem/RehearsalSimilarity" type="string" value="0.45"/>
          < param name="RGBD/OptimizeFromGraphEnd" type="string" value="true"/>
    </node>

    <node pkg="tf" type="static_transform_publisher" name="base_to_camera"
args="0 0 0 0 0 0 /base_link /camera_link 100"/>
   
  </group>
</launch>

Still got warnning:
odometry:Could not get transform from base_link to camera_rgb_optical_frame
And rviz still not working

I`m confused about my tf tree that miss the /map -> /odom. Is there any problem in my launch file?
Any help is super appreciated! thx!