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(obstacle_avoidance_planner): check footprint with boost::geometry::intersection #1999

Merged
merged 5 commits into from
Jan 23, 2023

Conversation

beyzanurkaya
Copy link
Contributor

@beyzanurkaya beyzanurkaya commented Sep 30, 2022

Description

This PR was created to add a different approach to checking that the footprint of the vehicle is within the drivable area.

Fixes: #1716

before this PR, 175 needs to merge

Tests performed

I was using boost::geometry::intersection as a separate approach at the first place. But the current version already uses the boost library so it doesn't make sense to add my approach as an option. It makes more sense to combine the current approach and my approach. Because both approaches have limitations;

Current version's limitation:

In current version the corners of the footprint are checked. But like in following diagram if the vehicle is long enough, corners can be in the drivable area but body of vehicle is outside the drivable area. So it need a second check.

intersection drawio

If you set is_considering_footprint_edges param false:

no-stop.mp4

New version's limitation:

In the new version, it is checked whether there is an intersection between the vehicle and the drivable area. if there is an intersection, it is concluded that the vehicle is outside the driveable area as it is on the driveable area boundaries. But, when the vehicle is completely outside the drivable area boundaries, there will be no intersection and in this approach the vehicle will be considered in the drivable area. however, the vehicle is outside the drivable area as shown in the following diagram.

outside drawio

If you set is_considering_footprint_edges param true:

stop.mp4

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.

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 2 times, most recently from 05b7a3e to b6f1108 Compare September 30, 2022 14:26
@beyzanurkaya beyzanurkaya changed the title 1716 check footprint with boost intersection feat(obstacle_avoidance_planner):check footprint with boost intersection#1716 Oct 3, 2022
@beyzanurkaya beyzanurkaya changed the title feat(obstacle_avoidance_planner):check footprint with boost intersection#1716 feat(obstacle_avoidance_planner):check footprint with boost intersection Oct 3, 2022
@beyzanurkaya
Copy link
Contributor Author

@takayuki5168

When you create a PR of checking footprint's collision check, could you add an option to use the current collision check?

I didn't understand exactly what you mean. Should I create a new function or check it in the same function?

@takayuki5168
Copy link
Contributor

@beyzanurkaya
I wanted to say I want a flag of a ros paramter for which collision check algorithm to use, the currently implemented one or new one you will implement.

@beyzanurkaya
Copy link
Contributor Author

I'm gonna add an option parameter if you want to use boost.intersection for check footprint. Also I tried to compare footprint area intersection area so if those have close value I can say footprint is in drivable area. But even though there is intersection between footprint and drivable area, intersection area is zero. I tried to figure out why.

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch from 5201e9d to 6cfba93 Compare October 12, 2022 13:20
@codecov
Copy link

codecov bot commented Oct 12, 2022

Codecov Report

Base: 11.37% // Head: 11.34% // Decreases project coverage by -0.04% ⚠️

Coverage data is based on head (2bfe536) compared to base (b38fa6a).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1999      +/-   ##
==========================================
- Coverage   11.37%   11.34%   -0.04%     
==========================================
  Files        1277     1277              
  Lines       89284    89807     +523     
  Branches    23649    24076     +427     
==========================================
+ Hits        10158    10186      +28     
- Misses      68354    68811     +457     
- Partials    10772    10810      +38     
Flag Coverage Δ *Carryforward flag
differential 17.39% <0.00%> (?)
total 11.37% <0.00%> (ø) Carriedforward from fe8d090

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

