-
Notifications
You must be signed in to change notification settings - Fork 683
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
perf(path_smoother): add ReplanChecker to decrease computation cost #4416
perf(path_smoother): add ReplanChecker to decrease computation cost #4416
Conversation
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Before:
After:
|
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.
Merging this PR has resulted in the optimization (smoothTrajectory()) in the path_smoother no longer being executed every frame.
I have also confirmed a significant decrease in CPU usage of path_smoother node.
cc. @takayuki5168
Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #4416 +/- ##
=======================================
Coverage 14.93% 14.93%
=======================================
Files 1515 1516 +1
Lines 104545 104635 +90
Branches 31777 31826 +49
=======================================
+ Hits 15613 15628 +15
- Misses 71895 71949 +54
- Partials 17037 17058 +21
*This pull request uses carry forward flags. Click here to find out more.
☔ View full report in Codecov by Sentry. |
…utowarefoundation#4416) * perf(path_smoother): add ReplanChecker to decrease computation cost Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> * Add replan checker parameters to default path_smoother config Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp> --------- Signed-off-by: Maxime CLEMENT <maxime.clement@tier4.jp>
Thanks @maxime-clem for this interesting PR. We - planning & control team in Leo Drive - are curious about the change in this PR as we are facing a specific behavior in a specific scenario while testing autoware which we are trying to understand. And the reason we are curious about this PR is that the behavior before it has changed after. Before using this PR, we have tested autoware and faced this weird ego vehicle stop as shown in this video demo before the stop line (please watch carefully starting from 0:26). The obvious reason for me (not totally sure), there is a replan (optimization) happening that is why it stopped and replanned the trajectory. The log message during this stop was After using this PR, this weird stop is not longer happening except in very minor trials - giving me the impressions out of the comments above that optimization is no longer happening in each frame. And when it happens, it stops and replan again. Knowing that ...
From these observations and checking the code change, I am curious to understand some questions and would be very grateful to you if you can support us in that ...
Thanks in advance for your efforts and support, and please let me know if you would need any further questions/clarifications before answering the questions. cc: @mehmetdogru - @beyzanurkaya |
Hello and thank you for your question. I will try to answer as best as I can but I may need to investigate further to provide you with a satisfactory reply. Do not hesitate to ask more questions if things are not clear.
As you noted, if
It is equivalent to redoing the elastic band optimization. There is no real planning involved as no decisions are made and the input path is just made smoother.
This is a strange issue. If there is a stop line it seems correct if the vehicle stops. However if the behavior is impacted by the
If the input path received is very different from the previous one, we want to update the output as well and will redo the elastic band optimization.
There could be a bug with the resampling of the velocities such that the stop point (a single point with
I think there will be some refactoring in the future, but both the |
Thanks a lot @maxime-clem for the valuable answers from your side and sorry for my delayed response. |
@ahmeddesokyebrahim Sorry I should have discussed this during the working group today. It sounds like a significant issue which should be addressed as soon as possible. |
Description
Copy the
ReplanChecker
from theobstacle_avoidance_planner
in order to improve the performance of thepath_smoother
.Also needs launch PR: autowarefoundation/autoware_launch#482
Tests performed
Psim.
CPU usage before: 200-300%.
CPU usage after: 30-60%.
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.