From e76ade4496b75c98dabbc667c80725571abf96cf Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Mon, 12 Oct 2020 15:28:27 -0700 Subject: [PATCH 1/2] Describe wildcard usage in parameter files Wildcards were introduced in https://github.com/ros2/rclcpp/pull/762 And further usage proposed in https://github.com/ros2/rclcpp/issues/1265. Signed-off-by: Jacob Perron --- articles/160_ros_command_line_arguments.md | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/articles/160_ros_command_line_arguments.md b/articles/160_ros_command_line_arguments.md index 968a5b3d7..097997298 100644 --- a/articles/160_ros_command_line_arguments.md +++ b/articles/160_ros_command_line_arguments.md @@ -167,6 +167,39 @@ another_node: string_param: bar ``` +Wildcards can be used for node names and namespaces as described in [Remapping Names](static_remapping.html#match-part-of-a-rule). +`*` matches a single token delimeted by slashes (`/`). +`**` matches zero or more tokens delimeted by slashes. +Partial matches are not allowed (e.g. `foo*`). + +For example, + +```yaml +/**: + ros__parameters: + string_param: foo +``` + +will set the parameter `string_param` on all nodes, + +```yaml +/**: + some_node: + ros__parameters: + string_param: foo +``` + +will set the parameter `string_param` on nodes named `some_node` in any namespace, + +```yaml +/foo: + "*": + ros__parameters: + string_param: foo +``` + +will set the parameter `string_param` on any node in the namespace `/foo`. + #### Logging level assignments Minimum logging level can be externally set either globally or per logger using the `--log-level` option. From cc6c0ff75423fea316107f31264ba2fd72adce58 Mon Sep 17 00:00:00 2001 From: Jacob Perron Date: Tue, 13 Oct 2020 09:52:02 -0700 Subject: [PATCH 2/2] Reformat examples Signed-off-by: Jacob Perron --- articles/160_ros_command_line_arguments.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/articles/160_ros_command_line_arguments.md b/articles/160_ros_command_line_arguments.md index 097997298..060ea654e 100644 --- a/articles/160_ros_command_line_arguments.md +++ b/articles/160_ros_command_line_arguments.md @@ -183,8 +183,7 @@ For example, will set the parameter `string_param` on all nodes, ```yaml -/**: - some_node: +/**/some_node: ros__parameters: string_param: foo ``` @@ -192,8 +191,7 @@ will set the parameter `string_param` on all nodes, will set the parameter `string_param` on nodes named `some_node` in any namespace, ```yaml -/foo: - "*": +/foo/*: ros__parameters: string_param: foo ```