launch.actions.group_action module
Module for the GroupAction action.
- class launch.actions.group_action.GroupAction[source]
Bases:
Action
Action that yields other actions.
This action is used to nest other actions without including a separate launch description, while also optionally having a condition (like all other actions), scoping and forwarding launch configurations and environment variables, and/or declaring launch configurations for just the group and its yielded actions.
When scoped=True, changes to launch configurations and environment variables are limited to the scope of actions in the group action.
When scoped=True and forwarding=True, all existing launch configurations and environment variables are available in the scoped context.
When scoped=True and forwarding=False, all existing launch configurations and environment variables are removed from the scoped context.
Any launch configuration defined in the launch_configurations dictionary will be set in the current context. When scoped=False these configurations will persist even after the GroupAction has completed. When scoped=True these configurations will only be available to actions in the GroupAction. When scoped=True and forwarding=False, the launch_configurations dictionary is evaluated before clearing, and then re-set in the cleared scoped context.
- __init__(actions: Iterable[Action], *, scoped: bool = True, forwarding: bool = True, launch_configurations: Dict[str | Substitution | Iterable[str | Substitution], str | Substitution | Iterable[str | Substitution]] | None = None, **left_over_kwargs) None [source]
Create a GroupAction.
- execute(context: LaunchContext) List[LaunchDescriptionEntity] | None [source]
Execute the action.
- get_sub_entities() List[LaunchDescriptionEntity] [source]
Return subentities.