Impacted Files Coverage Δ
...lanner/include/obstacle_avoidance_planner/node.hpp 0.00% <ø> (ø)
...include/obstacle_avoidance_planner/utils/utils.hpp 36.47% <ø> (ø)
planning/obstacle_avoidance_planner/src/node.cpp 0.17% <0.00%> (+0.05%) ⬆️
...ing/obstacle_avoidance_planner/src/utils/utils.cpp 11.97% <0.00%> (+1.59%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 2 times, most recently from bd41a0e to 74e5cbf Compare October 18, 2022 15:43
@beyzanurkaya beyzanurkaya marked this pull request as ready for review October 18, 2022 15:48
@beyzanurkaya
Copy link
Contributor Author

@takayuki5168 it's ready for review :)

@mitsudome-r
Copy link
Member

@TakaHoribe Could you assign a person to review?

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 4 times, most recently from 7fba151 to 097bdbe Compare January 17, 2023 07:29
@github-actions github-actions bot removed the type:documentation Creating or refining documentation. (auto-assigned) label Jan 17, 2023
@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 2 times, most recently from 4d5255b to 13ea0bd Compare January 17, 2023 07:33
@beyzanurkaya
Copy link
Contributor Author

beyzanurkaya commented Jan 17, 2023

@mehmetdogru @takayuki5168 @mitsudome-r I updated the code and description.

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch from a80b91e to 13ea0bd Compare January 17, 2023 09:23
right_bound_line.push_back({p.x, p.y});
}

back_bound_line = {left_bound_line.front(), right_bound_line.front()};
Copy link
Contributor

Choose a reason for hiding this comment

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

I think there is a mistake here and the front is used instead of the back.

Suggested change
back_bound_line = {left_bound_line.front(), right_bound_line.front()};
back_bound_line = {left_bound_line.back(), right_bound_line.back()};

@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 2 times, most recently from 25da499 to 3c43118 Compare January 17, 2023 11:19
…ry::intersection

Signed-off-by: beyza <bnk@leodrive.ai>
Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch 2 times, most recently from 36359a8 to ad280ca Compare January 19, 2023 09:57
Signed-off-by: beyza <bnk@leodrive.ai>
Copy link
Contributor

@takayuki5168 takayuki5168 left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: beyza <bnk@leodrive.ai>
@beyzanurkaya beyzanurkaya force-pushed the 1716-check-footprint-with-boost-intersection branch from 398d089 to 2bfe536 Compare January 23, 2023 17:35
@beyzanurkaya beyzanurkaya merged commit bc370f2 into main Jan 23, 2023
@beyzanurkaya beyzanurkaya deleted the 1716-check-footprint-with-boost-intersection branch January 23, 2023 18:24
maxime-clem pushed a commit to maxime-clem/autoware.universe that referenced this pull request Jan 30, 2023
…y::intersection (autowarefoundation#1999)

* feat(obstacle_avoidance_planner): add second check with boost::geometry::intersection

Signed-off-by: beyza <bnk@leodrive.ai>

* add is_considering_footprint_edges param

Signed-off-by: beyza <bnk@leodrive.ai>

* ci(pre-commit): autofix

* add description

Signed-off-by: beyza <bnk@leodrive.ai>

* add false return

Signed-off-by: beyza <bnk@leodrive.ai>

Signed-off-by: beyza <bnk@leodrive.ai>
Co-authored-by: beyza <bnk@leodrive.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
lexavtanke pushed a commit to lexavtanke/autoware.universe that referenced this pull request Jan 31, 2023
…y::intersection (autowarefoundation#1999)

* feat(obstacle_avoidance_planner): add second check with boost::geometry::intersection

Signed-off-by: beyza <bnk@leodrive.ai>

* add is_considering_footprint_edges param

Signed-off-by: beyza <bnk@leodrive.ai>

* ci(pre-commit): autofix

* add description

Signed-off-by: beyza <bnk@leodrive.ai>

* add false return

Signed-off-by: beyza <bnk@leodrive.ai>

Signed-off-by: beyza <bnk@leodrive.ai>
Co-authored-by: beyza <bnk@leodrive.ai>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Signed-off-by: Alexey Panferov <lexavtanke@gmail.com>
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)
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Checking only 4 corners in the drivable area
7 participants