engcang / FAST-LIO-SAM

a SLAM implementation combining FAST-LIO2 with pose graph optimization and loop closing based on LIO-SAM paper
Other
159 stars 17 forks source link

"--Type <RET> for more, q to quit, c to continue without paging--" appears even after disabling #4

Open djetshu opened 1 year ago

djetshu commented 1 year ago

First of all, thanks for the great repository. I have the following issue:

roslaunch fast_lio_sam run.launch lidar:=velodyne

... logging to /home/catolica/.ros/log/dddf32c2-40fe-11ee-89e7-976de36976e8/roslaunch-catolica-Z790-UD-AC-17570.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.
....
....
....
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/devel/lib/fast_lio_sam/fast_lio_sam_node...
Multi thread started 
p_pre->lidar_type 2
~~~~/home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/src/FAST-LIO-SAM/third_party/FAST_LIO/ file opened
Starting program: /home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/devel/lib/fast_lio_sam/fast_lio_sam_node __name:=fast_lio_sam_node __log:=/home/catolica/.ros/log/dddf32c2-40fe-11ee-89e7-976de36976e8/fast_lio_sam_node-4.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeeed2700 (LWP 17761)]
[New Thread 0x7fffee6d1700 (LWP 17762)]
[New Thread 0x7fffeded0700 (LWP 17763)]
[New Thread 0x7fffed6cf700 (LWP 17764)]
[New Thread 0x7fffecece700 (LWP 17765)]
[ WARN] [1692717391.061076048]: Main class, starting node...
[New Thread 0x7fffd7fff700 (LWP 17766)]
[New Thread 0x7fffdffff700 (LWP 17767)]
[New Thread 0x7fffdf7fe700 (LWP 17768)]
[New Thread 0x7fffdeffd700 (LWP 17769)]
[ INFO] [1692717403.395610851]: IMU Initial Done
[ WARN] [1692717403.397405751]: No point, skip this scan!

[New Thread 0x7fffde7fc700 (LWP 17832)]
[New Thread 0x7fffde3fb700 (LWP 17833)]
[New Thread 0x7fffddffa700 (LWP 17834)]
[New Thread 0x7fffdd7f8700 (LWP 17837)]
[New Thread 0x7fffdd3f7700 (LWP 17835)]
[New Thread 0x7fffddbf9700 (LWP 17836)]
[New Thread 0x7fffdcff6700 (LWP 17839)]
[New Thread 0x7fffd73fd700 (LWP 17841)]
[New Thread 0x7fffd77fe700 (LWP 17842)]
[New Thread 0x7fffdc7f4700 (LWP 17840)]
[New Thread 0x7fffdcbf5700 (LWP 17838)]
[New Thread 0x7fffd5ff8700 (LWP 17848)]
[New Thread 0x7fffd5bf7700 (LWP 17847)]
[New Thread 0x7fffd63f9700 (LWP 17846)]
[New Thread 0x7fffd57f6700 (LWP 17849)]
[New Thread 0x7fffd67fa700 (LWP 17845)]
[New Thread 0x7fffd53f5700 (LWP 17850)]
[New Thread 0x7fffd6bfb700 (LWP 17844)]
[New Thread 0x7fffd6ffc700 (LWP 17843)]
[New Thread 0x7fffd4bf3700 (LWP 17853)]
[New Thread 0x7fff97bfe700 (LWP 17854)]
[New Thread 0x7fffd4ff4700 (LWP 17851)]
[New Thread 0x7fffd47f2700 (LWP 17852)]
[New Thread 0x7fff97fff700 (LWP 17855)]
[New Thread 0x7fff977fd700 (LWP 17856)]
[New Thread 0x7fff973fc700 (LWP 17857)]
[New Thread 0x7fff96ffb700 (LWP 17858)]
[New Thread 0x7fff967f9700 (LWP 17860)]
[New Thread 0x7fff96bfa700 (LWP 17859)]
[New Thread 0x7fff963f8700 (LWP 17861)]
[New Thread 0x7fff95ff7700 (LWP 17862)]
[ INFO] [1692717404.061472613]: copy: 0.1, loop: 0.0
[ INFO] [1692717404.064976845]: vis: 3.6ms
[ INFO] [1692717405.061335102]: vis: 0.1ms
[ INFO] [1692717406.061242500]: vis: 0.1ms
[ INFO] [1692717407.061174266]: vis: 0.0ms
[ INFO] [1692717408.061236380]: vis: 0.0ms
[ INFO] [1692717409.061190220]: vis: 0.0ms
[ INFO] [1692717410.061216372]: vis: 0.0ms
[ INFO] [1692717411.061264425]: vis: 0.0ms
[ INFO] [1692717412.061084622]: vis: 0.0ms
[ INFO] [1692717413.061350674]: vis: 0.1ms
**--Type <RET> for more, q to quit, c to continue without paging--**
Thread 9 "fast_lio_sam_no" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fffdf7fe700 (LWP 17768)]
0x00007ffff6218f78 in std::_Rb_tree_node<std::pair<unsigned long const, int> >* std::_Rb_tree<unsigned long, std::pair<unsigned long const, int>, std::_Select1st<std::pair<unsigned long const, int> >, std::less<unsigned long>, tbb::tbb_allocator<std::pair<unsigned long const, int> > >::_M_copy<std::_Rb_tree<unsigned long, std::pair<unsigned long const, int>, std::_Select1st<std::pair<unsigned long const, int> >, std::less<unsigned long>, tbb::tbb_allocator<std::pair<unsigned long const, int> > >::_Alloc_node>(std::_Rb_tree_node<std::pair<unsigned long const, int> > const*, std::_Rb_tree_node_base*, std::_Rb_tree<unsigned long, std::pair<unsigned long const, int>, std::_Select1st<std::pair<unsigned long const, int> >, std::less<unsigned long>, tbb::tbb_allocator<std::pair<unsigned long const, int> > >::_Alloc_node&) () from /usr/local/lib/libgtsam.so.4
(gdb) 

