|
Python YASMIN (Yet Another State MachINe)
|


Public Member Functions | |
| None | __init__ (self) |
| Fibonacci.Goal | create_goal_handler (self, Blackboard blackboard) |
| str | response_handler (self, Blackboard blackboard, Fibonacci.Result response) |
| None | print_feedback (self, Blackboard blackboard, Fibonacci.Feedback feedback) |
Public Member Functions inherited from yasmin_ros.action_state.ActionState | |
| None | __init__ (self, Type action_type, str action_name, Callable create_goal_handler, Set[str] outcomes=None, Callable result_handler=None, Callable feedback_handler=None, Node node=None, float timeout=None) |
| None | cancel_state (self) |
| str | execute (self, Blackboard blackboard) |
Public Member Functions inherited from yasmin.state.State | |
| None | __init__ (self, Set[str] outcomes) |
| str | __call__ (self, Blackboard blackboard=None) |
| str | __str__ (self) |
| bool | is_canceled (self) |
| bool | is_running (self) |
| Set[str] | get_outcomes (self) |
Public Attributes | |
| create_goal_handler | |
| response_handler | |
| print_feedback | |
Additional Inherited Members | |
Protected Member Functions inherited from yasmin_ros.action_state.ActionState | |
| None | _goal_response_callback (self, Future future) |
| None | _get_result_callback (self, Future future) |
Protected Attributes inherited from yasmin_ros.action_state.ActionState | |
| Event | _action_done_event = Event() |
| Event used to wait for action completion. | |
| Any | _action_result = None |
| The result returned by the action server. | |
| GoalStatus | _action_status = None |
| The status of the action execution. | |
| ClientGoalHandle | _goal_handle = None |
| Handle for the goal sent to the action server. | |
| RLock | _goal_handle_lock = RLock() |
| Lock to manage access to the goal handle. | |
| Callable[[Blackboard], Any] | _create_goal_handler = create_goal_handler |
| Function that creates the goal to send. | |
| Callable[[Blackboard, Any], str] | _result_handler = result_handler |
| Function to handle the result from the action server. | |
| Callable[[Blackboard, Any], None] | _feedback_handler = feedback_handler |
| Function to handle feedback from the action server. | |
| float | _timeout = timeout |
| Timeout duration for waiting for the action server. | |
| Node | _node = node |
| The ROS 2 node instance used to communicate with the action server. | |
| str | _action_name = action_name |
| The name of the action to be performed. | |
| ActionClient | _action_client |
| The action client used to send goals. | |
| _goal_response_callback | |
| _get_result_callback = self._goal_handle.get_result_async() | |
Protected Attributes inherited from yasmin.state.State | |
| Set | _outcomes = set() |
| A set of valid outcomes for this state. | |
| bool | _running = False |
| A flag indicating whether the state is currently running. | |
| bool | _canceled = False |
| A flag indicating whether the state has been canceled. | |
Class representing the state of the Fibonacci action.
Inherits from ActionState and implements methods to handle the
Fibonacci action in a finite state machine.
Attributes:
None
| None yasmin_demos.action_client_demo.FibonacciState.__init__ | ( | self | ) |
Initializes the FibonacciState.
Sets up the action type and the action name for the Fibonacci
action. Initializes goal, response handler, and feedback
processing callbacks.
Parameters:
None
Returns:
None
| Fibonacci.Goal yasmin_demos.action_client_demo.FibonacciState.create_goal_handler | ( | self, | |
| Blackboard | blackboard ) |
Creates the goal for the Fibonacci action.
This method retrieves the input value from the blackboard and
populates the Fibonacci goal.
Parameters:
blackboard (Blackboard): The blackboard containing the state
information.
Returns:
Fibonacci.Goal: The populated goal object for the Fibonacci action.
Raises:
KeyError: If the expected key is not present in the blackboard.
| None yasmin_demos.action_client_demo.FibonacciState.print_feedback | ( | self, | |
| Blackboard | blackboard, | ||
| Fibonacci.Feedback | feedback ) |
Prints feedback from the Fibonacci action.
This method logs the partial sequence received during the action.
Parameters:
blackboard (Blackboard): The blackboard (not used in this method).
feedback (Fibonacci.Feedback): The feedback object from the Fibonacci action.
Returns:
None
Raises:
None
| str yasmin_demos.action_client_demo.FibonacciState.response_handler | ( | self, | |
| Blackboard | blackboard, | ||
| Fibonacci.Result | response ) |
Handles the response from the Fibonacci action.
This method processes the result of the Fibonacci action and
stores it in the blackboard.
Parameters:
blackboard (Blackboard): The blackboard to store the result.
response (Fibonacci.Result): The result object from the Fibonacci action.
Returns:
str: Outcome of the operation, typically SUCCEED.
Raises:
None
| yasmin_demos.action_client_demo.FibonacciState.create_goal_handler |
| yasmin_demos.action_client_demo.FibonacciState.print_feedback |
| yasmin_demos.action_client_demo.FibonacciState.response_handler |