ORB_SLAM3 icon indicating copy to clipboard operation
ORB_SLAM3 copied to clipboard

"Aborted (core dumped)" when running Ros example

Open maghauke opened this issue 2 years ago • 19 comments

Hi, following the ROS example, when I use the command: rosrun ORB_SLAM3 Stereo_Inertial Vocabulary/ORBvoc.txt Examples/Stereo-Inertial/EuRoC.yaml true I get the following output: `ORB-SLAM3 Copyright (C) 2017-2020 Carlos Campos, Richard Elvira, Juan J. Gómez, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. ORB-SLAM2 Copyright (C) 2014-2016 Raúl Mur-Artal, José M.M. Montiel and Juan D. Tardós, University of Zaragoza. This program comes with ABSOLUTELY NO WARRANTY; This is free software, and you are welcome to redistribute it under certain conditions. See LICENSE.txt.

Input sensor was set to: Stereo-Inertial

Loading ORB Vocabulary. This could take a while... Vocabulary loaded!

Creation of new map with id: 0 Creation of new map with last KF id: 0 Seq. Name:

Camera Parameters:

  • Camera: Pinhole
  • fx: 435.205
  • fy: 435.205
  • cx: 367.452
  • cy: 252.201
  • k1: 0
  • k2: 0
  • p1: 0
  • p2: 0
  • fps: 20
  • color order: RGB (ignored if grayscale)

Depth Threshold (Close/Far Points): 3.85272

ORB Extractor Parameters:

  • Number of Features: 1200
  • Scale Levels: 8
  • Scale Factor: 1.2
  • Initial Fast Threshold: 20
  • Minimum Fast Threshold: 7 double free or corruption (out) Aborted (core dumped) ` Can anyone give tips on how to fix/debug this?

maghauke avatar Oct 04 '21 11:10 maghauke

I have the same problem. Getting "Segmentation fault (core dumped)" error when running any ROS example.

KristianSem avatar Oct 10 '21 11:10 KristianSem

I have the same problem too, headache

double free or corruption (out) Aborted (core dumped)

Albertcqq avatar Oct 12 '21 07:10 Albertcqq

完全卸载掉原来的opencv,装上opencv3.2.0后,问题得到解决!!!

Albertcqq avatar Oct 12 '21 11:10 Albertcqq

"After completely uninstalling the original opencv and installing opencv 3.2.0, the problem is solved! ! !" @Albertcqq ?

maghauke avatar Oct 13 '21 11:10 maghauke

"After completely uninstalling the original opencv and installing opencv 3.2.0, the problem is solved! ! !" @Albertcqq ?

yes!!!

Albertcqq avatar Oct 13 '21 11:10 Albertcqq

@Albertcqq do you have quick guide for installin opencv 3.2.0?

maghauke avatar Oct 13 '21 12:10 maghauke

@Albertcqq do you have quick guide for installin opencv 3.2.0? yes,I have ,here it is :https://zhuanlan.zhihu.com/p/52513112

Albertcqq avatar Oct 14 '21 02:10 Albertcqq

@Albertcqq do you have quick guide for installin opencv 3.2.0? yes,I have ,here it is :https://zhuanlan.zhihu.com/p/52513112

no,it is not the problem of opencv,it is the type of the data when refresh the map we get is not 32f and 64f,opencv is just detect the error

FeiXie8 avatar Nov 03 '21 06:11 FeiXie8

@FeiXie8 do you have fix for this?

maghauke avatar Nov 03 '21 06:11 maghauke

@FeiXie8 do you have fix for this?

try to use another responsitory which named "ORB_SLAM3_FIXD"

FeiXie8 avatar Nov 03 '21 09:11 FeiXie8

@FeiXie8 do you have fix for this?

excuse me, do you figure out it?

Chenliezhen259 avatar Nov 08 '21 02:11 Chenliezhen259

我用这个里面的方法改了CmakelList.txt(把项目里的所有CmakelList.txt中关于opencv版本都检查一遍,都换成opencv3(ros自带opencv是opencv3)),删除所有编译生成的build文件和lib文件,重新编译(重新运行build.sh build_ros.sh)就好了 https://github.com/UZ-SLAMLab/ORB_SLAM3/issues/333

shuaikangma avatar Jan 27 '22 09:01 shuaikangma

I have fixed the problem. Maybe my solution can help you ! it's the problem of opencv version, i found that the bug is caused by reading the data of Matrix in yaml file. So, I change the Matrix into the vector and read it by Node Iterator.such like that: First,change the Matrix to vector : Tbc: [-9.9857676677198759e-01, -4.7901561421323555e-02, 2.3449547471171506e-02, 5.9999999999999998e-02, 4.7595588902835467e-02, -9.9877630271531237e-01, -1.3437151905179608e-02, 0., 2.4064512880917498e-02, -1.2301932682702903e-02, 9.9963471411914984e-01, -1.6400000000000000e-03, 0., 0., 0., 1.] Second,change the reading code: cv::Mat cvTbc = cv::Mat::zeros(4, 4, CV_32F); cv::FileNode node = fSettings["Tbc"]; cv::FileNodeIterator it = node.begin(), it_end = node.end(); if (!node.empty()) { for (int i = 0; it != it_end; ++it, i++) { cvTbc.at(i / 4, i % 4) = *it; } // cvTbc = node.mat();