How could I disable correctly "--Type for more, q to quit, c to continue without paging--" in order that it does not stop the algorithm? The algorithms works well where this message appears:

[INFO] [1692717404.061472613]: copy: 0.1, loop: 0.0
[ INFO] [1692717404.064976845]: vis: 3.6ms
[ INFO] [1692717405.061335102]: vis: 0.1ms
[ INFO] [1692717406.061242500]: vis: 0.1ms
[ INFO] [1692717407.061174266]: vis: 0.0ms
[ INFO] [1692717408.061236380]: vis: 0.0ms
[ INFO] [1692717409.061190220]: vis: 0.0ms
[ INFO] [1692717410.061216372]: vis: 0.0ms
[ INFO] [1692717411.061264425]: vis: 0.0ms
[ INFO] [1692717412.061084622]: vis: 0.0ms
[ INFO] [1692717413.061350674]: vis: 0.1ms

But always after 15 sec approximately the "--Type <RET> for more, q to quit, c to continue without paging--" stops only fastlio_sam_node.

I have tried to add some extra commands to launch-prefix:

<!-- run fast_lio_sam -->
    <rosparam command="load" file="$(find fast_lio_sam)/config/config.yaml" />
    <node pkg="fast_lio_sam" type="fast_lio_sam_node" name="fast_lio_sam_node" output="screen" **launch-prefix="gdb -ex 'set pagination off' -ex run --args"**/> 

and even removing launch-prefix from this launch line, that results that the output does not appear but in same way stops after 15 secs. Some recommendations to deal with that? It was tested in Jetson Orin AGX and PC with RTX 4080 + 13th Gen Intel® Core™ i9-13900KF, both have Ubuntu 20.04 and ROS Noetic.

engcang commented 1 year ago

Hi @djetshu. As you said, if you just want to delete the message, you can remove launch-prefix in the launch file. But that launch-prefix is GDB and is very useful to debug.

When you get the error and the algorithm stops, try to type "bt" and enter, then you will see where the error occurs in the code. Can you attach the result of "bt" here please?

djetshu commented 1 year ago

Thanks for replying, I typed ¨bt¨ after the algorithm stops and gets error. The result are the following in code and as a screenshot as well:

