fix(planning_validator): cherry-pick numerically safe calculation of max lateral acceleration for MRM check #1209
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
Cherry-pick from autowarefoundation#6679
Related JIRA Ticket: https://tier4.atlassian.net/browse/RT0-29352
In the planning validator, among other checks, the max lateral acceleration is calculated and checked whether it is larger than 1G [m/s^2] or not from an input of trajectory. The lateral accelerations are calculated from longitudinal velocities and curvatures at every trajectory points.
The validation function in the planning validator includes two internal trajectory variables, namely
trajectory
, an input from the motion velocity smoother which is densely sampled near the ego and sparsely sampled otherwise with the policy explained here , andresampled
, representing the same path astrajectory
but wholly sparsely resampled with the interval of 1~2m.This PR puts the lateral acceleration check process after resampling of trajectory for the purpose of numerically safer calculations of curvatures.
Also, the way of calculating curvatures is cherry-picked from https://github.com/autowarefoundation/autoware.universe 's
calcCurvature.
Tests performed
I confirmed the normal operation with the latest version of Autoware in the planning simulation here.
Effects on system behavior
The plot on the upper right of the image blow is a comparison of max lateral acceleration calculated from
trajectory
(before change, red) andresampled
(after change, blue). The red one becomes larger than 1G [m/s^2] but blue one is smoother and safe from the MRM check.Note the above comparison is done with the version https://github.com/tier4/autoware.universe/tree/beta/v0.11.2 and commit ID 3e02320 .
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.