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

Parking AI confused in large parking lots #1626

Merged
merged 12 commits into from
Oct 3, 2022

Conversation

krzychu124
Copy link
Member

@krzychu124 krzychu124 commented Aug 1, 2022

Fixes #924, fixes #423, fixes #352, fixes #1394

Proposed change should result in better detection of end PathPosition which vehicle should reach before starts flying to parking spot. It's not perfect solution but user reports say that change in behavior is significant and parking location decisions are much better compared to current public version.

I'm not entirely sure if we should completely remove endPos argument or only for specific cases like e.g.: residents calculating parking spot in advance to mimic the case: "I live in that city long time, I know best parking spots"


Update (4th Aug/22):

  • cherry-picked @DaEgi01 impl. of CW spiral,
  • fixed issue of preliminary loop exit of first loop finds parking spot in first iteration of the loop - first hit might be quite inaccurate due to how segment grid search works in general,
  • applied randomized spiral detection for parking/path position search where makes sense,
  • pass parking building position to increase accuracy of PathPosition search (new end position before car switch to "drifting mode")

Build zip

@krzychu124 krzychu124 added the PARKING Feature: Parking AI / restrictions / etc label Aug 1, 2022
@krzychu124 krzychu124 added this to the 11.6.7.0 milestone Aug 1, 2022
@krzychu124 krzychu124 self-assigned this Aug 1, 2022
DaEgi01 and others added 5 commits August 4, 2022 21:13
- renamed LoopUtil clockwise to counterclockwise since it was CCW all along.
- added LoopUtil clockwise
- adjusted spiral.cs to hold both, CW and CCW data and enumerators
- added tests and stuff
…omizer instance instead of accessing it every iteration
@krzychu124
Copy link
Member Author

No more low-hanging fruits. Ready for review.

@krzychu124 krzychu124 marked this pull request as ready for review August 23, 2022 22:36
@DaEgi01 DaEgi01 self-assigned this Aug 25, 2022
@DaEgi01 DaEgi01 self-requested a review August 25, 2022 09:21
kianzarrin
kianzarrin previously approved these changes Sep 20, 2022
Copy link
Collaborator

@kvakvs kvakvs left a comment

Choose a reason for hiding this comment

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

Code looks fine, but how do I test the parking? They parked before, they park now, how do I know it works?

@krzychu124
Copy link
Member Author

Code looks fine, but how do I test the parking? They parked before, they park now, how do I know it works?

Probably the easiest way is to observe parking spots that have two potential entrances, one banned for cars and much closer then other one not restricted but objectively requires longer path. Before the fix they were more likely to stop moving before entering restricted segment and fly the remaining distance to the parking spot. Now they should take longer, more realistic route and also fly only if necessary (e.g. only within the segment width/length).

Example scenario where I actually noticed the problem and tested it multiple times: cim going from blue building. Parking spaces are only available at the top. Red path is possible with old version (8/10 attempts), green is when using this version. Notice car ban.

image

@krzychu124 krzychu124 mentioned this pull request Oct 2, 2022
1 task
Copy link
Contributor

@chameleon-tbn chameleon-tbn left a comment

Choose a reason for hiding this comment

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

👍

@krzychu124 krzychu124 merged commit 4c23481 into master Oct 3, 2022
@krzychu124 krzychu124 deleted the parkingAI-starts-parking-too-early branch October 3, 2022 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PARKING Feature: Parking AI / restrictions / etc
Projects
None yet
5 participants