yasmin_demos.yasmin_demo module

class yasmin_demos.yasmin_demo.BarState(*args: Any, **kwargs: Any)

Bases: State

Represents the Bar state in the state machine.

execute(blackboard: yasmin.Blackboard) str

Executes the logic for the Bar state.

Args:

blackboard (Blackboard): The shared data structure for states.

Returns:

str: The outcome of the execution, which will always be “outcome3”.

Raises:

Exception: May raise exceptions related to state execution.

class yasmin_demos.yasmin_demo.FooState(*args: Any, **kwargs: Any)

Bases: State

Represents the Foo state in the state machine.

Attributes:

counter (int): Counter to track the number of executions of this state.

execute(blackboard: yasmin.Blackboard) str

Executes the logic for the Foo state.

Args:

blackboard (Blackboard): The shared data structure for states.

Returns:

str: The outcome of the execution, which can be “outcome1” or “outcome2”.

Raises:

Exception: May raise exceptions related to state execution.

yasmin_demos.yasmin_demo.main()

The main entry point of the application.

Initializes the ROS 2 environment, sets up the state machine, and handles execution and termination.

Raises:

KeyboardInterrupt: If the execution is interrupted by the user.