robokudo.behaviours.goal_canceled¶
Goal cancellation behavior for RoboKudo behavior trees.
This module provides a behavior that checks for goal cancellation by monitoring error states on the behavior tree’s blackboard. It is used to:
Detect when goals should be canceled due to errors
Provide clean termination of action sequences
Support error handling in action servers
The behavior integrates with RoboKudo’s error handling system to detect conditions that should trigger goal cancellation.
Classes¶
A behavior that detects when goals should be canceled due to errors. |
Module Contents¶
- class robokudo.behaviours.goal_canceled.GoalCanceled(name='GoalCanceled')¶
-
Bases:
py_trees.BehaviourA behavior that detects when goals should be canceled due to errors.
This behavior monitors the blackboard for error states and returns: * SUCCESS if an error is detected, indicating the goal should be canceled * FAILURE if no errors are present, indicating the goal can continue
It is typically used in action server implementations to handle error conditions and provide clean goal cancellation.
- initialise()¶
-
Initialize the behavior.
This method is called when the behavior is first ticked. No initialization is needed for this behavior.
- update() py_trees.common.Status¶
-
Check if the current goal should be canceled.
This method: * Checks for error states on the blackboard * Returns SUCCESS if an error is found (goal should be canceled) * Returns FAILURE if no errors are present (goal can continue)
- Returns:
-
SUCCESS if goal should be canceled, FAILURE otherwise
- Return type:
-
py_trees.common.Status