Python YASMIN (Yet Another State MachINe)
Loading...
Searching...
No Matches
yasmin_demos.service_client_demo Namespace Reference

Classes

class  AddTwoIntsState
 

Functions

str set_ints (Blackboard blackboard)
 
str print_sum (Blackboard blackboard)
 
 main ()
 

Function Documentation

◆ main()

yasmin_demos.service_client_demo.main ( )
The main function to execute the finite state machine (FSM).

This function initializes the ROS 2 environment, sets up logging,
creates the FSM with defined states, and executes the FSM.

Raises:
    KeyboardInterrupt: If the user interrupts the program.

◆ print_sum()

str yasmin_demos.service_client_demo.print_sum ( Blackboard blackboard)
Logs the sum value from the blackboard.

This function retrieves the sum from the blackboard and logs it.

Args:
    blackboard (Blackboard): The blackboard from which to retrieve the sum.

Returns:
    str: The outcome of the operation, which is SUCCEED.

◆ set_ints()

str yasmin_demos.service_client_demo.set_ints ( Blackboard blackboard)
Sets the integer values in the blackboard.

This function initializes the blackboard with two integer values to be added.

Args:
    blackboard (Blackboard): The blackboard to update with integer values.

Returns:
    str: The outcome of the operation, which is SUCCEED.