launch.condition module

Module for Condition class.

class launch.condition.Condition[source]

Bases: object

Encapsulates a condition to be evaluated when launching.

The given predicate receives a launch context and is evaluated while launching, but must return True or False.

If a predicate is not set when evaluated, False is returned.

__init__(*, predicate: Callable[[LaunchContext], bool] | None = None) None[source]
describe() str[source]

Return a description of this Condition.

evaluate(context: LaunchContext) bool[source]

Evaluate the condition.