-
Notifications
You must be signed in to change notification settings - Fork 691
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(map_based_prediction): calculate yaw without calling getLaneletAngle #2895
perf(map_based_prediction): calculate yaw without calling getLaneletAngle #2895
Conversation
…ngle Signed-off-by: veqcc <ryuta.kambe@tier4.jp>
Codecov ReportBase: 12.59% // Head: 12.59% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2895 +/- ##
==========================================
- Coverage 12.59% 12.59% -0.01%
==========================================
Files 1219 1219
Lines 86539 86549 +10
Branches 24794 24794
==========================================
Hits 10898 10898
- Misses 64281 64291 +10
Partials 11360 11360
*This pull request uses carry forward flags. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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.
LGTM
I confimed that the frequency of /perception/object_recognition/objects became stable even when there are a lot of objects in the planning simulator
…ngle (autowarefoundation#2895) Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
…v0.7.0 * perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum (autowarefoundation#2883) * perf(map_based_prediction): performance improvement of interpolateReferencePath with cumulative sum Signed-off-by: veqcc <ryuta.kambe@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> * perf(map_based_prediction): calculate yaw without calling getLaneletAngle (autowarefoundation#2895) Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp> --------- Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: Ryuta Kambe <veqcc.c@gmail.com> Co-authored-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
…ngle (autowarefoundation#2895) Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
…ngle (autowarefoundation#2895) Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
…ngle (autowarefoundation#2895) Signed-off-by: veqcc <ryuta.kambe@tier4.jp> Co-authored-by: veqcc <ryuta.kambe@tier4.jp>
Signed-off-by: veqcc ryuta.kambe@tier4.jp
Description
The motivation to improve the latency of map_based_prediction node is the same as #2883 .
How I optimized
getPredictedReferencePath
is to remove thegetLanletAngle
function calls. IngetLanletAngle
, we search which segment is the closest to the point in parameter, where the segments are created from two adjacent centerline points in lanelet. These points in parameter, however, are exactly the points of centerline in lanelet (as seen inconvertPathType
). Thus, we don't have to walk through the lanelet centerline points again and to calculate the yaw from the previous point is enough.The following figure shows how latencies are optimized with the idea. The red graph is the original latency, and the blue graph is the latency after #2883 is merged, and the green graph is the latency of this proposal.

By the way, the current implementation of skipping the first point is not smart I think. If you have better implementation ideas, please add a comment.