Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add types to Action with rhel roscli fix #1361

Open
wants to merge 20 commits into
base: rolling
Choose a base branch
from
Open
Changes from 1 commit
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
17 changes: 9 additions & 8 deletions rclpy/rclpy/action/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,14 +463,15 @@ def unblock(future: Future[Any]) -> None:
send_goal_future.add_done_callback(unblock)

event.wait()
exeception = send_goal_future.exception()
if exeception is not None:
raise exeception
exception = send_goal_future.exception()
if exception is not None:
raise exception

goal_handle = send_goal_future.result()

if goal_handle is None:
InvincibleRMC marked this conversation as resolved.
Show resolved Hide resolved
return None
if not isinstance(goal_handle, ClientGoalHandle):
raise TypeError(
'Expected type ClientGoalHandle but received {}'.format(type(goal_handle)))
InvincibleRMC marked this conversation as resolved.
Show resolved Hide resolved
result = self._get_result(goal_handle)

return result
Expand Down Expand Up @@ -547,9 +548,9 @@ def unblock(future: Future[Any]) -> None:
future.add_done_callback(unblock)

event.wait()
exeception = future.exception()
if exeception is not None:
raise exeception
exception = future.exception()
if exception is not None:
raise exception
return future.result()

def _cancel_goal_async(
Expand Down