Skip to content
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(planning_validator): cherry-pick numerically safe calculation of max lateral acceleration for MRM check #1209

Merged

Conversation

kaigohirao
Copy link

@kaigohirao kaigohirao commented Mar 25, 2024

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 , and resampled, representing the same path as trajectory 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) and resampled (after change, blue). The red one becomes larger than 1G [m/s^2] but blue one is smoother and safe from the MRM check.

image

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.

  • There are no open discussions or they are tracked via tickets.

After all checkboxes are checked, anyone who has write access can merge the PR.

@kaigohirao kaigohirao requested a review from TakaHoribe as a code owner March 25, 2024 09:31
@kaigohirao kaigohirao force-pushed the cherry-pick-planning-validator branch from 2b02648 to cd51962 Compare March 27, 2024 05:29
TakaHoribe and others added 2 commits March 27, 2024 16:02
…ampling trajectory (autowarefoundation#6679)

fix planning validator calc max lat acc after resampling

Signed-off-by: kaigohirao <kaigo.hirao@proxima-ai-tech.com>
@kaigohirao kaigohirao force-pushed the cherry-pick-planning-validator branch from f9429d0 to c8336ed Compare March 27, 2024 07:03
@TomohitoAndo TomohitoAndo self-requested a review March 27, 2024 07:36
Copy link

@TomohitoAndo TomohitoAndo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TomohitoAndo TomohitoAndo merged commit 4d368b9 into tier4:beta/v0.11.2 Mar 27, 2024
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants