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

ros2 param load sets the unexpected parameter value from yaml #863

Open
fujitatomoya opened this issue Oct 27, 2023 · 2 comments
Open

ros2 param load sets the unexpected parameter value from yaml #863

fujitatomoya opened this issue Oct 27, 2023 · 2 comments
Assignees

Comments

@fujitatomoya
Copy link
Collaborator

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04
  • Installation type:
    • source build, rolling
  • Version or commit hash:
  • DDS implementation:
    • Any
  • Client library (if applicable):
    • rclpy, ros2cli

Steps to reproduce issue

  • terminal-1
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run demo_nodes_cpp parameter_blackboard --ros-args -r __ns:=/demo
[INFO] [1698430890.996467163] [demo.parameter_blackboard]: Parameter blackboard node named '/demo/parameter_blackboard' ready, and serving '6' parameters already!
...
  • terminal-2
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 run demo_nodes_cpp parameter_blackboard --ros-args -r __ns:=/foobar
[INFO] [1698430892.707078622] [foobar.parameter_blackboard]: Parameter blackboard node named '/foobar/parameter_blackboard' ready, and serving '6' parameters already!
...
  • terminal-3
root@tomoyafujita:~/ros2_ws/colcon_ws# cat params.yaml 
/foobar/parameter_blackboard:
  ros__parameters:
    test_double: 1e-06
    test: hoge
/demo/parameter_blackboard:
  ros__parameters:
    test_double: 5e-06

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param load /demo/parameter_blackboard params.yaml
Set parameter test_double successful
Set parameter test successful
root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param list /demo/parameter_blackboard
  qos_overrides./parameter_events.publisher.depth
  qos_overrides./parameter_events.publisher.durability
  qos_overrides./parameter_events.publisher.history
  qos_overrides./parameter_events.publisher.reliability
  start_type_description_service
  test
  test_double
  use_sim_time

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param get /demo/parameter_blackboard test
String value is: hoge

root@tomoyafujita:~/ros2_ws/colcon_ws# ros2 param get /demo/parameter_blackboard test_double
String value is: 1e-06

Expected behavior

for /demo/parameter_blackboard, i was expecting only test_double with 5e-06

Actual behavior

/demo/parameter_blackboard is set with the parameters of /foobar/parameter_blackboard siliently.

Additional information

i think rclpy.parameter.parameter_dict_from_yaml_file should be called with targeted remote node name. if wildcard is not enabled, it should generate the exception if it can find /** in the yaml parameter file. and then we can check the target_nodes are actually in the yaml parameter file.

fujitatomoya added a commit to ros2/rclpy that referenced this issue Nov 1, 2023
fujitatomoya added a commit that referenced this issue Nov 1, 2023
@fujitatomoya
Copy link
Collaborator Author

@sloretz
Copy link
Contributor

sloretz commented Nov 16, 2023

@clalancette assigned for you to review 🧇

fujitatomoya added a commit to ros2/demos that referenced this issue Nov 28, 2023
fujitatomoya added a commit that referenced this issue Nov 28, 2023
fujitatomoya added a commit to ros2/rclpy that referenced this issue Nov 28, 2023
adityapande-1995 pushed a commit to ros2/demos that referenced this issue Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants