Running ORB-SLAM3 with ROS2 Humble wrapper in Ubuntu 22.04. The program run but sometimes it crash with segmentation fault. See below debug backtrace:
`Thread 29 "stereo-inertial" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fff3d9ff000 (LWP 274445)]
0x00007ffff7cae09b in Eigen::internal::cast_impl<float, double, void>::run (x=) at /usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h:24
24 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; }
(gdb) backtrace
0 0x00007ffff7cae09b in Eigen::internal::cast_impl<float, double, void>::run(float const&) (x=)
at /usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h:24
1 Eigen::internal::cast<float, double>(float const&) (x=) at /usr/include/eigen3/Eigen/src/Core/MathFunctions.h:462
19 0x00005555555702b4 in StereoInertialNode::SyncWithImu() (this=0x55555566a490) at /home/jyee/ros2_ws/src/ORB_SLAM3_ROS2/src/stereo-inertial/stereo-inertial-node.cpp:210
20 0x00007ffff4894253 in () at /lib/x86_64-linux-gnu/libstdc++.so.6
21 0x00007ffff4603ac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
22 0x00007ffff4695850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81`
Running ORB-SLAM3 with ROS2 Humble wrapper in Ubuntu 22.04. The program run but sometimes it crash with segmentation fault. See below debug backtrace:
`Thread 29 "stereo-inertial" received signal SIGSEGV, Segmentation fault. [Switching to Thread 0x7fff3d9ff000 (LWP 274445)] 0x00007ffff7cae09b in Eigen::internal::cast_impl<float, double, void>::run (x=) at /usr/include/eigen3/Eigen/src/Core/functors/AssignmentFunctors.h:24
24 EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void assignCoeff(DstScalar& a, const SrcScalar& b) const { a = b; }
(gdb) backtrace
0 0x00007ffff7cae09b in Eigen::internal::cast_impl<float, double, void>::run(float const&) (x=)
1 Eigen::internal::cast<float, double>(float const&) (x=) at /usr/include/eigen3/Eigen/src/Core/MathFunctions.h:462
2 Eigen::internal::scalar_cast_op<float, double>::operator()(float const&) const (a=, this=)
3 Eigen::internal::unary_evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const>, Eigen::internal::IndexBased, double>::coeff(long) const (index=, this=) at /usr/include/eigen3/Eigen/src/Core/CoreEvaluators.h:589
4 Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >, Eigen::internal::assign_op<double, double>, 0>::assignCoeff(long)
5 Eigen::internal::copy_using_evaluator_LinearTraversal_CompleteUnrolling<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >, Eigen::internal::assign_op<double, double>, 0>, 0, 9>::run(Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >, Eigen::internal::assign_op<double, double>, 0>&) (kernel=...) at /usr/include/eigen3/Eigen/src/Core/AssignEvaluator.h:247
6 Eigen::internal::dense_assignment_loop<Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >, Eigen::internal::assign_op<double, double>, 0>, 1, 2>::run(Eigen::internal::generic_dense_assignment_kernel<Eigen::internal::evaluator<Eigen::Matrix<double, 3, 3, 0, 3, 3> >, Eigen::internal::evaluator<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >, Eigen::internal::assign_op<double, double>, 0>&)
7 Eigen::internal::call_dense_assignment_loop<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const>, Eigen::internal::assign_op<double, double> >(Eigen::Matrix<double, 3, 3, 0, 3, 3>&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> const&, Eigen::internal::assign_op<double, double> const&) (dst=..., src=..., func=...)
8 0x00007ffff7ca5edb in Eigen::internal::Assignment<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const>, Eigen::internal::assign_op<double, double>, Eigen::internal::Dense2Dense, void>::run(Eigen::Matrix<double, 3, 3, 0, 3, 3>&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> const&, Eigen::internal::assign_op<double, double> const&)
9 Eigen::internal::call_assignment_no_alias<Eigen::Matrix<double, 3, 3, 0, 3, 3>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const>, Eigen::internal::assign_op<double, double> >(Eigen::Matrix<double, 3, 3, 0, 3, 3>&, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> const&, Eigen::internal::assign_op<double, double> const&) (func=..., src=..., dst=...)
10 Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_set_noalias<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >(Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> > const&)
11 Eigen::PlainObjectBase<Eigen::Matrix<double, 3, 3, 0, 3, 3> >::_init1<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const>, Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >(Eigen::DenseBase<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> > const&) (other=..., this=0x7ffe96bd8288)
12 Eigen::Matrix<double, 3, 3, 0, 3, 3>::Matrix<Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> >(Eigen::CwiseUnaryOp<Eigen::internal::scalar_cast_op<float, double>, Eigen::Matrix<float, 3, 3, 0, 3, 3> const> const&) (x=..., this=0x7ffe96bd8288)
13 ORB_SLAM3::EdgeInertial::EdgeInertial(ORB_SLAM3::IMU::Preintegrated*) (this=0x7ffe96bd7ea0, pInt=0x0) at /home/jyee/ORB_SLAM3/src/G2oTypes.cc:494
14 0x00007ffff7c071e0 in ORB_SLAM3::Optimizer::PoseInertialOptimizationLastFrame(ORB_SLAM3::Frame*, bool)
15 0x00007ffff7b7c2e4 in ORB_SLAM3::Tracking::TrackLocalMap() (this=0x7fff5d64f010) at /home/jyee/ORB_SLAM3/src/Tracking.cc:3003
16 0x00007ffff7b83408 in ORB_SLAM3::Tracking::Track() (this=0x7fff5d64f010) at /home/jyee/ORB_SLAM3/src/Tracking.cc:2145
--Type for more, q to quit, c to continue without paging--c
17 0x00007ffff7b83dcc in ORB_SLAM3::Tracking::GrabImageStereo(cv::Mat const&, cv::Mat const&, double const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) (this=this@entry=0x7fff5d64f010, imRectLeft=..., imRectRight=..., timestamp=@0x7fff3d9ec6c8: 1716372586.3878787, filename="") at /home/jyee/ORB_SLAM3/src/Tracking.cc:1513
18 0x00007ffff7b2c728 in ORB_SLAM3::System::TrackStereo(cv::Mat const&, cv::Mat const&, double const&, std::vector<ORB_SLAM3::IMU::Point, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator >) (this=0x7fffffffc920, imLeft=..., imRight=..., timestamp=@0x7fff3d9ec6c8: 1716372586.3878787, vImuMeas=std::vector of length 0, capacity 0, filename="") at /home/jyee/ORB_SLAM3/src/System.cc:448
19 0x00005555555702b4 in StereoInertialNode::SyncWithImu() (this=0x55555566a490) at /home/jyee/ros2_ws/src/ORB_SLAM3_ROS2/src/stereo-inertial/stereo-inertial-node.cpp:210
20 0x00007ffff4894253 in () at /lib/x86_64-linux-gnu/libstdc++.so.6
21 0x00007ffff4603ac3 in start_thread (arg=) at ./nptl/pthread_create.c:442
22 0x00007ffff4695850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81`