Re: Could not get transform from base_link to /camera_rgb_optical_frame
Posted by
matlabbe on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Could-not-get-transform-from-base-link-to-camera-rgb-optical-frame-tp2921p2931.html
Hi,
Just tried your launch file with a kinect and it works (tested with Ubuntu 14.04/Indigo binaries like your setup I think):
<launch>
<!-- Camera -->
<include file="$(find freenect_launch)/launch/freenect.launch">
<arg name="depth_registration" value="True" />
</include>
<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>
rtabmap won't publish /map->/odom if input topics are not received or if there is a TF error. If you have odometry working and not rtabmap with this launch file, the only difference is the camera_info topic (one is subscribed to /camera/rgb/camera_info and the other to /camera/depth_registered/camera_info). Otherwise, the error may be related to hardware used, you may try with the camera connected on a laptop and the same launch file.
cheers,
Mathieu