GithubHelp home page GithubHelp logo

Comments (7)

gaoxiang12 avatar gaoxiang12 commented on August 28, 2024

这个不太看的出来错在什么地方。有编译环境之类的信息吗?

from slam_in_autonomous_driving.

lijh1024 avatar lijh1024 commented on August 28, 2024

这个不太看的出来错在什么地方。有编译环境之类的信息吗?

感谢高博的回复!我的系统是ubuntu20.04 编译环境信息如下:
-- Using CMAKE_PREFIX_PATH: /opt/ros/noetic
-- This workspace overlays: /opt/ros/noetic
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using Debian Python package layout
-- Using empy: /usr/lib/python3/dist-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Found gmock: gmock and gtests will be built
-- Using Python nosetests: /usr/bin/nosetests3
-- catkin 0.8.10
-- BUILD_SHARED_LIBS is on
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- livox_ros_driver: 2 messages, 0 services
-- Eigen3 version: 3.3.7
-- Eigen found (include: /usr/include/eigen3, version: 3.3.7)
-- FLANN found (include: /usr/include, lib: /usr/lib/x86_64-linux-gnu/libflann_cpp.so)
-- PCL version: 1.12.1
-- OpenCV version: 4.2.0
-- Pangolin version: 0.8
-- yaml-cpp version: 0.6.2

cmake ..编译时会出现如下警告
Cannot generate a safe runtime search path for target test_preintegration
because files in some directories may conflict with libraries in implicit
directories:

runtime library [libpcl_kdtree.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_search.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_features.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_sample_consensus.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_filters.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_ml.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_segmentation.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_surface.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_common.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_octree.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib
runtime library [libpcl_io.so.1.12] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
  /usr/local/lib

Some of these libraries may not be found correctly.
pcl 库可能有问题,但是程序崩溃指向Eigen库,我想可能是我的环境有问题,我打算重装一下系统再试试
目前代码跑了第二至第六章,只有第四章这里有问题,后面章节数据集还没下载好

from slam_in_autonomous_driving.

gaoxiang12 avatar gaoxiang12 commented on August 28, 2024

不着急,你也可以先跑跑后边的程序,看有没有类似的问题。主要是我这边没法复现。

from slam_in_autonomous_driving.

lijh1024 avatar lijh1024 commented on August 28, 2024

不着急,你也可以先跑跑后边的程序,看有没有类似的问题。主要是我这边没法复现。

恩恩 好的高博。
第七章的代码,其他的test没有问题, test_loosely_lio有问题:
void LooselyLIO::Align() {
FullCloudPtr scan_undistort_trans(new FullPointCloudType);
pcl::transformPointCloud(*scan_undistort_, *scan_undistort_trans, TIL_.matrix());
...
}
代码在 pcl::transformPointCloud这句终止,出现如下报错:
I0325 15:37:20.671840 22907 loosely_lio.cc:53] call meas, imu: 10, lidar pts: 2666
I0325 15:37:20.671860 22907 static_imu_init.cc:73] mean acce: -0.00223703 0.000396294 000.0978845
I0325 15:37:20.671895 22907 static_imu_init.cc:95] IMU 初始化成功,初始化时间= 9.99019, bg = -0.00302408 00.00172013 0.000526504, ba = 000.221898 -0.0393097 00-9.70947, gyro sq = 7.24173e-05 4.26878e-05 3.73627e-05, acce sq = 7.51306e-07 1.98639e-06 1.85595e-07, grav = 00.224135 -0.039706 0-9.80736, norm: 9.81
I0325 15:37:20.671919 22907 static_imu_init.cc:99] mean gyro: -0.00302408 00.00172013 0.000526504 acce: 000.221898 -0.0393097 00-9.70947
I0325 15:37:20.671931 22907 loosely_lio.cc:97] IMU初始化成功
Failed to find match for field 'time'.
I0325 15:37:20.673998 22907 loosely_lio.cc:53] call meas, imu: 10, lidar pts: 2817
I0325 15:37:20.674010 22907 eskf.hpp:225] skip this imu because dt_ = 1.54771e+09
浮点数例外 (核心已转储)

