Shutdown_hook in ROS2

I’ve done a deep dive to see what is happening here, and it seems Humble and more recent distros are having issues precisely in that area. It seems like it’s not something you are coding incorrectly, but rather a racy condition that happens that prevents you from publishing any ROS 2 information when there is a keyboardinterrupt.

Here is an interesting open issue related to this:

I don’t know how to go around this issue. I think this issue is related so let’s see if @albertoezquerro has a workaround.

1 Like