Skip to content

[launch] add new Action called GroupAction #106

@wjwwood

Description

@wjwwood

Previously I had described a "Group" or "Group of Actions" as a separate entity from "Action", but since then I think we can just have a special Action that yields other actions and optionally does things like pushes/pops the launch configurations and set/unset specific launch configurations.

I believe the action I've described is capable of fulfilling the use cases I originally imagined for groups:

  • push containing nodes into a namespace
    • would be done by modifying the ros_namespace LaunchConfiguration that affects only the actions it yields
  • conditionally include other launch descriptions or actions
  • scope arbitrary launch configurations
    • done by using the LaunchContext to push and pop them
      • see:
        def _push_launch_configurations(self):
        self.__launch_configurations_stack.append(dict(self.__launch_configurations))
        def _pop_launch_configurations(self):
        if not self.__launch_configurations_stack:
        raise RuntimeError('launch_configurations stack unexpectedly empty')
        self.__launch_configurations = self.__launch_configurations_stack.pop()
        @property
        def launch_configurations(self) -> Dict[Text, Text]:
        """Getter for launch_configurations dictionary."""
        return self.__launch_configurations

We should also update the design document (ros2/design#163).

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions