Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion smach_ros/smach_ros/simple_action_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,8 @@ def execute(self, ud):
# Activate the state before sending the goal
self._activate_time = self.node.get_clock().now()
self._status = ActionState.ACTIVE
self._goal_result = None
self._goal_status = None

with self._done_cond:
# Dispatch goal via non-blocking call to action server
Expand All @@ -368,7 +370,9 @@ def execute(self, ud):
self._execution_timer_thread.start()

# Wait for action to finish
self._done_cond.wait()
while self._goal_result is None:
rclpy.spin_once(self.node)
time.sleep(0.01)

# Call user result callback if defined
result_cb_outcome = None
Expand Down