gdb调试后,也是指向Align函数出了问题:
Thread 1 "test_loosely_li" received signal SIGFPE, Arithmetic exception.
0x00007ffff7f7b80e in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=..., this=0x55555563b300) at /usr/include/c++/9/bits/stl_vector.h:915
915 size() const _GLIBCXX_NOEXCEPT
(gdb) bt
#0 0x00007ffff7f7b80e in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=...,
this=0x55555563b300) at /usr/include/c++/9/bits/stl_vector.h:915
#1 pcl::transformPointCloud<sad::FullPointType, double> (cloud_in=..., cloud_out=..., transform=...,
copy_all_fields=copy_all_fields@entry=true) at /usr/local/include/pcl-1.12/pcl/common/impl/transforms.hpp:232
#2 0x00007ffff7f72669 in sad::LooselyLIO::Align (this=0x7fffffffbca0) at /usr/include/c++/9/bits/shared_ptr_base.h:1020
#3 0x00007ffff7f73241 in sad::LooselyLIO::ProcessMeasurements (this=0x7fffffffbca0, meas=...)

第八章 ./bin/test_lio_iekf出现了与第七章同样的问题:
I0325 15:47:42.321244 24018 static_imu_init.cc:73] mean acce: -0.00215149 00.00016898 000.0978879
I0325 15:47:42.321276 24018 static_imu_init.cc:95] IMU 初始化成功,初始化时间= 9.99018, bg = -0.00259592 00.00176906 0.000707638, ba = 000.213411 -0.0167615 00-9.70973, gyro sq = 5.96793e-05 4.42613e-05 3.58264e-05, acce sq = 9.71749e-07 1.85436e-06 2.14871e-07, grav = 000.215562 -0.0169305 00-9.80762, norm: 9.81
I0325 15:47:42.321321 24018 static_imu_init.cc:99] mean gyro: -0.00259592 00.00176906 0.000707638 acce: 000.213411 -0.0167615 00-9.70973
I0325 15:47:42.321332 24018 lio_iekf.cc:151] IMU初始化成功
Failed to find match for field 'time'.
I0325 15:47:42.556319 24018 lio_iekf.cc:42] call meas, imu: 10, lidar pts: 3429
I0325 15:47:42.556402 24018 iekf.hpp:192] skip this imu because dt_ = 1.54771e+09
浮点数例外 (核心已转储)

gdb调试显示 LioIEKF::Align()函数 pcl::transformPointCloud()处 出了问题
void LioIEKF::Align() {
FullCloudPtr scan_undistort_trans(new FullPointCloudType);
pcl::transformPointCloud(*scan_undistort_, *scan_undistort_trans, TIL_.matrix().cast());
scan_undistort_ = scan_undistort_trans;
...
}

Thread 1 "test_lio_iekf" received signal SIGFPE, Arithmetic exception.
0x00007ffff7f386d5 in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=..., this=0x55555563a820) at /usr/include/c++/9/bits/stl_vector.h:915
915 size() const _GLIBCXX_NOEXCEPT
(gdb) bt
#0 0x00007ffff7f386d5 in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=...,
this=0x55555563a820) at /usr/include/c++/9/bits/stl_vector.h:915
#1 pcl::transformPointCloud<sad::FullPointType, float> (cloud_in=..., cloud_out=..., transform=...,
copy_all_fields=copy_all_fields@entry=true) at /usr/local/include/pcl-1.12/pcl/common/impl/transforms.hpp:232
#2 0x00007ffff7f29221 in pcl::transformPointCloudsad::FullPointType (copy_all_fields=true, transform=..., cloud_out=...,
cloud_in=...) at /usr/local/include/pcl-1.12/pcl/common/transforms.h:237
#3 sad::LioIEKF::Align (this=0x7fffffffbc40)
at /home/user/slam/slam_in_autonomous_driving-master/src/ch8/lio-iekf/lio_iekf.cc:79

