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

[ros2param] Add timeout to ros2param list #469

Merged
merged 1 commit into from
Apr 10, 2020
Merged
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
2 changes: 1 addition & 1 deletion ros2param/ros2param/verb/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def main(self, *, args): # noqa: D102

# wait for all responses
for future in futures.values():
rclpy.spin_until_future_complete(node, future)
rclpy.spin_until_future_complete(node, future, timeout_sec=1.0)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure just ignoring timeout is good enough here. i would add check the FutureReturnCode, and if gets TIMEOUT, notify the user what node's parameter cannot be queried. i would like to hear from others.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, if there is a problem communicating with one of the parameter servers then we should warn the user, but I think we are getting some feedback with the "exception" printed at L104.


# print responses
for node_name in sorted(futures.keys()):
Expand Down