-
Notifications
You must be signed in to change notification settings - Fork 668
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): fix ego sign pitch problem #5616
Merged
danielsanchezaran
merged 3 commits into
autowarefoundation:main
from
tier4:fix/simulation_pitch_angle
Nov 20, 2023
Merged
fix(simple_planning_simulator): fix ego sign pitch problem #5616
danielsanchezaran
merged 3 commits into
autowarefoundation:main
from
tier4:fix/simulation_pitch_angle
Nov 20, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Daniel Sanchez <[email protected]>
github-actions
bot
added
the
component:simulation
Virtual environment setups and simulations. (auto-assigned)
label
Nov 17, 2023
danielsanchezaran
added
run:build-and-test-differential
Mark to enable build-and-test-differential workflow. (used-by-ci)
component:simulation
Virtual environment setups and simulations. (auto-assigned)
and removed
component:simulation
Virtual environment setups and simulations. (auto-assigned)
labels
Nov 17, 2023
danielsanchezaran
requested review from
TakaHoribe and
tkimura4
as code owners
November 17, 2023 05:11
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5616 +/- ##
==========================================
+ Coverage 15.26% 15.37% +0.10%
==========================================
Files 1713 1713
Lines 118192 118381 +189
Branches 37797 37899 +102
==========================================
+ Hits 18047 18206 +159
- Misses 79595 79623 +28
- Partials 20550 20552 +2
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Signed-off-by: Daniel Sanchez <[email protected]>
…supported Signed-off-by: Daniel Sanchez <[email protected]>
github-actions
bot
added
the
type:documentation
Creating or refining documentation. (auto-assigned)
label
Nov 17, 2023
takayuki5168
approved these changes
Nov 17, 2023
TakaHoribe
approved these changes
Nov 20, 2023
danielsanchezaran
merged commit Nov 20, 2023
40c407a
into
autowarefoundation:main
21 of 23 checks passed
h-ohta
pushed a commit
to tier4/autoware.universe
that referenced
this pull request
Nov 21, 2023
…oundation#5616) * fix ego sign pitch problem Signed-off-by: Daniel Sanchez <[email protected]> * change variable name for clarity Signed-off-by: Daniel Sanchez <[email protected]> * update documentation to clarify that driving against the lane is not supported Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]>
Merged
7 tasks
h-ohta
added a commit
to tier4/autoware.universe
that referenced
this pull request
Nov 21, 2023
…oundation#5616) (#1029) * fix ego sign pitch problem * change variable name for clarity * update documentation to clarify that driving against the lane is not supported --------- Signed-off-by: Daniel Sanchez <[email protected]> Co-authored-by: danielsanchezaran <[email protected]>
takayuki5168
pushed a commit
to tier4/autoware.universe
that referenced
this pull request
Nov 22, 2023
…oundation#5616) * fix ego sign pitch problem Signed-off-by: Daniel Sanchez <[email protected]> * change variable name for clarity Signed-off-by: Daniel Sanchez <[email protected]> * update documentation to clarify that driving against the lane is not supported Signed-off-by: Daniel Sanchez <[email protected]> --------- Signed-off-by: Daniel Sanchez <[email protected]>
3 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component:simulation
Virtual environment setups and simulations. (auto-assigned)
run:build-and-test-differential
Mark to enable build-and-test-differential workflow. (used-by-ci)
type:documentation
Creating or refining documentation. (auto-assigned)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
There is a bug on the simple_planning simulator when enable_road_slope_simulation is true. Currently, the ego pitch angle is negative when the ego vehicle is on a downward slope and positive when on an upwards slope, which causes trouble when computing the acceleration caused by the slope (the sign is negative when it should be positive and vice versa), causing a wrong simulation output.
The original code:
As you can see on the code picture, if the vehicle is on an upwards slope, the pitch sign is negative but the resulting acceleration will be positive (-9.81 * sin(negative) = positive value) which makes no sense for an upwards slope.
Examples of wrong behavior:
The vehicle goes uphill, but its acceleration is high, it overshoots its goal
uphill_overshoot_goal.mp4
the vehicle wont move downhill
downslope_no_movement.mp4
This PR fixes the mentioned problem. Also, now the vehicle pitch simulation should be correct, even if enable_slope_simulation is disabled.
Tests performed
Tested with uphill and downhill lanelet maps:
Uphill:
cap-.2023-11-17-14-01-09.mp4
Downhill, the ego vehicle moves, no overshoot:
cap-.2023-11-17-13-57-38.mp4
Effects on system behavior
Fixes the acceleration by slope to have the correct sign. Now the simulated ego vehicle can start on a downward slope and it does not overshoot on uphill paths.
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.