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

fix: turn stop

parent e8d738cb
No related branches found
No related tags found
No related merge requests found
......@@ -104,6 +104,7 @@ class TurnActionClientAsync(Node):
return
cancel_future = self._goal_handle.cancel_goal_async()
logger.debug("Canceling turn request!")
cancel_future.add_done_callback(self._cancel_response_callback)
def is_turn_goal_active(self) -> bool:
......@@ -112,6 +113,8 @@ class TurnActionClientAsync(Node):
:return: True if the turn goal is active, False otherwise.
"""
logger.debug("Checking if turn goal is active! Status: %s", self._status)
return (self._status != GoalStatus.STATUS_SUCCEEDED
and self._status != GoalStatus.STATUS_ABORTED)
......@@ -176,7 +179,7 @@ class TurnController:
self._turn_action_client.send_turn_goal_async(theta)
while (self._turn_action_client.is_turn_goal_active() and rclpy.ok()):
while (self._turn_action_client.is_turn_goal_active()):
logger.debug("Waiting for Turn action request %f to succeed.", theta)
rclpy.spin_once(self._turn_action_client)
......
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