-
Notifications
You must be signed in to change notification settings - Fork 682
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(costmap_generator): rework parameters #4695
refactor(costmap_generator): rework parameters #4695
Conversation
…ing to the new ROS node config guideline Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
…m:yuntianyi-chen/autoware.universe into 3239-refactor-ros-cofig-costmap_generator
…en building the package. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
vehicle_frame: "base_link" | ||
map_frame: "map" | ||
update_rate: 10.0 | ||
activate_by_scenario: true |
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.
I was not finding activate_by_scenario
in the parameters removed from the launch file, so I was wondering how a declare_parameter
on this option could work without a default value. I suppose this launch file was getting used exclusively through the parking pipeline at
autoware.universe/launch/tier4_planning_launch/launch/scenario_planning/parking.launch.py
Line 65 in 66c6e15
"activate_by_scenario": False, |
I expect that way of setting the parameters won't have any effect anymore, right? In which case the parking.launch.py file should probably also be updated as part of this PR.
Additionally, because this was the only place where activate_by_scenario
was set, should false
be kept as the default?
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.
According to the description ("if true, activate by scenario = parking. Otherwise, activate if vehicle is inside parking lot."), I think the default value should be set by the current scenario the vehicle is in.
I set it to True
according to the default values of the previous .cpp file, which was already deleted.
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.
Ah, I see. Makes sense.
What about updating autoware.universe/launch/tier4_planning_launch/launch/scenario_planning/parking.launch.py?
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.
Yes, we need to update the autoware.universe/launch/tier4_planning_launch/launch/scenario_planning/parking.launch.py
as well.
I've modified that .py
file. Shall we still keep the activate_by_scenario = true
in the launch.xml/schema.json/param.yaml
of the planning/costmap_generator
directory?
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.
The default in the schema is an annotation. It will be used eventually to render the documentation from it, but it doesn't enforce anything in software. So it doesn't matter so much, true
is fine.
Actually, for the modification in parking.launch.py
I had in mind of replacing the list of parameters with a reference to the config file of this package instead, in the same way you do for this package's launch file. Not just replacing the value of activate_by_scenario
.
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.
On second thought, I don't know if the tier4 package will want to use the defaults from another package that it doesn't control. Not sure what the best solution is.
@satoshi-ota I think it relates to the point you raise at #4699 (comment). Except here it (probably) doesn't break the launch of anything if we leave it as it currently is.
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.
I think we'd better keep only one configuration file that controls the node. Having the same set of parameters in two different places would cause some biases or inconsistencies.
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.
The configuration file in the package's source directory is just a default one, it doesn't have to be used by other packages. They can define their own. Which is what happens with the tier4 package here (except the values are in their launch file, not in a dedicated file). So before changing it, I'd like to know what tier4 code owners think of it.
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.
currently the default value of activate_by_scenario
was removed and set only in laucher side autowarefoundation/autoware_launch#679.
And we need to set it false
for pull over of lane driving scenario.
so could you please set false
?
Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
launch/tier4_planning_launch/launch/scenario_planning/parking.launch.py
Outdated
Show resolved
Hide resolved
@@ -1,3 +1,15 @@ | |||
<!-- | |||
Copyright 2021-2023 UCI SORA Lab, the Autoware Foundation |
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.
Thanks for adding the copyright notice to the launch file.
However, since some parts of the code comes from different author (prehaps TIER IV), we might want to have the original author mentioned as well in the notice.
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.
For the policy on copyright notice, let's discuss in today's Open AD Kit meeting.
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.
Conclusion from the WG discussion is posted in this issue
#2652
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.
The copyright notice has been modified.
Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
This pull request has been automatically marked as stale because it has not had recent activity. |
….universe into refactor-ros-config-costmap_generator Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
@yuntianyi-chen parking.launch.py was removed. So please rebase or update your branch? Thank you for your cooperation. |
Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com>
Thanks for noticing! I just removed this file. |
vehicle_frame: "base_link" | ||
map_frame: "map" | ||
update_rate: 10.0 | ||
activate_by_scenario: true |
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.
currently the default value of activate_by_scenario
was removed and set only in laucher side autowarefoundation/autoware_launch#679.
And we need to set it false
for pull over of lane driving scenario.
so could you please set false
?
planning/costmap_generator/schema/costmap_generator.schema.json
Outdated
Show resolved
Hide resolved
Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
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.
thanks! LGTM!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4695 +/- ##
===========================================
+ Coverage 15.32% 31.57% +16.25%
===========================================
Files 1721 6 -1715
Lines 118559 532 -118027
Branches 37995 137 -37858
===========================================
- Hits 18169 168 -18001
+ Misses 79657 285 -79372
+ Partials 20733 79 -20654
☔ View full report in Codecov by Sentry. |
* refactor the configuration files of the node costmap_generator according to the new ROS node config guideline Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * style(pre-commit): autofix * update the organization name in the copyright license Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Modify the CMakeLists.txt file to enalbe /config directory sharing when building the package. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update the schema file according to the review. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update a parameter in the parking.launch.py file. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * revert copyright info Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * style(pre-commit): autofix * delete parking.launch.py file Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update planning/costmap_generator/config/costmap_generator.param.yaml Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com> * Update planning/costmap_generator/schema/costmap_generator.schema.json Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com> --------- Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com>
* refactor the configuration files of the node costmap_generator according to the new ROS node config guideline Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * style(pre-commit): autofix * update the organization name in the copyright license Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Modify the CMakeLists.txt file to enalbe /config directory sharing when building the package. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update the schema file according to the review. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update a parameter in the parking.launch.py file. Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * revert copyright info Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * style(pre-commit): autofix * delete parking.launch.py file Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> * Update planning/costmap_generator/config/costmap_generator.param.yaml Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com> * Update planning/costmap_generator/schema/costmap_generator.schema.json Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com> --------- Signed-off-by: yuntianyi-chen <yuntianyichen@outlook.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kosuke Takeuchi <kosuke.tnp@gmail.com> Signed-off-by: karishma <karishma@interpl.ai>
Description
Refactor the ROS Node configuration layout for the costmap_generator package according to the guideline.
Related links
None
Tests performed
The refactored node was successfully built and tested by launching this node individually.
The running result is shown below:
![costmap_generator_test_results](https://private-user-images.githubusercontent.com/55477059/261975091-7180f0ca-1211-47f8-a2cd-4ea9dbc03043.jpg?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1ODIzMzcsIm5iZiI6MTczOTU4MjAzNywicGF0aCI6Ii81NTQ3NzA1OS8yNjE5NzUwOTEtNzE4MGYwY2EtMTIxMS00N2Y4LWEyY2QtNGVhOWRiYzAzMDQzLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAxMTM1N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWVjODc1YjJiYTI4NjVkZTUzYmE0NGE2MGZiNzNjOGRlZDBhNTJlYTU0MTUwZjk1MWU2ODI2YTEyZGIwYmJmOTAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.9srLaMMQsDfBOAITH1AnhzWEuXiGZAIsOWsgy8ZPxtU)
tier4 internal scenarios
https://evaluation.tier4.jp/evaluation/reports/9477bdda-3c75-5953-9554-e9191df8f9d7?project_id=prd_jt
1680/1683
Notes for reviewers
It seems like the
planning/costmap_generator/config/costmap_generator.param.yaml
file cannot be automatically copied to theautoware/install/costmap_generator/share/config
directory after building the package. Since we usefind-pkg-share
in thecostmap_generator.launch.xml
file to link thecostmap_generator.param.yaml
file, I have to manually copy the.param.yaml
file to theshare/config
directory to make it work. I think we need to modify theCMakeLists.txt
file to implement the copying, which I discussed here.Interface changes
planning/costmap_generator/config/costmap_generator.param.yaml
andplanning/costmap_generator/schema/costmap_generator.schema.json
Effects on system behavior
None
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.