LoadComposableNodes: unload on shutdown#441
Conversation
Signed-off-by: rayferric <63957587+rayferric@users.noreply.github.com>
7fbc418 to
2a0d453
Compare
Signed-off-by: rayferric <63957587+rayferric@users.noreply.github.com>
|
@rayferric could you please provide some details about the use-case for this? |
Of course! The usecase:This feature is useful when you split the development workflow into two launch files - one for simulation/rviz and another for the navigation stack. In such setup you can keep restarting the stack quickly without having to wait for gui programs to initialize. Then if you'd want to have a high end multi-camera robot in the simulation, the obvious choice is to compose the simulator with your image processing pipeline. So in order to keep your simulation in a separate launch file, you'd start the container there and the simulator would be a ComposableNode. Then you could load the rest of your image processing stack from the second launch file using LoadComposableNodes. The problem with vanilla LoadComposableNodes is that it exits immediately and doesn't allow you to unload the nodes in any way. My PR adds an optional switch to the action that will make it keep the launch process alive and once the user sends a SIGINT, the action will unload all previously inserted nodes. Why not the default?I wanted to keep this feature non-invasive, thus I created an optional flag for it. |
|
Ok, thanks for the explanation. This feature absolutely needs to be optional (i.e. controlled by a flag), as keeping the launch process alive is a major change. I'll do a review in the next days, thanks for the context. |
Added a new optional
unload_on_shutdownargument toLoadComposableNodes.If
True, the action will unload the associated nodes from the container on exit.