-
Notifications
You must be signed in to change notification settings - Fork 668
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
refactor(pose_initializer): rework parameters #5773
refactor(pose_initializer): rework parameters #5773
Conversation
Signed-off-by: PhoebeWu21 <[email protected]>
@PhoebeWu21 Thanks for making the PR! Therefore, I would like you to revert the changes to (Also, I am not familiar with the syntax of json.scheme, but I think the |
Signed-off-by: PhoebeWu21 <[email protected]>
@KYabuuchi Got it. But if remove |
@PhoebeWu21 Hmm, I'm not familier in JSON schema validation, but is the only way to pass the build-and-test to remove parameters not included in If we have no choice except to remove them, I would like you to proceed in that manner. |
Hi @kaspermeck-arm @ambroise-arm, I am not sure if there is other methods to deal with this situation. Please give me some advice, thank you. |
@KYabuuchi The goal of the change is not to manage the parameters in pose_initializer.param.yaml. The goal is to move the default values of the parameters from the launch file of the package to the config file of the package. Looking at another launch file from the same tier4_localization_launch package you linked to, I see https://github.com/autowarefoundation/autoware.universe/blob/main/launch/tier4_localization_launch/launch/pose_twist_fusion_filter/pose_twist_fusion_filter.launch.xml#L41 simply references the default values from the config file. So @PhoebeWu21 it may just be about adding a EDIT: and also double-checking whether other launch files are affected in the same way |
@ambroise-arm Thank you for clarifying the goal. 😄 |
Now that you mention it, it sounds like an excellent idea! It would provide a tidier code in pose_twist_estimator.launch.xml, and it would simplify the interface between the two launch files with only the path to the config file to be used. And it matches the design described in https://autowarefoundation.github.io/autoware-documentation/main/contributing/coding-guidelines/ros-nodes/parameters/#parameter-file under "Launch parameter file". Yes, that's probably the best way to go. However, I was suggesting a more modest change: keeping the The first option sounds like a bigger change than the second. I don't know if we want the scope of this PR to be this big. |
I see. The approach I suggested, involving multiple file placements, is a big changes. @PhoebeWu21 Are you ok with the current style? |
@KYabuuchi Ok. Thank you. |
@PhoebeWu21 Oh? I apologize. I was approvable in the last state.
What I mean here is to include only parameters independent of runtime arguments in param.yaml, excluding dependent parameters (such as ndt_enabled) from both param.yaml and json.schema. |
095de6b
to
a626d53
Compare
@KYabuuchi Ahh got it. Sorry for the misunderstanding. |
@YamatoAndo Now it is ready to review. Please review and approve 🙏 |
I disagree. The point of https://github.com/orgs/autowarefoundation/discussions/3371 (that this PR implements) is to have a 1 to 1 match between the parameters used in the C++ node and the schema/parameter files. I don't see the issue with having this commit in the PR. And having the PR without it doesn't fulfill the goal of the configuration dojo. (at least not my understanding of it) |
@ambroise-arm Sorry for the misunderstanding. I would like to confirm again, do you intend to put both |
@PhoebeWu21 @KYabuuchi @ambroise-arm Autoware allows parameters to be split into multiple parameter files and launch files. Therefore, there is no guarantee that the parameter file and schema file will match exactly. (To be more precise, schema matches the temporary merged parameter file that the ROS launch system gives to the node.) It has been pointed out that due to file splitting, schema and parameter file validation cannot be done one-on-one.
Therefore, possible solutions are as follows (some are temporary solutions)
Edit:
|
@KYabuuchi Yes, in the pose_initializer.launch.xml launch file. But it is already like this, so it is more about keeping it this way.
@KYabuuchi Exactly. I also assume it takes priority.
@isamu-takagi I think it will result in something a bit like this, but I don't think the issue your are linking to is a problem here. What will happen is that we will have a schema file in this package that has all its fields as "required", and a config file that list all the fields. So it should be validated correctly. The launch file of this package then uses this config file as a default, while also requiring some of its arguments to be passed directly. So in practice the |
For this package, I think the approach mentioned by ambroise-arm is fine. |
@KYabuuchi @ambroise-arm |
i am not sure😞 |
@KYabuuchi |
@isamu-takagi Thank you for finding the description. Very useful information! |
I realized that the override rules are complex, and the current approach might actually introduce more bugs. I also posted this issue in the github-actions thread. I don't think we should merge PRs with parameter overrides at this time. |
@PhoebeWu21 Sorry to keep you waiting for so long. If it's not too inconvenient, would you mind revising this PR to incorporate that method? If it is troublesome, I am willing to work on it and create a new PR. |
@KYabuuchi Sure, I can deal with the modifying. But I am a bit confused about the revising of the pose_initializer.launch.xml file. Should I revise it to the format like pose_twist_estimator.launch.xml? |
@PhoebeWu21 Thanks for your cooperation. What I want you to do is the following:
You do not need to refer to pose_twist_estimator.launch.xml to make this change. |
Signed-off-by: PhoebeWu21 <[email protected]>
Signed-off-by: PhoebeWu21 <[email protected]>
Signed-off-by: PhoebeWu21 <[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.
Thank you for your help!
Since autoware_launch has the same parameter.yaml, please create a PR to modify that as well. Sorry for bothering you.
localization/pose_initializer/schema/pose_initializer.schema.json
Outdated
Show resolved
Hide resolved
Signed-off-by: PhoebeWu21 <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5773 +/- ##
==========================================
- Coverage 15.32% 7.56% -7.76%
==========================================
Files 1721 10 -1711
Lines 118559 185 -118374
Branches 37995 7 -37988
==========================================
- Hits 18169 14 -18155
+ Misses 79657 165 -79492
+ Partials 20733 6 -20727
☔ View full report in Codecov by Sentry. |
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.
Thank you for your patient support!
I have confirmed that pose_initializer runs correctly in logging_simulator.launch.xml & planning_simulator.launch.xml.
* refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * style(pre-commit): autofix * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> --------- Signed-off-by: PhoebeWu21 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * style(pre-commit): autofix * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> --------- Signed-off-by: PhoebeWu21 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * style(pre-commit): autofix * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> * refactor(pose_initializer): rework parameters Signed-off-by: PhoebeWu21 <[email protected]> --------- Signed-off-by: PhoebeWu21 <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Description
Implement the ROS Node configuration layout described in https://github.com/orgs/autowarefoundation/discussions/3371 for the
pose_initializer
package.Tests performed
Package build and launch locally.
colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --packages-up-to pose_initializer
Effects on system behavior
More reliable and faster parameter configuration file creation.
Pre-review checklist for the PR author
The PR author must check the checkboxes below when creating the PR.
In-review checklist for the PR reviewers
The PR reviewers must check the checkboxes below before approval.
Post-review checklist for the PR author
The PR author must check the checkboxes below before merging.
After all checkboxes are checked, anyone who has write access can merge the PR.