rtabmap icon indicating copy to clipboard operation
rtabmap copied to clipboard

Termination with SIGTERM will not cleanup rtabmap related topics

Open wakoko79 opened this issue 2 years ago • 1 comments

ROS: Noetic, Ubuntu 20.04 Rtabmap: 0.20.23

Ctrl+C (SIGINT) will make rtabmap do a graceful shutdown. But SIGTERM (kill command, or killing via htop) will just kill it without cleaning.

Rtabmap WILL NOT cleanup published topics (/rtabmap/___ topics) after killing with SIGTERM. So even if the rtabmap process is gone, rostopic list will still show topics published by rtabmap.

I don't know if this behavior is intentional, since the graceful shutdown saves the long-term database and it takes some time to do it. But please at least make rtabmap remove its published topics.

I found this issue while using robot_upstart. Rtabmap is spawned by a separate service while the other parts of the system is in another service. Rtabmap topics remain visible even after kill the rtabmap service.

Killing roscore and reseting roscore will clean the topics, of course.

wakoko79 avatar Feb 09 '23 06:02 wakoko79

I am not used to robot_upstart. In general, if you start the node from another service, make sure this service is forwarding the SIGINT signal to child process, so that rtabmap has time to save the database and exit normally.

matlabbe avatar Apr 15 '23 22:04 matlabbe