Skip to content

Commit

Permalink
remove redundant import and redundent exit status
Browse files Browse the repository at this point in the history
  • Loading branch information
Richardvdketterij committed Feb 12, 2024
1 parent f997cde commit 679321a
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions smach_ros/smach_ros/simple_action_state.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
import rclpy
import rclpy.time
from rclpy.duration import Duration
import rclpy.action
from rclpy.action.client import GoalStatus
Expand Down Expand Up @@ -236,8 +235,7 @@ def _execution_timer(self):
try:
# Check for preemption while checking for timeout
if self.preempt_requested():
self.node.get_logger().info(
f"Preempting while waiting for goal (request) result '{self._action_name}'.")
self.node.get_logger().info(f"Preempting while waiting for goal (request) result '{self._action_name}'.")
self._status = ActionState.CANCELED
with self._done_cond:
self._done_cond.notify()
Expand Down Expand Up @@ -418,9 +416,6 @@ def execute(self, ud):
if self.preempt_requested():
self.service_preempt()
outcome = 'preempted'
elif self._status == ActionState.INACTIVE:
# Aborted via execution timeout
outcome = 'aborted'
elif self._status == ActionState.CANCELING:
# Preempting or exec timeout but goal not cancelled
outcome = 'aborted'
Expand Down

0 comments on commit 679321a

Please sign in to comment.