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

rtabmap rgbd_odometry: 0 features extracted from RealSense rgbd bag file

asked 2017-03-21 23:22:29 -0500

kennethjiang gravatar image

I tried to run rtabmap/rgbd_odometry node against a bag file captured from RealSense. The pose part of /rtabmap/odom messages are all 0s (position and orientation). Meanwhile rtabmap/rgbd_odometry keeps printing this warnings:

[ WARN] (2017-03-22 03:05:04.366) OdometryF2M.cpp:819::computeTransform() 20 visual features required to initialize the odometry (only 0 extracted).

I ran it with these commands:

$ roslaunch rtabmap_ros my.launch rtabmap_args:="--delete_db_on_start" depth_topic:=/camera/depth/image_raw camera_info_topic:=/camera/color/camera_info rgb_topic:=/camera/color/image_raw

$ rosbag play -l --clock ./2017-03-11-12-11-06.bagfile

Here are the launch file and bag file

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-03-22 15:54:06 -0500

matlabbe gravatar image

There is something odd about this bag. I have these errors:

[ WARN] [1490214643.518600329, 1489263072.666895325]: odometry: Could not get transform from camera_link to camera_color_optical_frame (stamp=1489263067.819779) after 0.200000 seconds ("wait_for_transform_duration"=0.200000)! Error="Lookup would require extrapolation into the past.  Requested time 1489263067.819778998 but the earliest data is at time 1489263072.050056647, when looking up transform from frame [camera_color_optical_frame] to frame [camera_link]. canTransform returned after 0.201633 timeout was 0.2."

When looking at the image msg stamps, they are all before 1489263072! even the last in the bag. The rosbag info:

$ rosbag info 2017-03-11-12-11-06.bagfile 
path:        2017-03-11-12-11-06.bagfile
version:     2.0
duration:    23.8s
start:       Mar 11 2017 15:11:11.85 (1489263071.85)
end:         Mar 11 2017 15:11:35.63 (1489263095.63)
size:        1.5 GB
messages:    8754

Time starts at 1489263071.85 and ends at 1489263095.63. For the messages (293 is the first in the bag and 405 the last):

seq: 293
stamp: 
  secs: 1489263067
  nsecs: 186445665
frame_id: camera_color_optical_frame

... ~100 messages ....

seq: 405
stamp: 
  secs: 1489263070
  nsecs: 919778998
frame_id: camera_color_optical_frame

Note the timestamps are always before rosbag start time. There are also TF frames not linked together: image description

Another problem is that you are outdoor with a RealSense. If depth image is null (all invalid depth pixels), no features can be extracted. image description

When showing depth values, they are all indeed nulls:

$ rostopic echo /camera/depth/image_raw
header: 
  seq: 349
  stamp: 
    secs: 1489263069
    nsecs:  53112331
  frame_id: camera_depth_optical_frame
height: 480
width: 640
encoding: 16UC1
is_bigendian: 0
step: 1280
data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ....

Outdoor, I recommend to go with a stereo camera.

cheers, Mathieu

edit flag offensive delete link more

Comments

These are very good catches Mathieu! I'll fix the problems you pointed out.

Do you think the depth values are all 0s because it's outdoor, or because of some user errors such as missing some configuration/calibration?

kennethjiang gravatar image kennethjiang  ( 2017-03-22 20:30:07 -0500 )edit

I also tried viso2_ros/stereo_odometry with the 2 infrared channels from RealSense, and had this error: ... instance of 'cv_bridge::Exception' what(): [8UC1] is not a color format. but [mono8] is. The conversion does not make sense

Does it mean it takes only rgb not infrared?

kennethjiang gravatar image kennethjiang  ( 2017-03-22 20:50:44 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2017-03-21 23:22:29 -0500

Seen: 484 times

Last updated: Mar 22 '17