From 04f234b75e492e476c8e68eb85685f6b215c123e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Irzyk?= <83344667+pawelir@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:18:39 +0100 Subject: [PATCH 1/2] Update accessing nested params in README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 17ece4c3..48eea127 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,7 @@ cpp_name_space: type: double_array ``` -The generated parameter value for the nested map example can then be accessed with `params.gain.joints_map.at("joint1").interfaces_map.at("position").value`. +The generated parameter value for the nested map example can then be accessed with `params.gain.get_entry("joint1").get_entry("position").value`. ### Use generated struct in Cpp The generated header file is named based on the target library name you passed as the first argument to the cmake function. From d0fd9494284fd31bb3b517718b28f696f1fb947a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Irzyk?= <83344667+pawelir@users.noreply.github.com> Date: Fri, 10 Jan 2025 13:26:50 +0100 Subject: [PATCH 2/2] Distinguish cpp and python syntax for mapped params --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 48eea127..b61a2a73 100644 --- a/README.md +++ b/README.md @@ -350,7 +350,19 @@ cpp_name_space: type: double_array ``` -The generated parameter value for the nested map example can then be accessed with `params.gain.get_entry("joint1").get_entry("position").value`. +The generated parameter value for the nested map example can then be accessed with: + +**C++** + +```c++ +params.gain.joints_map.at("joint1").interfaces_map.at("position").value +``` + +**Python** + +```python +params.gain.get_entry("joint1").get_entry("position").value +``` ### Use generated struct in Cpp The generated header file is named based on the target library name you passed as the first argument to the cmake function.