|
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, CallbackGroup callback_group=None, Node node=None, float wait_timeout=None, float response_timeout=None, int maximum_retry=3) |
| None | cancel_state (self) |
| str | execute (self, Blackboard blackboard) |
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 |
| Shared pointer to the action result. | |
| GoalStatus | _action_status = None |
| Status of the action execution. | |
| ClientGoalHandle | _goal_handle = None |
| Handle for the current goal. | |
| RLock | _goal_handle_lock = RLock() |
| Lock to manage access to the goal handle. | |
| Callable[[Blackboard], Any] | _create_goal_handler = create_goal_handler |
| Handler function for creating goals. | |
| Callable[[Blackboard, Any], str] | _result_handler = result_handler |
| Handler function for processing results. | |
| Callable[[Blackboard, Any], None] | _feedback_handler = feedback_handler |
| Handler function for processing feedback. | |
| float | _wait_timeout = wait_timeout |
| Maximum time to wait for the action server. | |
| float | _response_timeout = response_timeout |
| Timeout for the action response. | |
| int | _maximum_retry = maximum_retry |
| Maximum number of retries. | |
| Node | _node = node |
| Shared pointer to the ROS 2 node. | |
| str | _action_name = action_name |
| Name of the action to communicate with. | |
| Type | _action_type = action_type |
| Action type for caching. | |
| ActionClient | _action_client |
| Shared pointer to the action client (reused from cache if available). | |
| _goal_response_callback | |
| _get_result_callback = self._goal_handle.get_result_async() | |
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.
Args:
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.
Args:
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.
Args:
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.
Args:
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 |