ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

RTABMap rgbd_odometry and intel realsense: Could not get transform from base_link to camera_rgb_optical_frame

asked 2018-02-10 05:13:02 -0500

CreFroD gravatar image

updated 2018-02-10 06:51:10 -0500

I am trying to get visual odometry using Intel RealSense R200 camera. I use realsense_camera package built from source for ROS Lunar on Ubuntu Server 16.04. I use the following launch file:

    <group ns="rs">
        <include file="$(find realsense_camera)/launch/r200_nodelet_default.launch"/>
        <node pkg="nodelet" type="nodelet" name="convert_metric"
              args="load depth_image_proc/convert_metric camera/nodelet_manager">
                <remap from="image_raw" to="/rs/camera/depth/image_raw"/>
                <remap from="image" to="image_depth_metric"/>
        <node pkg="nodelet" type="nodelet" name="register"
              args="load depth_image_proc/register camera/nodelet_manager">
            <remap from="rgb/camera_info" to="camera/color/camera_info"/>
            <remap from="depth/camera_info" to="camera/depth/camera_info"/>
            <remap from="depth/image_rect" to="image_depth_metric"/>


    <group ns="rtabmap">
        <remap from="rgb/image"       to="/rs/camera/color/image_raw"/>
        <remap from="depth/image"     to="/rs/depth_registered/image_rect"/>
        <remap from="rgb/camera_info" to="/rs/camera/depth/camera_info"/>
        <!-- Odometry -->
        <node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen"/>

When I launch it, I get the following warning continuously:

[ WARN] [1518261180.467050803]: odometry: Could not get transform from base_link to camera_rgb_optical_frame (stamp=1518261180.341307) after 0.100000 seconds ("wait_for_transform_duration"=0.100000)! Error="canTransform: target_frame base_link does not exist.. canTransform returned after 0.102466 timeout was 0.1."

Here is the whole launch output:

crefrod@robot:~/rns$ roslaunch launch.xml
... logging to /home/crefrod/.ros/log/57bdd86c-0e53-11e8-9bfc-0007323fd956/roslaunch-robot-14181.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://robot:33565/


 * /rosdistro: lunar
 * /rosversion: 1.13.5
 * /rs/camera/driver/base_frame_id: camera_link
 * /rs/camera/driver/camera_type: R200
 * /rs/camera/driver/color_fps: 30
 * /rs/camera/driver/color_frame_id: camera_rgb_frame
 * /rs/camera/driver/color_optical_frame_id: camera_rgb_optica...
 * /rs/camera/driver/depth_frame_id: camera_depth_frame
 * /rs/camera/driver/depth_optical_frame_id: camera_depth_opti...
 * /rs/camera/driver/fisheye_frame_id: camera_fisheye_frame
 * /rs/camera/driver/fisheye_optical_frame_id: camera_fisheye_op...
 * /rs/camera/driver/imu_frame_id: camera_imu_frame
 * /rs/camera/driver/imu_optical_frame_id: camera_imu_optica...
 * /rs/camera/driver/ir2_frame_id: camera_ir2_frame
 * /rs/camera/driver/ir2_optical_frame_id: camera_ir2_optica...
 * /rs/camera/driver/ir_frame_id: camera_ir_frame
 * /rs/camera/driver/ir_optical_frame_id: camera_ir_optical...
 * /rs/camera/driver/mode: manual
 * /rs/camera/driver/serial_no: 
 * /rs/camera/driver/usb_port_id: 

    convert_metric (nodelet/nodelet)
    register (nodelet/nodelet)
    rgbd_odometry (rtabmap_ros/rgbd_odometry)
    driver (nodelet/nodelet)
    nodelet_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [14191]

setting /run_id to 57bdd86c-0e53-11e8-9bfc-0007323fd956
process[rosout-1]: started with pid [14204]
started core service [/rosout]
process[rs/camera/nodelet_manager-2]: started with pid [14221]
process[rs/camera/driver-3]: started with pid [14222]
process[rs/convert_metric-4]: started with pid [14223]
process[rs/register-5]: started with pid [14228]
process[rtabmap/rgbd_odometry-6]: started with pid [14245]
[ INFO] [1518261176.542350541]: Initializing nodelet with 4 worker threads.
[ INFO] [1518261176.948816400]: Initializing nodelet with 4 worker threads.
Intel RealSense F200_camera ;
Intel RealSense LR200_camera ;
Intel RealSense R200_camera ;
Intel RealSense SR300_camera ;
Intel RealSense ZR300_adapter ;
Intel RealSense ZR300_camera ;
Intel RealSense ZR300_motion_module ;
[ INFO] [1518261176.953064472]: /rs/camera/driver ...
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-10 10:32:20 -0500

matlabbe gravatar image

What is the TF tree? Set frame_id to base frame. For example, if the TF root is camera_link instead of default base_link, then it can be set like this:

<node pkg="rtabmap_ros" type="rgbd_odometry" name="rgbd_odometry" output="screen">
   <param name="frame_id" value="camera_link"/>
edit flag offensive delete link more

Question Tools



Asked: 2018-02-10 05:13:02 -0500

Seen: 891 times

Last updated: Feb 10 '18