Fix nested mapped parameters map#306
Fix nested mapped parameters map#306christophfroehlich merged 13 commits intoPickNikRobotics:mainfrom
Conversation
1664af6 to
7fef7cf
Compare
christophfroehlich
left a comment
There was a problem hiding this comment.
Can you please have a look at the failing CI jobs?
|
Yes sure I will take a look in the next day |
Previously, the generator assumed that mapped parameter keys (the arrays used for __map_ segments) were either at the root level or provided as bare names. This caused the generator to fail or produce incorrect paths when dynamic parameters were nested inside deep struct hierarchies where the "key" array was defined in a parent scope. fix PickNikRobotics#278
- group test that test setup_up function via parametrization - add some config file file dor nested parameter map - add a test about get_dynamic_mapped_parameter
7fef7cf to
0a39b4d
Compare
|
I update the branch, and fix the compilation locally (via ci_industrial tool). @christophfroehlich can you see it it fix the ci too? |
|
Fix the style issue, everything should be fine now. |
|
@christophfroehlich would it be possible to have a review? |
christophfroehlich
left a comment
There was a problem hiding this comment.
CI is happy now, the changes look good as far as I can tell.
Can you please also update https://github.com/PickNikRobotics/generate_parameter_library?tab=readme-ov-file#mapped-parameters with the possible variants?
generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py
Outdated
Show resolved
Hide resolved
generate_parameter_library_py/generate_parameter_library_py/test/mapped_parameter_test.py
Outdated
Show resolved
Hide resolved
…st/mapped_parameter_test.py Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
generate_parameter_library_py/generate_parameter_library_py/test/YAML_parse_error_test.py
Outdated
Show resolved
Hide resolved
christophfroehlich
left a comment
There was a problem hiding this comment.
Thanks for the iterations. I tried it out on my own now, and added some test output to the examples.
Hello, this PR aim to fix #278.
As mention in the issue, the root caused came from
get_dynamic_mapped_parameter_names, not return the full nested path:if the the field to be mapped was
.nested_field.final_field, the function returnfinal_fieldcausing error in the generated code.Regarding the test, I wrote some basic one, let me know if need to do something else