cartographer-project / cartographer

Cartographer is a system that provides real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and sensor configurations.
Apache License 2.0
7.03k stars 2.24k forks source link

cartographer::mapping::PoseExtrapolator::AddOdometryData(cartographer::sensor::OdometryData const&) CRASHED!!! #1873

Open Ping-Ju opened 2 years ago

Ping-Ju commented 2 years ago

I've been using cartographer since last year and it worked fine when I only had raw data of LiDAR. I tried to add odometry (calculate from motors based on encoder) on this, but it crashed sometimes (moving or idle). It gave me the following contents.

I am wondering why when I add odometry and it crashed randomly? For anyone who can help to answer, thanks ahead!


Core was generated by `/catkin_ws/lib/cartographer_ros/cartographer_node -configuration_directory'. Program terminated with signal SIGABRT, Aborted. (gdb) where

0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51

1 0x00007f42de171921 in __GI_abort () at abort.c:79

2 0x00007f42e11f14e7 in ?? () from /usr/lib/x86_64-linux-gnu/libglog.so.0

3 0x00007f42e11e80cd in google::LogMessage::Fail() () from /usr/lib/x86_64-linux-gnu/libglog.so.0

4 0x00007f42e11e9f33 in google::LogMessage::SendToLog() ()

from /usr/lib/x86_64-linux-gnu/libglog.so.0

5 0x00007f42e11e7c28 in google::LogMessage::Flush() () from /usr/lib/x86_64-linux-gnu/libglog.so.0

6 0x00007f42e11ea999 in google::LogMessageFatal::~LogMessageFatal() ()

from /usr/lib/x86_64-linux-gnu/libglog.so.0

7 0x000055b43caf76a0 in cartographer::mapping::PoseExtrapolator::AddOdometryData(cartographer::sensor::OdometryData const&) ()

8 0x000055b43c9f7266 in cartographer_ros::Node::HandleOdometryMessage (this=0x55b43db5df10,

trajectory_id=5, sensor_id="odom", msg=...)
at /home/ros/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/node.cc:779

9 0x000055b43c9f8bcf in operator() (this=0x55b44795c4f0, msg=...)

at /home/ros/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/node.cc:73

10 0x000055b43c9fa9f4 in boost::detail::function::void_function_obj_invoker1<cartographer_ros::(anonymous namespace)::SubscribeWithHandler<navmsgs::Odometry<std::allocator > >::<lambda(const ConstPtr&)>, void, const boost::shared_ptr<const navmsgs::Odometry<std::allocator > >&>::invoke(boost::detail::function::function_buffer &, const boost::shared_ptr<navmsgs::Odometry<std::allocator > const> &) (function_obj_ptr=..., a0=...)

at /usr/include/boost/function/function_template.hpp:159

11 0x000055b43ca46fa4 in boost::function1<void, boost::shared_ptr<navmsgs::Odometry<std::allocator---Type to continue, or q to quit---

> const> const&>::operator() (this=0x55b43db3e440, a0=...) at /usr/include/boost/function/function_template.hpp:759 #12 0x000055b43ca41a66 in boost::detail::function::void_function_obj_invoker1 > const> const&)>, void, boost::shared_ptr > const> >::invoke(boost::detail::function::function_buffer&, boost::shared_ptr > const>) (function_obj_ptr=..., a0=...) at /usr/include/boost/function/function_template.hpp:159 #13 0x000055b43ca57ed3 in boost::function1 > const> >::operator() (this=0x55b4491679c8, a0=...) at /usr/include/boost/function/function_template.hpp:759 #14 0x000055b43ca54381 in ros::SubscriptionCallbackHelperT > const> const&, void>::call (this=0x55b4491679c0, params=...) at /opt/ros/melodic/include/ros/subscription_callback_helper.h:144 #15 0x00007f42df85e422 in ros::SubscriptionQueue::call() () from /opt/ros/melodic/lib/libroscpp.so #16 0x00007f42df808d99 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS*) () from /opt/ros/melodic/lib/libroscpp.so #17 0x00007f42df80ab0b in ros::CallbackQueue::callAvailable(ros::WallDuration) () from /opt/ros/melodic/lib/libroscpp.so #18 0x00007f42df861fc9 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue*) () from /opt/ros/melodic/lib/libroscpp.so #19 0x00007f42df84a92b in ros::spin() () from /opt/ros/melodic/lib/libroscpp.so #20 0x000055b43c9d9031 in cartographer_ros::(anonymous namespace)::Run () at /home/ros/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/node_main.cc:199 ---Type to continue, or q to quit--- #21 0x000055b43c9d94d9 in main (argc=1, argv=0x7ffc25efa398) at /home/ros/catkin_ws/src/cartographer_ros/cartographer_ros/cartographer_ros/node_main.cc:226