Skip to content
Snippets Groups Projects
Commit 19ec2d8f authored by Louis Kevin Fink's avatar Louis Kevin Fink
Browse files

fix: turn action cancel

parent 728c31f7
No related branches found
No related tags found
No related merge requests found
......@@ -144,8 +144,12 @@ class TurnController:
self._turn_action_client.send_turn_goal_async(theta)
while self._turn_action_client.status != GoalStatus.STATUS_SUCCEEDED:
logger.debug("Waiting for Turn action request %f to succeed.", theta)
rclpy.spin_once(self._turn_action_client)
try:
while self._turn_action_client.status != GoalStatus.STATUS_SUCCEEDED and rclpy.ok():
logger.debug("Waiting for Turn action request %f to succeed.", theta)
rclpy.spin_once(self._turn_action_client)
except KeyboardInterrupt:
logger.warning("Turn action request %f was interrupted!", theta)
raise
self._turn_action_client.cleanup()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment