0
$\begingroup$

Rosanswers logo

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:

<launch>
    <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>
        <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"/>
        </node>

    </group>

    <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"/>
    </group>
</launch>

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/

SUMMARY
========

PARAMETERS
 * /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: 

NODES
  /rs/
    convert_metric (nodelet/nodelet)
    register (nodelet/nodelet)
  /rtabmap/
    rgbd_odometry (rtabmap_ros/rgbd_odometry)
  /rs/camera/
    driver (nodelet/nodelet)
    nodelet_manager (nodelet/nodelet)

auto-starting new master
process[master]: started with pid [14191]
ROS_MASTER_URI=http://localhost:11311

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 ; 2.60.0.0
Intel RealSense LR200_camera ; 2.0.71.18
Intel RealSense R200_camera ; 1.0.72.06
Intel RealSense SR300_camera ; 3.10.10.0
Intel RealSense ZR300_adapter ; 1.29.0.0
Intel RealSense ZR300_camera ; 2.0.71.28
Intel RealSense ZR300_motion_module ; 1.25.0.0
[ INFO] [1518261176.953064472]: /rs/camera/driver - Detected the following camera:
                - Serial No: 2511009058, USB Port ID: 2-1, Name: Intel RealSense R200, Camera FW: 1.0.72.10
[ WARN] [1518261176.953173731]: /rs/camera/driver - Detected unvalidated firmware:
                - 2511009058's current camera firmware is 1.0.72.10, Validated camera firmware is 1.0.72.06
[ INFO] [1518261176.953262816]: /rs/camera/driver - Connecting to camera with Serial No: 2511009058, USB Port ID: 2-1
[ INFO] [1518261177.482636588]: /rs/camera/driver - Setting static camera options
[ INFO] [1518261177.516245851]: /rs/camera/driver - Enabling Depth in manual mode
[ INFO] [1518261177.517513900]: /rs/camera/driver - Enabling Color in manual mode
[ INFO] [1518261177.519102840]: /rs/camera/driver - Starting camera
[ INFO] [1518261177.549763091]: /rs/camera/driver - Publishing camera transforms (/tf_static)
[ INFO] [1518261177.550635027]: /rs/camera/driver - Setting dynamic camera options (r200_dc_preset=5)
[ INFO] [1518261178.063948780]: Odometry: frame_id               = base_link
[ INFO] [1518261178.064057439]: Odometry: odom_frame_id          = odom
[ INFO] [1518261178.064122350]: Odometry: publish_tf             = true
[ INFO] [1518261178.064183410]: Odometry: wait_for_transform     = true
[ INFO] [1518261178.064250196]: Odometry: wait_for_transform_duration  = 0.100000
[ INFO] [1518261178.064361430]: Odometry: initial_pose           = xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[ INFO] [1518261178.064427753]: Odometry: ground_truth_frame_id  = 
[ INFO] [1518261178.064527475]: Odometry: ground_truth_base_frame_id = base_link
[ INFO] [1518261178.064583648]: Odometry: config_path            = 
[ INFO] [1518261178.064637484]: Odometry: publish_null_when_lost = true
[ INFO] [1518261178.064708857]: Odometry: guess_frame_id         = 
[ INFO] [1518261178.064763843]: Odometry: guess_min_translation  = 0.000000
[ INFO] [1518261178.064817366]: Odometry: guess_min_rotation     = 0.000000
[ INFO] [1518261178.305118172]: /rs/camera/driver - Initializing Depth Control Preset to 5
[ INFO] [1518261180.052026177]: RGBDOdometry: approx_sync    = true
[ INFO] [1518261180.052844115]: RGBDOdometry: queue_size     = 5
[ INFO] [1518261180.053356999]: RGBDOdometry: subscribe_rgbd = false
[ INFO] [1518261180.053891183]: RGBDOdometry: rgbd_cameras   = 1
[ INFO] [1518261180.139156957]: 
/rtabmap/rgbd_odometry subscribed to (approx sync):
   /rs/camera/color/image_raw,
   /rs/depth_registered/image_rect,
   /rs/camera/depth/camera_info
[ 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."

Thank you for any help!


Originally posted by CreFroD on ROS Answers with karma: 5 on 2018-02-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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

Originally posted by matlabbe with karma: 6409 on 2018-02-10

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.