Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行过程中追踪部分出现段错误 #10

Open
Moonteresa opened this issue Nov 3, 2019 · 15 comments
Open

运行过程中追踪部分出现段错误 #10

Moonteresa opened this issue Nov 3, 2019 · 15 comments

Comments

@Moonteresa
Copy link

`ORB特征提取参数 ORB Extractor Parameters:
-- 每幅图像特征点数量 Number of Features: 1000
-- 金字塔层数Scale Levels: 8
-- 金字塔尺度Scale Factor: 1.2
-- 初始快速角点法阈值 Initial Fast Threshold: 20
-- 最小阈值 Minimum Fast Threshold: 7

深度图阈值 Depth Threshold (Close/Far Points): 2.98842


Start processing sequence ...
Images in the sequence: 827

Light Tracking homo not working because Tracking is not initialized...
新地图创建成功 new map ,具有 地图点数 : 718 地图点 points
Tracking homo faild...
receive a keyframe, id = 1
段错误 (核心已转储)
`
can anyone please help me with this problem about tracking? Thanks!!

@lsj1005
Copy link

lsj1005 commented Nov 8, 2019

我也是同样出现这个错误

@MRwangmaomao
Copy link

请问您这个问题解决没,我也是同样的问题。

ORB-SLAM2 单目双目深度相机 SLAM
under certain conditions. See LICENSE.txt.

输入相机为: RGB-D

加载 ORB词典. This could take a while...
empty line at 1082073
数据库载入时间 Vocabulary loaded in 6.72s
fopen /home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.param failed
fopen /home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.bin failed

相机参数 Camera Parameters:
-- fx: 517.306
-- fy: 516.469
-- cx: 318.643
-- cy: 255.314
-- k1: 0.262383
-- k2: -0.953104
-- k3: 1.16331
-- p1: -0.005358
-- p2: 0.002628
-- fps: 10
-- 彩色图通道顺序color order: RGB (ignored if grayscale)

ORB特征提取参数 ORB Extractor Parameters:
-- 每幅图像特征点数量 Number of Features: 1000
-- 金字塔层数Scale Levels: 8
-- 金字塔尺度Scale Factor: 1.2
-- 初始快速角点法阈值 Initial Fast Threshold: 20
-- 最小阈值 Minimum Fast Threshold: 7

深度图阈值 Depth Threshold (Close/Far Points): 3.09294


Start processing sequence ...
Images in the sequence: 573

Light Tracking homo not working because Tracking is not initialized...
新地图创建成功 new map ,具有 地图点数 : 946 地图点 points
Tracking homo faild...
Segmentation fault (core dumped)

@Moonteresa
Copy link
Author

@MRwangmaomao
没解决呢,不过你的SSD模型还没加载好:
fopen /home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.param failed
fopen /home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.bin failed

@MRwangmaomao
Copy link

MRwangmaomao commented Nov 22, 2019 via email

@Moonteresa
Copy link
Author

@MRwangmaomao
可以试一下修改Detector.cc中的这个部分:
det_net_ptr->load_param("/home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.param");
det_net_ptr->load_model("/home/ewenwan/ewenwan/project/ORB_SLAM2-src-flow--geom-sem-octo/Thirdparty/ncnn/model/mobilenetv2_ssdlite_voc.bin");

@MRwangmaomao
Copy link

MRwangmaomao commented Nov 22, 2019 via email

@Moonteresa
Copy link
Author

好的~!我这边是pcl 1.8.1 opencv3.4 vtk6的配置,编译过程没什么大问题,但是跑数据集的时候会闪现闪退然后报跟踪没有初始化的错误~

@MRwangmaomao
Copy link

MRwangmaomao commented Nov 25, 2019

经过断点调试后发现问题出现在Eigen中的Eigen/src/Core/MapBase.h对齐问题,我猜可能是gcc优化后代码运行中发生了conflict,导致核心转储。

我修改了CMakeLists.txt中的gcc编译等级,把 -march=native -O3给去掉了,如下所示。

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O3 ")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O3 ")

现在可以正常run起来了。

@Moonteresa
Copy link
Author

@MRwangmaomao
我自查没出现这个问题,后又重装了eigen3.3.90,再编译之后报了以下类似的错误,但是去掉 -march=native -O3后好像错误没有解决 T-T :
/usr/local/include/eigen3/Eigen/src/Core/MapBase.h:195:void Eigen::MapBase<Derived, 0>::checkSanity(typename Eigen::internal::enable_if<(Eigen::internal::traits::Alignment > 0), void*>::type) const [with T = Eigen::Map<Eigen::Matrix<double, 3, 6, 0, 3, 6>, 64, Eigen::Stride<0, 0> >; Derived = Eigen::Map<Eigen::Matrix<double, 3, 6, 0, 3, 6>, 64, Eigen::Stride<0, 0> >; typename Eigen::internal::enable_if<(Eigen::internal::traits::Alignment > 0), void*>::type = void*]: 假设 ‘( ((internal::UIntPtr(m_data) % internal::traits::Alignment) == 0) || (cols() * rows() * minInnerStride * sizeof(Scalar)) < internal::traits::Alignment ) && "data is not aligned"’ 失败。
run.bash: 行 1: 14449 已放弃 (核心已转储)

@songhongxuan
Copy link

请问您解决了吗,我的问题和您一样,去掉 -march=native -O3后好像错误没有解决 T-T

@MoonSheepJx
Copy link

已解决,问题产生和自己的eigen3版本有关,原cmakelist的eigen写的太具体了,写到eigen3.xx.xx req…,我把自己的find eigen3 req…,只写到这里,就OK了

