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 support for parameter prefixes in ros2 param list #131

Merged
merged 2 commits into from Aug 9, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions ros2param/ros2param/verb/list.py
Expand Up @@ -36,6 +36,9 @@ def add_arguments(self, parser, cli_name): # noqa: D102
parser.add_argument(
'--include-hidden-nodes', action='store_true',
help='Consider hidden nodes as well')
parser.add_argument(
'--param-prefixes', nargs='+', default=[],
help='Only list parameters with the provided prefixes')

def main(self, *, args): # noqa: D102
with NodeStrategy(args) as node:
Expand Down Expand Up @@ -64,6 +67,8 @@ def main(self, *, args): # noqa: D102
client = clients[node_name]
if client.service_is_ready():
request = ListParameters.Request()
for prefix in args.param_prefixes:
request.prefixes.append(prefix)
future = client.call_async(request)
futures[node_name] = future

Expand Down