Rosanswers logo


I'm trying to use RGBDSLAM on bag file data. After start of processing there is a lot of errors in terminal like this:

[ERROR] [1329932176.311416364]: Sum of Covariances not invertible: 
 inf  inf -inf
 inf  inf -inf
-inf -inf  inf
[ERROR] [1329932176.311986136]: Sum of Covariances not invertible: 
 inf  inf -inf
 inf  inf -inf
-inf -inf  inf

What is wrong?

My launchfile: http://pastebin.com/n8nuKnXD

Info of used bag file:

path:        2012-02-17-12-09-16.bag
version:     2.0
duration:    6:00s (360s)
start:       Feb 17 2012 12:09:16.69 (1329476956.69)
end:         Feb 17 2012 12:15:16.73 (1329477316.73)
size:        18.1 GB
messages:    95096
compression: none [17979/17979 chunks]
types:       geometry_msgs/PoseWithCovarianceStamped [953b798c0f514ff060a53a3498ce6246]
             geometry_msgs/Twist                     [9f195f881246fdfa2798d1d3eebca84a]
             nav_msgs/Odometry                       [cd5e73d190d741a2f92e81eda573aca7]
             sensor_msgs/CameraInfo                  [c9a58c1b0b154e0e6da7578cb991d214]
             sensor_msgs/Image                       [060021388200f6f0f447d0fcd9c64743]
             tf/tfMessage                            [94810edda583a504dfda3829e70d7eec]
topics:      /camera/depth/camera_info    8991 msgs    : sensor_msgs/CameraInfo                 
             /camera/depth/image_raw      8991 msgs    : sensor_msgs/Image                      
             /camera/rgb/camera_info      9000 msgs    : sensor_msgs/CameraInfo                 
             /camera/rgb/image_color      9000 msgs    : sensor_msgs/Image                      
             /camera/rgb/image_mono       9000 msgs    : sensor_msgs/Image                      
             /camera/rgb/image_raw        9000 msgs    : sensor_msgs/Image                      
             /cmd_vel                     1530 msgs    : geometry_msgs/Twist                    
             /odom                        3601 msgs    : nav_msgs/Odometry                      
             /robot_pose_ekf/odom         3600 msgs    : geometry_msgs/PoseWithCovarianceStamped
             /tf                         32383 msgs    : tf/tfMessage                            (7 connections)

Thanks for any hints.


I've added this line to the code:


RGBDSlam is running for some time but then it crashes...

Logfile is here: http://mysharegadget.com/144891718

Originally posted by ZdenekM on ROS Answers with karma: 704 on 2012-02-22

Post score: 0

Original comments

Comment by ZdenekM on 2012-02-22:
And also log file: http://mysharegadget.com/571660235


1 Answer 1


Rosanswers logo

RGBDSLAM requires /camera/depth/image (which contains float values in meter), not /camera/depth/image_raw (which provides 16bit integer values in mm). If you don't want to re-record the data and know C++, you can add a conversion in src/openni_listener.cpp in the method

void OpenNIListener::noCloudCallback (const sensor_msgs::ImageConstPtr& visual_img_msg,...)

There are two lines:

cv::Mat depth_float_img = cv_bridge::toCvCopy(depth_img_msg)->image;

Add changes s.t. the image is converted to float and meter there.

Please try:

cv::Mat depth_float_img2;
depth_float_img = depth_float_img2 * 0.001

This should avoid all problems with casting and inplace. Hope that helps with the crash. Otherwise try setting the debug-flag in the launchfile (line 9) and see where (and hopefully why) it crashes.

Originally posted by Felix Endres with karma: 6468 on 2012-02-27

This answer was ACCEPTED on the original site

Post score: 1

Original comments

Comment by ZdenekM on 2012-02-28:
Thanks for answer! I've added conversion to float and scaling to milimetres (see updated question). RGBDSlam is running for some time and then crash.

Comment by Felix Endres on 2012-02-28:
Hm, I see no obvious problem. The NaN warnings in the log could be avoided if you also converted the (original) depth image with CV_8UC1 into the depth_mono8_img_ variable. However that shouldn't cause the crash.

Comment by Felix Endres on 2012-02-28:
The lines saying "RANSAC found no valid trafo, but had initially X feature matches with average ratio Y" makes me think that something is wrong with the depth value, because X and Y are very good. Could be because you convert inplace or because of casting. See the update of my post


Your Answer

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