@NEUer-GaoWei
Copy link

好的~!我这边是pcl 1.8.1 opencv3.4 vtk6的配置,编译过程没什么大问题,但是跑数据集的时候会闪现闪退然后报跟踪没有初始化的错

请问您这个问题最终解决掉了嘛

@Livesoso
Copy link

同志们,eigen3.2.1OK

@chen128
Copy link

chen128 commented Jan 18, 2024

Start processing sequence ...
Images in the sequence: 827

调用了 深度相机跟踪 TrackRGBD .
start GrabImageRGBD!!!!!
[New Thread 0x7fffc6fc3700 (LWP 153059)]
[New Thread 0x7fffc67c2700 (LWP 153060)]
[New Thread 0x7fffc5fc1700 (LWP 153061)]
[New Thread 0x7fffc57c0700 (LWP 153062)]
[New Thread 0x7fffc4fbf700 (LWP 153063)]
[New Thread 0x7fffaffff700 (LWP 153064)]
[New Thread 0x7fffaf7fe700 (LWP 153065)]
[New Thread 0x7fffaeffd700 (LWP 153066)]
[New Thread 0x7fffae7fc700 (LWP 153067)]
[New Thread 0x7fffadffb700 (LWP 153068)]
[New Thread 0x7fffad7fa700 (LWP 153069)]
[New Thread 0x7fffacff9700 (LWP 153070)]
[New Thread 0x7fffa7fff700 (LWP 153071)]
[New Thread 0x7fffa77fe700 (LWP 153072)]
[New Thread 0x7fffa6ffd700 (LWP 153073)]
[New Thread 0x7fffa67fc700 (LWP 153074)]
[New Thread 0x7fffa5ffb700 (LWP 153075)]
[New Thread 0x7fffa57fa700 (LWP 153076)]
[New Thread 0x7fffa4ff9700 (LWP 153077)]
StereoInitialization!!!!!!!双目 / 深度初始化
找到的关键点个数 大于 500 进行初始化将当前帧构建为第一个关键帧
新地图创建成功 new map ,具有 地图点数 : 719 地图点 points
mState at 初始化 mState=OK;// 跟踪正常 = 2
双目 / 深度初始化 成功 !!!!!!!!!!!!!!!!
mState at 光流法检测关键点 = 2
mState at TrackHomo = 2
Tracking homo faild...
当前跟踪的mstate= 2
mState==OK 未跟丢

Thread 1 "rgbd_tum" received signal SIGSEGV, Segmentation fault.
g2o::SE3Quat::SE3Quat (this=0x428e0000ffffffff)
at /home/cr/cr_ws/ORB_SLAM2_SSD_Semantic/perfect/Thirdparty/g2o/g2o/types/se3quat.h:41
41 class SE3Quat {
使用GDB调试信息如上。也是出现段错误。但是是挂在三方库G2O中 @MRwangmaomao @Moonteresa

@chen128
Copy link

chen128 commented Jan 19, 2024

Start processing sequence ... Images in the sequence: 827

调用了 深度相机跟踪 TrackRGBD . start GrabImageRGBD!!!!! [New Thread 0x7fffc6fc3700 (LWP 153059)] [New Thread 0x7fffc67c2700 (LWP 153060)] [New Thread 0x7fffc5fc1700 (LWP 153061)] [New Thread 0x7fffc57c0700 (LWP 153062)] [New Thread 0x7fffc4fbf700 (LWP 153063)] [New Thread 0x7fffaffff700 (LWP 153064)] [New Thread 0x7fffaf7fe700 (LWP 153065)] [New Thread 0x7fffaeffd700 (LWP 153066)] [New Thread 0x7fffae7fc700 (LWP 153067)] [New Thread 0x7fffadffb700 (LWP 153068)] [New Thread 0x7fffad7fa700 (LWP 153069)] [New Thread 0x7fffacff9700 (LWP 153070)] [New Thread 0x7fffa7fff700 (LWP 153071)] [New Thread 0x7fffa77fe700 (LWP 153072)] [New Thread 0x7fffa6ffd700 (LWP 153073)] [New Thread 0x7fffa67fc700 (LWP 153074)] [New Thread 0x7fffa5ffb700 (LWP 153075)] [New Thread 0x7fffa57fa700 (LWP 153076)] [New Thread 0x7fffa4ff9700 (LWP 153077)] StereoInitialization!!!!!!!双目 / 深度初始化 找到的关键点个数 大于 500 进行初始化将当前帧构建为第一个关键帧 新地图创建成功 new map ,具有 地图点数 : 719 地图点 points mState at 初始化 mState=OK;// 跟踪正常 = 2 双目 / 深度初始化 成功 !!!!!!!!!!!!!!!! mState at 光流法检测关键点 = 2 mState at TrackHomo = 2 Tracking homo faild... 当前跟踪的mstate= 2 mState==OK 未跟丢

Thread 1 "rgbd_tum" received signal SIGSEGV, Segmentation fault. g2o::SE3Quat::SE3Quat (this=0x428e0000ffffffff) at /home/cr/cr_ws/ORB_SLAM2_SSD_Semantic/perfect/Thirdparty/g2o/g2o/types/se3quat.h:41 41 class SE3Quat { 使用GDB调试信息如上。也是出现段错误。但是是挂在三方库G2O中 @MRwangmaomao @Moonteresa

已解决,将g2o编译的CMakeList.txt中所有 -march=native去掉,最好是把项目中所有的CMakeList.txt中所有 -march=native去掉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants