|
Python YASMIN (Yet Another State MachINe)
|


Public Member Functions | |
| None | __init__ (self) |
| NavigateToPose.Goal | create_goal_handler (self, Blackboard blackboard) |
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 | |
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. | |
ActionState for navigating to a specified pose using ROS 2 Navigation.
Attributes:
None
Methods:
create_goal_handler(blackboard: Blackboard) -> NavigateToPose.Goal:
Creates the navigation goal from the blackboard.
| None yasmin_demos.nav_demo.Nav2State.__init__ | ( | self | ) |
Initializes the Nav2State. Calls the parent constructor to set up the action with: - Action type: NavigateToPose - Action name: /navigate_to_pose - Callback for goal creation: create_goal_handler - Outcomes: None, since it will use default outcomes (SUCCEED, ABORT, CANCEL)
| NavigateToPose.Goal yasmin_demos.nav_demo.Nav2State.create_goal_handler | ( | self, | |
| Blackboard | blackboard ) |
Creates a goal for navigation based on the current pose in the blackboard.
Args:
blackboard (Blackboard): The blackboard instance holding current state data.
Returns:
NavigateToPose.Goal: The constructed goal for the navigation action.
| yasmin_demos.nav_demo.Nav2State.create_goal_handler |