From b093f2f276ccd2473d2fbc2c61757f7a04ef4ce7 Mon Sep 17 00:00:00 2001 From: Tomoya Fujita Date: Thu, 2 Nov 2023 13:44:23 -0700 Subject: [PATCH] fix loading parameter behavior from yaml file. Ref: https://github.com/ros2/ros2cli/issues/863 Signed-off-by: Tomoya Fujita --- demo_nodes_py/demo_nodes_py/parameters/async_param_client.py | 3 ++- demo_nodes_py/demo_nodes_py/parameters/params.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/demo_nodes_py/demo_nodes_py/parameters/async_param_client.py b/demo_nodes_py/demo_nodes_py/parameters/async_param_client.py index 1893d29e1..1c1e9046c 100644 --- a/demo_nodes_py/demo_nodes_py/parameters/async_param_client.py +++ b/demo_nodes_py/demo_nodes_py/parameters/async_param_client.py @@ -73,7 +73,8 @@ def main(args=None): rclpy.spin_until_future_complete(node, future) load_parameter_results = future.result() if load_parameter_results is not None: - param_file_dict = parameter_dict_from_yaml_file(param_file_path) + param_file_dict = parameter_dict_from_yaml_file( + param_file_path, False, target_nodes=['parameter_blackboard']) for i, v in enumerate(param_file_dict.keys()): node.get_logger().info(f' {v}:') node.get_logger().info(f' successful: ' diff --git a/demo_nodes_py/demo_nodes_py/parameters/params.yaml b/demo_nodes_py/demo_nodes_py/parameters/params.yaml index 768ddfd8e..962581ebb 100644 --- a/demo_nodes_py/demo_nodes_py/parameters/params.yaml +++ b/demo_nodes_py/demo_nodes_py/parameters/params.yaml @@ -1,4 +1,4 @@ -/param_test_target: +/parameter_blackboard: ros__parameters: other_int_parameter: 0 int_parameter: 12