-
Notifications
You must be signed in to change notification settings - Fork 474
Description
Bug report
Required Info:
- Operating System:
- Ubuntu 18.04
- Installation type:
- Binaries
- Version or commit hash:
- Eloquent (mostly 0.8.1)
- Client library (if applicable):
- rclcpp
Steps to reproduce issue
-
Write a parameter YAML file,
explicit_params.yaml
, settinguse_sim_time
explicitly referring to a node:talker: ros__parameters: use_sim_time: false
-
Write a parameter YAML file,
wildcard_params.yaml
, settinguse_sim_time
implicitly using wildcards:/**: ros__parameters: use_sim_time: true
-
Run a
talker
node:-
Passing the parameter YAML file using wildcards first:
ros2 run demo_nodes_cpp talker --ros-args --params-file path/to/wildcard_params.yaml --params-file path/to/explicit_params.yaml
-
Passing the parameter YAML file being explicit first:
ros2 run demo_nodes_cpp talker --ros-args --params-file path/to/explicit_params.yaml --params-file path/to/wildcard_params.yaml
-
Expected behavior
I'm not sure if we've ever fully specified behavior when using wildcards.
-
If wildcards have lower precedence than fully qualified names, command line order should not matter i.e.
use_sim_time
alwaysfalse
. -
If command line order is respected,
use_sim_time
should befalse
in the first case,true
in the second case.
Actual behavior
First given override wins.
Additional information
This is inconsistent with how it works for rclpy
nodes, where command line order is respected. Looking at both rclpy
and rclcpp
implementations, it looks behavior emerged by pure chance. We should probably be matching wildcards where we can enforce a consistent precedence, down in rcl
.