Skip to content

Commit c08b666

Browse files
committed
Do not use event handler for loading composable nodes
Fixes #114. Due to the asynchronous nature of the LoadComposableNodes action, an event handler causes the launch configuration is popped if ComposableNodeContainer appears inside a group or include action. It seems to me we can simply return the load node action, which will get executed after the ComposableNodeContainer action. The use of an event handler is vestigial of a refactoring done in #16, and doesn't appear to be necessary. Signed-off-by: Jacob Perron <[email protected]>
1 parent 074bdac commit c08b666

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

launch_ros/launch_ros/actions/composable_node_container.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,17 +92,17 @@ def execute(self, context: LaunchContext) -> Optional[List[Action]]:
9292
from .load_composable_nodes import LoadComposableNodes
9393
# Perform load action once the container has started.
9494
load_actions = [
95-
RegisterEventHandler(
96-
event_handler=OnProcessStart(
97-
target_action=self,
98-
on_start=[
95+
# RegisterEventHandler(
96+
# event_handler=OnProcessStart(
97+
# target_action=self,
98+
# on_start=[
9999
LoadComposableNodes(
100100
composable_node_descriptions=self.__composable_node_descriptions,
101101
target_container=self
102102
)
103-
]
104-
)
105-
)
103+
# ]
104+
# )
105+
# )
106106
]
107107
container_actions = super().execute(context) # type: Optional[List[Action]]
108108
if container_actions is not None and load_actions is not None:

0 commit comments

Comments
 (0)