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.09k stars 2.25k forks source link

node_mian.cc use ros::AsyncSpinner instead of ::ros::spin() #1811

Closed PeakDing closed 3 years ago

PeakDing commented 3 years ago

Hello, Google author: I have a question ,in node_mian.cc at cartographer_ros, I use ros::AsyncSpinner instead of ::ros::spin(), my code is below ros::AsyncSpinner async_spinner(2); async_spinner.start(); ::ros::waitForShutdown(); The problem is sometimes the project would be crash randomly.

MichaelGrupp commented 3 years ago

Since we only use ros::spin(), there's no guarantee that an async spinner would work or support for that from our side. You need to debug this yourself if you really want to use an async spinner in your fork.

Note: this is related to cartographer_ros, not cartographer library.