第八章 ./bin/test_lio_preinteg出现了和第四章同样的问题:
I0325 15:56:19.972568 25538 static_imu_init.cc:73] mean acce: -0.00215149 00.00016898 000.0978879
I0325 15:56:19.972599 25538 static_imu_init.cc:95] IMU 初始化成功,初始化时间= 9.99018, bg = -0.00259592 00.00176906 0.000707638, ba = 000.213411 -0.0167615 00-9.70973, gyro sq = 5.96793e-05 4.42613e-05 3.58264e-05, acce sq = 9.71749e-07 1.85436e-06 2.14871e-07, grav = 000.215562 -0.0169305 00-9.80762, norm: 9.81
I0325 15:56:19.972618 25538 static_imu_init.cc:99] mean gyro: -0.00259592 00.00176906 0.000707638 acce: 000.213411 -0.0167615 00-9.70973
I0325 15:56:19.972630 25538 lio_preinteg.cc:168] IMU初始化成功
Failed to find match for field 'time'.
I0325 15:56:19.974474 25538 lio_preinteg.cc:56] call meas, imu: 10, lidar pts: 3429
段错误 (核心已转储)

gdb调试显示了跟四章同样的问题:
Thread 1 "test_lio_preint" received signal SIGSEGV, Segmentation fault.
Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 8, 4, 0, false, false>::operator() (this=this@entry=0x7fffffffa78d, blockA=blockA@entry=0x7fffffffb430, lhs=..., depth=depth@entry=9,
rows=rows@entry=9, stride=, stride@entry=0, offset=0)
at /usr/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h:1757
1757 pstore(blockA+count, cj.pconj(A)); count+=PacketSize;
(gdb) bt
#0 Eigen::internal::gemm_pack_lhs<double, long, Eigen::internal::const_blas_data_mapper<double, long, 0>, 8, 4, 0, false, false>::operator() (this=this@entry=0x7fffffffa78d, blockA=blockA@entry=0x7fffffffb430, lhs=..., depth=depth@entry=9,
rows=rows@entry=9, stride=, stride@entry=0, offset=0)
at /usr/include/eigen3/Eigen/src/Core/products/GeneralBlockPanelKernel.h:1757

第九章 同样是pcl::transformPointCloud()这里的问题
void LioIEKF::Align() {
FullCloudPtr scan_undistort_trans(new FullPointCloudType);
pcl::transformPointCloud(*scan_undistort_, *scan_undistort_trans, TIL_.matrix().cast());
...
}

gdb调试信息如下:
Thread 1 "run_frontend" received signal SIGFPE, Arithmetic exception.
0x00007ffff79c56d5 in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=..., this=0x55555561d5c0) at /usr/include/c++/9/bits/stl_vector.h:915
915 size() const _GLIBCXX_NOEXCEPT
(gdb) bt
#0 0x00007ffff79c56d5 in pcl::PointCloudsad::FullPointType::assign<__gnu_cxx::__normal_iterator<sad::FullPointType const*, std::vector<sad::FullPointType, Eigen::aligned_allocatorsad::FullPointType > > > (new_width=0, last=..., first=..., this=0x55555561d5c0)
at /usr/include/c++/9/bits/stl_vector.h:915
#1 pcl::transformPointCloud<sad::FullPointType, float> (cloud_in=..., cloud_out=..., transform=..., copy_all_fields=copy_all_fields@entry=true)
at /usr/local/include/pcl-1.12/pcl/common/impl/transforms.hpp:232
#2 0x00007ffff79b6221 in pcl::transformPointCloudsad::FullPointType (copy_all_fields=true, transform=..., cloud_out=..., cloud_in=...)
at /usr/local/include/pcl-1.12/pcl/common/transforms.h:237
#3 sad::LioIEKF::Align (this=0x555555615360) at /home/user/slam/slam_in_autonomous_driving-master/src/ch8/lio-iekf/lio_iekf.cc:79

后面代码由于需要run_frontend 生成"./data/ch9/keyframes.txt" 暂时运行不了
感谢高博耐心解答!同时我再换台电脑重新装个系统试试

from slam_in_autonomous_driving.

lijh1024 avatar lijh1024 commented on August 28, 2024

