launch.actions.opaque_function module

Module for the OpaqueFunction action.

class launch.actions.opaque_function.OpaqueFunction[source]

Bases: Action

Action that executes a Python function.

The signature of the function should be:

def function(
    context: LaunchContext,
    *args,
    **kwargs
) -> Optional[List[LaunchDescriptionEntity]]:
    ...
__init__(*, function: Callable, args: Iterable[Any] | None = None, kwargs: Dict[str, Any] | None = None, **left_over_kwargs) None[source]

Create an OpaqueFunction action.

execute(context: LaunchContext) List[LaunchDescriptionEntity] | None[source]

Execute the action.