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(costmap_generator): restrict costmap within parking lot #996

Merged
merged 3 commits into from
Aug 5, 2022

Conversation

NorahXiong
Copy link
Contributor

@NorahXiong NorahXiong commented May 30, 2022

Signed-off-by: NorahXiong [email protected]

Description

fix #947

Related links

#947

Tests performed

Tested in planning simulator.

Before fixing: nearby roads are included in freespace planning boundary
image

After fixing: only parking lot is able for freespace planning
image

Notes for reviewers

This fixing is only for parking scenario. Not sure if costmap_generator will be used for other scenarios in the future. If so, this fixing may be inappropriate and more comprehensive design is needed.

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.

@NorahXiong NorahXiong requested a review from tkimura4 May 30, 2022 10:18
@@ -276,7 +276,6 @@ void CostmapGenerator::onLaneletMapBin(
lanelet::utils::conversion::fromBinMsg(*msg, lanelet_map_);

if (use_wayarea_) {
loadRoadAreasFromLaneletMap(lanelet_map_, &area_points_);
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, if you remove this we can't support the case when lanes are not in free space areas like this. (Please regard the red areas are not free space areas.)

Therefore, the vehicle can't plan a trajectory after reaching the blue circle point.
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did take this case into consideration but I think the lanes and the parking lot are meant to be overlapped as the comment of "getLinkedParkingLot" indicates.
https://github.com/autowarefoundation/autoware.universe/blob/main/map/lanelet2_extension/lib/query.cpp#L437
Not sure about that, if it is not the convention, maybe some guidelines for map producing should be provided.

Besides, it seems no departure strategy is implemented for parking scenario so far. So I think the car can not reach the blue point from a parking spot.

Copy link
Contributor

Choose a reason for hiding this comment

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

@NorahXiong Thank you for your comment!

I did take this case into consideration but I think the lanes and the parking lot are meant to be overlapped as the comment of "getLinkedParkingLot" indicates.

I see. Let me ask other engineers about the map spec. 🙇
@mitsudome-r @xmfcx @yukkysaito Is it reasonable to assume that lanes are overlapped with free spaces in a parking lot?

maybe some guidelines for map producing should be provided.

Yes, it is really desired. But there is no good one, we're sorry about that. 😢

Besides, it seems no departure strategy is implemented for parking scenario so far. So I think the car can not reach the blue point from a parking spot.

In this case, I think the vehicle should start with the lane driving scenario.
(If not, I guess it's a bug.)

Copy link
Contributor

Choose a reason for hiding this comment

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

@mitsudome-r @xmfcx @yukkysaito Is it reasonable to assume that lanes are overlapped with free spaces in a parking lot?

IMO, the assumption is ok.
If we don't allow this assumption, some people can make like the following figure (green is the parking area).
Then green area borders must be shared with road lanes. It is difficult to create such a map.

image (1)

@codecov
Copy link

codecov bot commented May 30, 2022

Codecov Report

Merging #996 (c73853d) into main (d845a78) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##             main     #996      +/-   ##
==========================================
- Coverage   10.92%   10.91%   -0.01%     
==========================================
  Files        1037     1037              
  Lines       69354    69460     +106     
  Branches    17824    17826       +2     
==========================================
+ Hits         7574     7584      +10     
- Misses      53470    53565      +95     
- Partials     8310     8311       +1     
Flag Coverage Δ *Carryforward flag
differential 32.27% <0.00%> (?)
total 10.92% <0.00%> (ø) Carriedforward from d845a78

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

Impacted Files Coverage Δ
...nodes/costmap_generator/costmap_generator_node.cpp 0.00% <0.00%> (ø)
...rator/nodes/costmap_generator/object_map_utils.cpp 0.00% <0.00%> (ø)
.../costmap_generator/test/test_points_to_costmap.cpp 65.16% <0.00%> (-0.75%) ⬇️
...costmap_generator/test/test_objects_to_costmap.cpp 76.27% <0.00%> (+0.40%) ⬆️
...ator/nodes/costmap_generator/points_to_costmap.cpp 82.35% <0.00%> (+0.72%) ⬆️
...tor/nodes/costmap_generator/objects_to_costmap.cpp 33.33% <0.00%> (+5.33%) ⬆️

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

@NorahXiong NorahXiong requested review from kenji-miyake and removed request for tkimura4 June 10, 2022 05:11
@kenji-miyake
Copy link
Contributor

I'll ask some people who are familiar with the Parking components.

@kenji-miyake
Copy link
Contributor

@NorahXiong By the way, could you confirm the guidelines and check these boxes, please?
image

@NorahXiong
Copy link
Contributor Author

@NorahXiong By the way, could you confirm the guidelines and check these boxes, please? image

Confirmed now.

@TakaHoribe
Copy link
Contributor

@NorahXiong
Thank you for your contribution.
This module is currently used only for parking purpose but could be extended to any freespace planning usecases.
So we should have options for users to select the planning area.
Would you add parameters to select the planning areas in both yaml file and cpp code? It's going to be like:

use_wayarea: true
use_parkinglot: true
if (use_wayarea_) {
    loadRoadAreasFromLaneletMap(lanelet_map_, &area_points_);
}
if (use_parkinglot_) {
    loadParkingAreasFromLaneletMap(lanelet_map_, &area_points_);
}

Please let both true for now since the map used in the tutorial doesn't have an overlapping area.

@kenji-miyake
Copy link
Contributor

Please let both true for now since the map used in the tutorial doesn't have an overlapping area.

@TakaHoribe Please let me confirm this sentence.
Why did you think "the map used in the tutorial doesn't have an overlapping area"?
I think it does have an overlapping area, and enabling wayarea causes this issue.
So I believe use_wayarea_ should be false. Am I wrong? 🤔

@xmfcx xmfcx self-requested a review June 14, 2022 16:07
@mitsudome-r
Copy link
Member

From the ASWG discussion, @xmfcx and @mitsudome-r agreed to add a parameter as mentioned by @TakaHoribe 's comment.

@NorahXiong Could you modify the code and add a parameter for users to select which map primitives will be used for free space?

@NorahXiong
Copy link
Contributor Author

From the ASWG discussion, @xmfcx and @mitsudome-r agreed to add a parameter as mentioned by @TakaHoribe 's comment.

@NorahXiong Could you modify the code and add a parameter for users to select which map primitives will be used for free space?

Sure. I will work on it.

@xmfcx
Copy link
Contributor

xmfcx commented Jul 19, 2022

@TakaHoribe could you review this please?

@xmfcx xmfcx added this to the Bus ODD Sep-Oct Milestone milestone Jul 19, 2022
@TakaHoribe
Copy link
Contributor

@xmfcx Sorry for my late. I'll take it.

Copy link
Contributor

@TakaHoribe TakaHoribe left a comment

Choose a reason for hiding this comment

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

LGTM.

Confirmed works well in my environment.

use_wayarea = true
image

use_wayarea = false
image

@TakaHoribe
Copy link
Contributor

@NorahXiong Sorry for the long wait. Thank you for your work!

@Sharrrrk Sharrrrk enabled auto-merge (squash) July 25, 2022 09:26
@Sharrrrk Sharrrrk merged commit 1e9e9af into autowarefoundation:main Aug 5, 2022
HaoruXue pushed a commit to HaoruXue/autoware.universe that referenced this pull request Aug 10, 2022
…foundation#996)

* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Sep 28, 2022
* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 3, 2022
* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
yukke42 pushed a commit to tzhong518/autoware.universe that referenced this pull request Oct 14, 2022
…foundation#996)

* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
boyali referenced this pull request in boyali/autoware.universe Oct 19, 2022
* fix(costmap_generator): restrict costmap within parking lot

Signed-off-by: NorahXiong <[email protected]>

* add parameters for free space planning area selection

Signed-off-by: NorahXiong <[email protected]>

* ci(pre-commit): autofix

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
YoshiRi pushed a commit to YoshiRi/autoware.universe that referenced this pull request Oct 31, 2023
…dar_tracking_algorithm

chore(radar_object_tracker): refine radar object tracker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Unreasonable freespace planning area in parking scenario
7 participants