确实应该是我的环境问题,重装系统后,没有出现上述问题,不过在运行第九章run_mapping时,出现了如下问题:
I0327 17:37:09.532670 3956 io_utils.cc:94] bag ./dataset/sad/nclt/20120429.bag finished.
I0327 17:37:09.577458 3956 lio_iekf.cc:209] finish done
I0327 17:37:09.651955 3956 frontend.cc:69] done.
I0327 17:37:09.672245 3956 keyframe.cc:77] Loaded kfs: 3277
I0327 17:37:09.672256 3956 optimization.cc:52] keyframes: 3277
I0327 17:37:09.681975 3956 optimization.cc:66] TBG =
000001 000000 000000 000000
000000 000001 000000 000.24
000000 000000 000001 -0.283
000000 000000 000000 000001
I0327 17:37:09.690057 3956 optimization.cc:381] loaded loops: 1795
I0327 17:37:09.690165 3956 optimization.cc:73] running optimization on stage 1
I0327 17:37:09.690587 3956 optimization.cc:318] p1: -425.443 -157.087 -9.99394, p2: 0452.93 26.1116 3.95173
I0327 17:37:09.690692 3956 optimization.cc:344] initial trans:
0-0.956542 000.290057 -0.0298985 000.347705
0-0.288689 0-0.956458 -0.0429716 00-1.18625
-0.0410609 -0.0324728 000.998629 00005.5054
0000000000 0000000000 0000000000 0000000001
I0327 17:37:09.693615 3956 optimization.cc:141] vertex: 3277
I0327 17:37:09.693629 3956 optimization.cc:153] Info of rtk trans: 000.25 000.25 0.0025
I0327 17:37:09.695422 3956 optimization.cc:185] gnss edges: 0, 3277
I0327 17:37:09.704984 3956 optimization.cc:214] lidar edges: 16370
terminate called after throwing an instance of 'std::out_of_range'
what(): map::at

Thread 1 "run_mapping" received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff7a18859 in __GI_abort () at abort.c:79
#2 0x00007ffff7ca3911 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#3 0x00007ffff7caf38c in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6
#4 0x00007ffff7caf3f7 in std::terminate() ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff7caf6a9 in __cxa_throw ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff7ca637e in std::__throw_out_of_range(char const*) ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff7f4d8bc in std::map<unsigned long, sad::VertexPose*, std::less, std::allocator<std::pair<unsigned long const, sad::VertexPose*> > >::at (__k=, this=)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:227
#8 sad::Optimization::AddLoopEdges (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:228
#9 0x00007ffff7f51007 in sad::Optimization::BuildProblem (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:121
#10 0x00007ffff7f52de9 in sad::Optimization::Run (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:78
#11 0x00005555555566f6 in main (argc=, argv=)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/run_mapping.cc:34

#4 0x00007ffff7caf3f7 in std::terminate() ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#5 0x00007ffff7caf6a9 in __cxa_throw ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#6 0x00007ffff7ca637e in std::__throw_out_of_range(char const*) ()
from /lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007ffff7f4d8bc in std::map<unsigned long, sad::VertexPose*, std::less, std::allocator<std::pair<unsigned long const, sad::VertexPose*> > >::at (__k=, this=)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:227
#8 sad::Optimization::AddLoopEdges (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:228
#9 0x00007ffff7f51007 in sad::Optimization::BuildProblem (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:121
#10 0x00007ffff7f52de9 in sad::Optimization::Run (this=0x7fffffffd5b0)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/optimization.cc:78
#11 0x00005555555566f6 in main (argc=, argv=)
at /home/ljh/slam/slam_in_autonomous_driving/src/ch9/run_mapping.cc:34

其余代码皆已跑通,感谢高博的分享,期待您的新书!

from slam_in_autonomous_driving.

gaoxiang12 avatar gaoxiang12 commented on August 28, 2024

ok,我去看下run_mapping的问题

from slam_in_autonomous_driving.

zerolover avatar zerolover commented on August 28, 2024

@lijh1024 你试试在 find_package(PCL REQUIRED QUIET) 的上一行加一句,因为不太清楚你自己编译的pcl有啥问题

set(PCL_DIR "/usr/lib/x86_64-linux-gnu/cmake/pcl") # use default pcl 1.10 in 20.04
find_package(PCL REQUIRED QUIET)

from slam_in_autonomous_driving.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.