Skip to content

Commit

Permalink
Update accessing mapped parameters in README (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
pawelir authored Jan 10, 2025
1 parent 4e92cc4 commit 6d88bc2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.joints_map.at("joint1").interfaces_map.at("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.
Expand Down

0 comments on commit 6d88bc2

Please # to comment.