Starting program: /home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/devel/lib/fast_lio_sam/fast_lio_sam_node __name:=fast_lio_sam_node __log:=/home/catolica/.ros/log/8f869842-4683-11ee-a099-afa8419c0159/fast_lio_sam_node-4.log
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffeeed2700 (LWP 11333)]
[New Thread 0x7fffee6d1700 (LWP 11334)]
[New Thread 0x7fffeded0700 (LWP 11335)]
[New Thread 0x7fffed6cf700 (LWP 11336)]
--Type <RET> for more, q to quit, c to continue without paging--

Thread 1 "fast_lio_sam_no" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff61fead3 in gtsam::ISAM2::ISAM2(gtsam::ISAM2Params const&) ()
   from /usr/local/lib/libgtsam.so.4
#2  0x00007ffff64a2052 in __gnu_cxx::new_allocator<gtsam::ISAM2>::construct<gtsam::ISAM2, gtsam::ISAM2Params&> (this=<optimized out>, __p=0x555555599660)
    at /usr/include/c++/9/new:174
#3  std::allocator_traits<std::allocator<gtsam::ISAM2> >::construct<gtsam::ISAM2, gtsam::ISAM2Params&> (__a=..., __p=0x555555599660)
    at /usr/include/c++/9/bits/alloc_traits.h:483
#4  std::_Sp_counted_ptr_inplace<gtsam::ISAM2, std::allocator<gtsam::ISAM2>, (__gnu_cxx::_Lock_policy)2>::_Sp_counted_ptr_inplace<gtsam::ISAM2Params&> (
    __a=..., this=0x555555599650)
    at /usr/include/c++/9/bits/shared_ptr_base.h:548
#5  std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count<gtsam::ISAM2, std::allocator<gtsam::ISAM2>, gtsam::ISAM2Params&> (__a=..., 
    __p=<optimized out>, this=<optimized out>)
    at /usr/include/c++/9/bits/shared_ptr_base.h:679
#6  std::__shared_ptr<gtsam::ISAM2, (__gnu_cxx::_Lock_policy)2>::__shared_ptr<std::allocator<gtsam::ISAM2>, gtsam::ISAM2Params&> (__tag=..., 
    this=<optimized out>) at /usr/include/c++/9/bits/shared_ptr_base.h:1344
#7  std::shared_ptr<gtsam::ISAM2>::shared_ptr<std::allocator<gtsam::ISAM2>, gtsam::ISAM2Params&> (__tag=..., this=<optimized out>)
    at /usr/include/c++/9/bits/shared_ptr.h:359
--Type <RET> for more, q to quit, c to continue without paging--
#8  std::allocate_shared<gtsam::ISAM2, std::allocator<gtsam::ISAM2>, gtsam::ISAM2Params&> (__a=...) at /usr/include/c++/9/bits/shared_ptr.h:702
#9  std::make_shared<gtsam::ISAM2, gtsam::ISAM2Params&> ()
    at /usr/include/c++/9/bits/shared_ptr.h:718
#10 FAST_LIO_SAM_CLASS::FAST_LIO_SAM_CLASS (this=0x7fffffffc6e0, n_private=...)
    at /home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/src/FAST-LIO-SAM/fast_lio_sam/src/constructor.cpp:41
#11 0x000055555555dc70 in main (argc=<optimized out>, argv=<optimized out>)
    at /home/catolica/Documents/tumi_robotics_projects/chavito_escalamiento/ros/ws_fastlio_sam/src/FAST-LIO-SAM/fast_lio_sam/src/main.cpp:15
(gdb) 

image

engcang commented 1 year ago

There are 3 main threads in the code (in callbacks.cpp) and only two (loop_timer and visualization_timer) are working in your case.

According to your error, your code failed to initialize the gtsam::ISAM2 handler at here. Sadly, it seems that the error is not from the code but from GTSAM itself.

  1. What version of GTSAM did you install? Did you follow the dependencies instruction as here?
  2. and what is the version of your Eigen? - you can see the version here: /usr/include/eigen3/Eigen/src/Core/util/Macros.h For instance, mine is 3.4.0
    #define EIGEN_WORLD_VERSION 3
    #define EIGEN_MAJOR_VERSION 4
    #define EIGEN_MINOR_VERSION 0
engcang commented 1 year ago

Hi @djetshu Any updates?