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

feat(behavior_velocity_planner): apply smoother to reference trajectory for ttc #1405

Conversation

soblin
Copy link
Contributor

@soblin soblin commented Jul 25, 2022

feat(behavior_velocity_planner): apply smoother to reference trajectory for ttc

Signed-off-by: Mamoru Sobue mamoru.sobue@tier4.jp

Description

Previously intersection module was calculating passing time to each point on the path from ego position based on the uniform acceleration motion as follows:

v0, v0 + at, v0+2at,,..

where each V0 ,,,, Vn is up to Vmax. This is not realistic given the curve in intersection part. In this PR motion_velocity_smoother is applied to this motion and then ttc is calculated using the smoothed motion.

Tests performed

Tested in Psim at odaiba map.

td_array-2022-07-28_15.51.05.mp4

The gif file shows the passing-time & distance of each point on the path from ego position, for previous(blue) / smoothed (red, this PR) reference motions.

ani

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.

  • The PR follows the pull request guidelines.
  • The PR has been properly tested.
  • The PR has been reviewed by the code owners.

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.
  • The PR is ready for merge.

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

@soblin soblin force-pushed the feat/analytical_smoothr_for_intersection_ttc branch from b30bba6 to 4e355fe Compare July 25, 2022 02:11
@codecov
Copy link

codecov bot commented Jul 25, 2022

Codecov Report

Merging #1405 (98aea5c) into main (5571338) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main    #1405      +/-   ##
==========================================
- Coverage   10.27%   10.24%   -0.04%     
==========================================
  Files        1118     1118              
  Lines       77581    77821     +240     
  Branches    17854    18025     +171     
==========================================
  Hits         7974     7974              
- Misses      62122    62338     +216     
- Partials     7485     7509      +24     
Flag Coverage Δ *Carryforward flag
differential 4.75% <0.00%> (?)
total 10.26% <0.00%> (ø) Carriedforward from 5571338

*This pull request uses carry forward flags. Click here to find out more.

Impacted Files Coverage Δ
...vior_velocity_planner/include/utilization/util.hpp 0.00% <0.00%> (ø)
...c/scene_module/intersection/scene_intersection.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5571338...98aea5c. Read the comment docs.

@soblin soblin force-pushed the feat/analytical_smoothr_for_intersection_ttc branch from 4e355fe to 526607e Compare July 25, 2022 03:12
@soblin soblin marked this pull request as ready for review July 28, 2022 08:17
@soblin soblin changed the title feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory feat(behavior_velocity_planner): simply apply smoother to existing reference trajectory Jul 28, 2022
@soblin soblin changed the title feat(behavior_velocity_planner): simply apply smoother to existing reference trajectory feat(behavior_velocity_planner): apply smoother to reference trajectory for ttc Jul 28, 2022
@@ -465,6 +470,24 @@ TimeDistanceArray IntersectionModule::calcIntersectionPassingTime(
return {{0.0, 0.0}}; // has already passed the intersection.
}

PathWithLaneId smoothed_reference_path;
if (!smoothPath(reference_path, smoothed_reference_path, planner_data_))
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it better to output some message?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I reflected your comment.

@soblin soblin force-pushed the feat/analytical_smoothr_for_intersection_ttc branch 2 times, most recently from 2eda5fb to 1ec374f Compare July 28, 2022 09:24
Copy link
Contributor

@yukkysaito yukkysaito left a comment

Choose a reason for hiding this comment

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

LGTM.
Pls get approval by @kyoichi-sugahara

@soblin soblin force-pushed the feat/analytical_smoothr_for_intersection_ttc branch 2 times, most recently from cf11b5d to 568c85c Compare July 29, 2022 02:25
…eference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
…ailed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
@soblin soblin force-pushed the feat/analytical_smoothr_for_intersection_ttc branch from 568c85c to 98aea5c Compare July 29, 2022 02:30
@soblin soblin enabled auto-merge (squash) July 29, 2022 02:31
@soblin soblin merged commit befc35d into autowarefoundation:main Jul 29, 2022
@soblin soblin deleted the feat/analytical_smoothr_for_intersection_ttc branch July 29, 2022 03:31
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
…ry for ttc (tier4#1405)

* feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* avoid zero division

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* initialize smoothed_path with reference_path and WARN if smoothPath failed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* added another version for calcDist2d

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…ry for ttc (tier4#1405)

* feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* avoid zero division

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* initialize smoothed_path with reference_path and WARN if smoothPath failed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* added another version for calcDist2d

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
…ry for ttc (tier4#1405)

* feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* avoid zero division

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* initialize smoothed_path with reference_path and WARN if smoothPath failed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* added another version for calcDist2d

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
…ry for ttc (autowarefoundation#1405)

* feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* avoid zero division

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* initialize smoothed_path with reference_path and WARN if smoothPath failed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* added another version for calcDist2d

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
…ry for ttc (tier4#1405)

* feat(behavior_velocity_smoother): simply apply smoother to existing reference trajectory

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* avoid zero division

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* initialize smoothed_path with reference_path and WARN if smoothPath failed

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>

* added another version for calcDist2d

Signed-off-by: Mamoru Sobue <mamoru.sobue@tier4.jp>
saka1-s pushed a commit to saka1-s/autoware.universe that referenced this pull request Jul 10, 2024
…utowarefoundation#1405)

* Revert "fix(autoware_mpc_lateral_controller): delete the zero speed constraint (autowarefoundation#7673)"

This reverts commit 69258bd.

* dry steering



* add comments



* add minor fix and modify unit test for dry steering



---------

Signed-off-by: Takayuki Murooka <takayuki5168@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants