-
Notifications
You must be signed in to change notification settings - Fork 676
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
feat(map_based_prediction): use obstacle acceleration for map prediction #6072
feat(map_based_prediction): use obstacle acceleration for map prediction #6072
Conversation
8217af6
to
475cd76
Compare
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #6072 +/- ##
==========================================
+ Coverage 14.63% 14.65% +0.02%
==========================================
Files 1858 1858
Lines 126821 126604 -217
Branches 37163 37139 -24
==========================================
- Hits 18563 18558 -5
+ Misses 87380 87189 -191
+ Partials 20878 20857 -21
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
4952754
to
dbcf617
Compare
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
dbcf617
to
49a2a88
Compare
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 have some minor comments about the code.
After that I will test the feature and double check the calculations.
perception/map_based_prediction/src/map_based_prediction_node.cpp
Outdated
Show resolved
Hide resolved
perception/map_based_prediction/src/map_based_prediction_node.cpp
Outdated
Show resolved
Hide resolved
perception/map_based_prediction/src/map_based_prediction_node.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp>
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
c2de78d
into
autowarefoundation:main
…ion (autowarefoundation#6072) * add acc filtering and decaying acc to model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixed compilation problem, acc is used to predict search_dist Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change decaying factor to T/4 Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * coment out cerr for evaluation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * simplify code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Implement lanelet speed limit for acc consideration Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add option to activate on and off acceleration feature Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused class Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update docs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update comments, refactor code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove unused line Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> --------- Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
…ion (autowarefoundation#6072) * add acc filtering and decaying acc to model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixed compilation problem, acc is used to predict search_dist Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change decaying factor to T/4 Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * coment out cerr for evaluation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * simplify code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Implement lanelet speed limit for acc consideration Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add option to activate on and off acceleration feature Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused class Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update docs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update comments, refactor code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove unused line Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> --------- Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
…ion (autowarefoundation#6072) * add acc filtering and decaying acc to model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixed compilation problem, acc is used to predict search_dist Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change decaying factor to T/4 Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * coment out cerr for evaluation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * simplify code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Implement lanelet speed limit for acc consideration Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add option to activate on and off acceleration feature Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused class Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update docs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update comments, refactor code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove unused line Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> --------- Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> Signed-off-by: karishma <karishma@interpl.ai>
…ion (autowarefoundation#6072) * add acc filtering and decaying acc to model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixed compilation problem, acc is used to predict search_dist Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change decaying factor to T/4 Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * coment out cerr for evaluation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * simplify code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Implement lanelet speed limit for acc consideration Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add option to activate on and off acceleration feature Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused class Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update docs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update comments, refactor code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove unused line Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> --------- Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
…ion (autowarefoundation#6072) * add acc filtering and decaying acc to model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fixed compilation problem, acc is used to predict search_dist Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * change decaying factor to T/4 Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * coment out cerr for evaluation Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * simplify code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Use an equivalent velocity to calculate paths Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add missing constant to decaying acc model Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * Implement lanelet speed limit for acc consideration Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add option to activate on and off acceleration feature Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * add params Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * delete unused class Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * update docs Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> * delete comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * fix comments Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * update comments, refactor code Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> * remove unused line Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> --------- Signed-off-by: Daniel Sanchez <daniel.sanchez@tier4.jp> Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Description
This PR adds acceleration readings from perception into the map_based_prediction module (can be toggled on or off. Off by default) to calculate path lengths more accurately.
Since including acceleration might have a big impact on path length (the time horizon for prediction is usually between 10 to 18s and we cannot assume a car will accelerate for that long) this feature uses a decaying acceleration model to calculate the path length after time_horizon T:
were a_0 is the instantaneous acceleration detected by perception, λ is the exponential decaying constant, and t is time with 0 <= t <= T.
The result is a map based prediction that also includes (attenuated/decaying) acceleration information for a more accurate prediction.
Also, there is a slightly more detailed explanation in this link: TIER IV INTERNAL LINK
Considerations:
Related links
Evaluator tests with the feature turned on: TIER IV INTERNAL LINK. No degradation when compared to base.
Also, there is a slightly more detailed explanation in this link: TIER IV INTERNAL LINK
Tests performed
Evaluator tests (see above) and PSim tests.
Some examples:
cap-.2024-01-11-18-00-03.mp4
Comparison between no acceleration consideration (first) and acc consideration (second) for a vehicle decelerating at -1 m/s^2 from a starting speed of 8 m/s. In the second case, the prediction detects the path is safe, while the first case takes a while before figuring out it will be safe
cap-.2024-01-11-18-11-03.mp4
Comparison between no acceleration consideration (first) and acc consideration (second) for a vehicle accelerating at 1.2 m/s^2 from a starting speed of 0 m/s. The second case detects danger faster than the first case.
cap-.2023-12-20-09-35-03.mp4
In this video, it can be seen how the predicted path of an accelerating vehicle is longer than a non accelerating and faster vehicle (eventually, the accelerating vehicle will overtake the non accelerating one).
Notes for reviewers
Launch changes are necessary for this PR, please review too: autowarefoundation/autoware_launch#788
NOTE: acceleration tracking is not implemented in this PR, but will be in the future.
Interface changes
Effects on system behavior
If enabled, this feature changes predicted path length by calculating future path extensions using velocity AND acceleration information from perception.
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.