-
Notifications
You must be signed in to change notification settings - Fork 679
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
fix(simple_planning_simulator): set ego pitch to 0 if road slope is not simulated #5501
fix(simple_planning_simulator): set ego pitch to 0 if road slope is not simulated #5501
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #5501 +/- ##
==========================================
+ Coverage 15.37% 15.38% +0.01%
==========================================
Files 1697 1697
Lines 117496 117437 -59
Branches 37763 37735 -28
==========================================
+ Hits 18063 18066 +3
+ Misses 78861 78810 -51
+ Partials 20572 20561 -11
*This pull request uses carry forward flags. Click here to find out more.
☔ 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.
LGTM
684bffd
to
06f360e
Compare
Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
06f360e
to
350a81b
Compare
…ot simulated (autowarefoundation#5501) set ego pitch to 0 if road slope is not simulated Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
…ot simulated (autowarefoundation#5501) (#1027) set ego pitch to 0 if road slope is not simulated Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com> Co-authored-by: danielsanchezaran <daniel.sanchez@tier4.jp>
…ot simulated (autowarefoundation#5501) set ego pitch to 0 if road slope is not simulated Signed-off-by: Daniel Sanchez <danielsanchezaran@gmail.com>
Description
🤖 Generated by Copilot at 684bffd
Refactor
simple_planning_simulator_core.cpp
to skip ego pitch calculation when road slope simulation is off and use a constant for gravity. This improves performance and accuracy of the simple planning simulator.Tests performed
I found the bug when using the planning simulator on a specific lanelet map that happened to have inclination (I did not know about the inclination). The result was that the controller output would give negative acceleration and the vehicle would not move after planning a path even when road slope simulation is off . The video shows the bug and the image the control output:
cap-.2023-11-06-17-04-55.mp4
I saved the specific starting pose of the vehicle and replayed the planning simulator after applying the fix on this PR and the problem was solved: the vehicle could move after planning. The acceleration is no longer negative either.
cap-.2023-11-07-10-02-30.mp4
Effects on system behavior
When performing simulations, the simulation calculates the acceleration caused by the vehicle's pitch angle, even if the enable_road_slope_simulation_ parameter is set to false which is an unexpected behavior. With this fix, the acceleration caused by pitch will be zero when enable_road_slope_simulation_ is false. So, in those cases, the acceleration given by the controller will change.
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.