Currently, when a LoadComposableNodes launch action is executed, it calls the load_node service of a container. If the service returns success=False (e.g., due to a missing plugin, invalid parameters, or a constructor failure), the action logs an error but the launch continues:
|
else: |
|
self.__logger.error( |
|
"Failed to load node '{}' of type '{}' in container '{}': {}".format( |
|
node_name, request.plugin_name, self.__final_target_container_name, |
|
response.error_message |
|
) |
|
) |
In many production cases, if a component fails to load, the entire system is in an invalid state. I would like to propose adding an optional parameter (e.g., on_failure_shutdown=True) to LoadComposableNodes that raises an exception or emits a Shutdown event if any node fails to load.
This would allow users to "fail fast" and avoid having a partially loaded system running unnoticed.
Currently, when a
LoadComposableNodeslaunch action is executed, it calls theload_nodeservice of a container. If the servicereturns success=False(e.g., due to a missing plugin, invalid parameters, or a constructor failure), the action logs an error but the launch continues:launch_ros/launch_ros/launch_ros/actions/load_composable_nodes.py
Lines 179 to 185 in 80e6147
In many production cases, if a component fails to load, the entire system is in an invalid state. I would like to propose adding an optional parameter (e.g.,
on_failure_shutdown=True) toLoadComposableNodesthat raises an exception or emits aShutdownevent if any node fails to load.This would allow users to "fail fast" and avoid having a partially loaded system running unnoticed.