diff --git a/smach_ros/smach_ros/simple_action_state.py b/smach_ros/smach_ros/simple_action_state.py index 1931aed..812590b 100644 --- a/smach_ros/smach_ros/simple_action_state.py +++ b/smach_ros/smach_ros/simple_action_state.py @@ -58,6 +58,7 @@ class ActionState(Enum): CANCELING = 3 CANCELED = 4 COMPLETED = 5 + ABORTED = 6 class SimpleActionState(RosState): @@ -453,7 +454,7 @@ def execute(self, ud): if self.preempt_requested(): self.service_preempt() outcome = 'preempted' - elif self._status == ActionState.CANCELING: + elif self._status == ActionState.CANCELING or self._status == ActionState.ABORTED: # Preempting or exec timeout but goal not cancelled outcome = 'aborted' else: @@ -531,7 +532,7 @@ def get_result_str(i): elif self._goal_status == GoalStatus.STATUS_CANCELED: self._status = ActionState.CANCELED elif self._goal_status == GoalStatus.STATUS_ABORTED: - self._status = ActionState.CANCELED + self._status = ActionState.ABORTED self.node.get_logger().debug(f"Goal completed: {self._client_goal_handle}")