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

RGBDSLAM sum of covariances not invertible

asked 2012-02-22 05:45:55 -0500

ZdenekM gravatar image

updated 2016-10-24 09:02:38 -0500

ngrennan gravatar image

Hello,

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.

UPDATE

I've added this line to the code:

depth_float_img.convertTo(depth_float_img,CV_32FC1,0.001);

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

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

edit retag flag offensive close merge delete

Comments

ZdenekM gravatar image ZdenekM  ( 2012-02-22 05:54:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-02-27 21:55:45 -0500

updated 2012-02-28 05:23:58 -0500

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.convertTo(depth_float_img2,CV_32FC1);
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.

edit flag offensive delete link more

Comments

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.

ZdenekM gravatar image ZdenekM  ( 2012-02-27 23:44:48 -0500 )edit

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.

Felix Endres gravatar image Felix Endres  ( 2012-02-28 05:13:23 -0500 )edit

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

Felix Endres gravatar image Felix Endres  ( 2012-02-28 05:20:46 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-02-22 05:45:55 -0500

Seen: 310 times

Last updated: Feb 28 '12