-
Notifications
You must be signed in to change notification settings - Fork 45
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
Fix mapped paramteres generation for python #183
Fix mapped paramteres generation for python #183
Conversation
Signed-off-by: Kotochleb <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly to #185, this also will need to handle the case where {{struct_name}}
does not actually exist.
@sea-bass I saw #185, but it did not solve this issue. I tested it once again after you comment and neither edfeb82 nor current main do not work. That is why I still want to keep this PR open. As you suggested, I added check if |
@@ -0,0 +1,1275 @@ | |||
# flake8: noqa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you delete this autogenerated file from this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed. I don't know how it slipped in there. Thanks for the catch
Okay, I think I see the issue here. my_node:
params_to_be_mapped: {
type: string_array,
}
my_params:
params_to_be_mapped: {
type: string_array,
}
__map_params_to_mapped:
in_map_param: {
type: bool,
} this is valid YAML but it is unclear which params_to_be_mapped is referred to. So we need a new syntax to support this. I think it would make sense to use a syntax like this: The current change in this PR breaks the example file here: https://github.com/PickNikRobotics/generate_parameter_library/blob/main/example_python/generate_parameter_module_example/parameters.yaml |
Thank you for clarification. Since the changes I proposed are breaking, I will simply modify my own code then. Feel free to close this PR without merging. |
@Kotochleb Do you mind opening an issue for this? That way, this feature can potentially be added when I have some time. |
Since the issue is open now I am closing this PR |
This PR fixes incorrectly created parameters for maps in Python.
With this yaml:
Current Jinja template will create following code:
While the expected output is:
Namespace of
my_params
is not taken into account infor
loops of the mapped values.