Skip to content

Commit

Permalink
Fix flaky ros2 param list (#656) (#664)
Browse files Browse the repository at this point in the history
* Use daemon for listing parameter services

This helps avoid incomplete parameter lists due to races with discovery.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
  • Loading branch information
jacobperron committed Sep 9, 2021
1 parent 7f36483 commit 1081bbc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ros2param/ros2param/verb/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,11 @@ def main(self, *, args): # noqa: D102
node_names = [
n for n in node_names if node_name == n.full_name]

with DirectNode(args) as node:
with NodeStrategy(args) as node:
service_names = get_service_names(
node=node, include_hidden_services=args.include_hidden_nodes)

with DirectNode(args) as node:
clients = {}
futures = {}
# create clients for nodes which have the service
Expand Down

0 comments on commit 1081bbc

Please sign in to comment.