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(obstacle_stop_planner): change the nearest_collision_point calculation place #5794

Merged
merged 1 commit into from
Feb 16, 2024

Conversation

brkay54
Copy link
Member

@brkay54 brkay54 commented Dec 6, 2023

Description

This PR closes following issues:
#5449
#6007

The purpose of this PR is fixing logical bug.
At first for loop here, it searches collision on trajectory by looking into predicted objects. If there is a collision object, it finds the nearest point of the object (by looking both intersected points and corner points here), and it pushes predicted object, time, and nearest point into predicted_object_history_.

At the second for loop here, it searches the nearest collision object in predicted_object_history_ vector. It looks for the pre-calculated nearest point inside the trajectory footprint or not. It is the mistake.
If the nearest point we found in the first loop is an intersected point, bg::intersect might not be true in the second loop, it is a logical mistake.

In this issue (#6007) we realized if the use_predicted_objects is true, obstacle_stop_planner may react too late to obstacle.

To solve this problem, we made structural change on searchPredictedObject function. We changed the nearest_collision_point calculation place to the second loop.

Related links

Tests performed

Tested in PSim by using reaction_analyzer tool. (https://github.com/brkay54/autoware.universe/tree/feat/reaction-measure-tool/tools/reaction_analyzer)

Reaction Times before the PR:
withoutpr-list
without-pr-stat

Reaction Times after the PR:
withpr-list
withpr-stat

Notes for reviewers

You can use the reaction_analyzer tool to check the reaction times of the node. Please refer README for the usage.

Interface changes

Effects on system behavior

Decreases the reaction delay of the obstacle_stop_planner when use_predicted_objects is true.

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.

@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 6, 2023
@brkay54 brkay54 marked this pull request as draft December 6, 2023 10:09
@brkay54 brkay54 self-assigned this Jan 4, 2024
@brkay54 brkay54 marked this pull request as ready for review January 4, 2024 12:43
@brkay54 brkay54 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Jan 4, 2024
Copy link

codecov bot commented Jan 4, 2024

Codecov Report

Attention: 54 lines in your changes are missing coverage. Please review.

Comparison is base (9fe2e15) 15.22% compared to head (d0ccd75) 15.22%.

Files Patch % Lines
planning/obstacle_stop_planner/src/node.cpp 0.00% 41 Missing ⚠️
...top_planner/include/obstacle_stop_planner/node.hpp 0.00% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5794      +/-   ##
==========================================
- Coverage   15.22%   15.22%   -0.01%     
==========================================
  Files        1751     1751              
  Lines      120824   120832       +8     
  Branches    36716    36717       +1     
==========================================
  Hits        18396    18396              
- Misses      81786    81794       +8     
  Partials    20642    20642              
Flag Coverage Δ *Carryforward flag
differential 8.75% <0.00%> (?)
total 15.23% <ø> (+<0.01%) ⬆️ Carriedforward from 9fe2e15

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@brkay54
Copy link
Member Author

brkay54 commented Jan 9, 2024

Hi @satoshi-ota @shmpwk @taikitanaka3 @tkimura4, sorry to bother you, if you have some time, could you review this PR?

@satoshi-ota satoshi-ota self-assigned this Feb 14, 2024
@satoshi-ota
Copy link
Contributor

Sorry for late reply @brkay54
I'm reviewing now...

Copy link
Contributor

@satoshi-ota satoshi-ota left a comment

Choose a reason for hiding this comment

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

LGTM.

@brkay54 Thanks for your contribution. Btw, is it possible to add another maintainer from leodrive side for this package? Basically, TIER IV uses only the feature to check collision by pointcloud. So, I think it is ok to improve the feature that uses predicted objects without TIER IV maintainer.

@brkay54 brkay54 merged commit dcd3c07 into autowarefoundation:main Feb 16, 2024
46 of 49 checks passed
@brkay54 brkay54 deleted the osp/bug-fix branch February 16, 2024 09:49
StepTurtle pushed a commit to StepTurtle/autoware.universe that referenced this pull request Feb 28, 2024
HansRobo pushed a commit that referenced this pull request Mar 12, 2024
…ation place (#5794)

Signed-off-by: Berkay Karaman <[email protected]>
Signed-off-by: Kotaro Yoshimoto <[email protected]>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:planning Route planning, decision-making, and navigation. (auto-assigned) tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
2 participants