lifei8956097 avatar Apr 02 '22 02:04 lifei8956097

Do not use node.mat()

lifei8956097 avatar Apr 02 '22 02:04 lifei8956097

不要使用 node.mat()

which file is "cvTbc = node.mat();" in?

Water1775 avatar Apr 19 '22 13:04 Water1775

不要使用 node.mat()

which file is "cvTbc = node.mat();" in?

tracking.cc parseImuParamters

lifei8956097 avatar Apr 20 '22 02:04 lifei8956097

I have fixed the problem. Maybe my solution can help you ! it's the problem of opencv version, i found that the bug is caused by reading the data of Matrix in yaml file. So, I change the Matrix into the vector and read it by Node Iterator.such like that: First,change the Matrix to vector : Tbc: [-9.9857676677198759e-01, -4.7901561421323555e-02, 2.3449547471171506e-02, 5.9999999999999998e-02, 4.7595588902835467e-02, -9.9877630271531237e-01, -1.3437151905179608e-02, 0., 2.4064512880917498e-02, -1.2301932682702903e-02, 9.9963471411914984e-01, -1.6400000000000000e-03, 0., 0., 0., 1.] Second,change the reading code: cv::Mat cvTbc = cv::Mat::zeros(4, 4, CV_32F); cv::FileNode node = fSettings["Tbc"]; cv::FileNodeIterator it = node.begin(), it_end = node.end(); if (!node.empty()) { for (int i = 0; it != it_end; ++it, i++) { cvTbc.at(i / 4, i % 4) = *it; } // cvTbc = node.mat();

I changed it according to your method. As a result, there will be errors when I use make -j4.How to solve it?

[CMakeFiles/ORB_SLAM3.dir/src/Tracking.cc.o] Error 1

ricardo11235 avatar Jun 07 '22 15:06 ricardo11235

I have fixed the problem. Maybe my solution can help you ! it's the problem of opencv version, i found that the bug is caused by reading the data of Matrix in yaml file. So, I change the Matrix into the vector and read it by Node Iterator.such like that: First,change the Matrix to vector : Tbc: [-9.9857676677198759e-01, -4.7901561421323555e-02, 2.3449547471171506e-02, 5.9999999999999998e-02, 4.7595588902835467e-02, -9.9877630271531237e-01, -1.3437151905179608e-02, 0., 2.4064512880917498e-02, -1.2301932682702903e-02, 9.9963471411914984e-01, -1.6400000000000000e-03, 0., 0., 0., 1.] Second,change the reading code: cv::Mat cvTbc = cv::Mat::zeros(4, 4, CV_32F); cv::FileNode node = fSettings["Tbc"]; cv::FileNodeIterator it = node.begin(), it_end = node.end(); if (!node.empty()) { for (int i = 0; it != it_end; ++it, i++) { cvTbc.at(i / 4, i % 4) = *it; } // cvTbc = node.mat();

Hello i change the code according to your method , but something wrong happened. [error: no matching function for call to ‘cv::Mat::at(int, int)’] How to solve it?

BlueAkoasm avatar Jun 21 '22 08:06 BlueAkoasm

I have fixed the problem. Maybe my solution can help you ! it's the problem of opencv version, i found that the bug is caused by reading the data of Matrix in yaml file. So, I change the Matrix into the vector and read it by Node Iterator.such like that: First,change the Matrix to vector : Tbc: [-9.9857676677198759e-01, -4.7901561421323555e-02, 2.3449547471171506e-02, 5.9999999999999998e-02, 4.7595588902835467e-02, -9.9877630271531237e-01, -1.3437151905179608e-02, 0., 2.4064512880917498e-02, -1.2301932682702903e-02, 9.9963471411914984e-01, -1.6400000000000000e-03, 0., 0., 0., 1.] Second,change the reading code: cv::Mat cvTbc = cv::Mat::zeros(4, 4, CV_32F); cv::FileNode node = fSettings["Tbc"]; cv::FileNodeIterator it = node.begin(), it_end = node.end(); if (!node.empty()) { for (int i = 0; it != it_end; ++it, i++) { cvTbc.at(i / 4, i % 4) = *it; } // cvTbc = node.mat();

Hello i change the code according to your method , but something wrong happened. [error: no matching function for call to ‘cv::Mat::at(int, int)’] How to solve it?

cvTbc.at<float>(i/4,i%4)=*it;

ricardo11235 avatar Jun 21 '22 12:06 ricardo11235