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(crosswalk): don't stop in front of the crosswalk if vehicle stuck in intersection #5722

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Nov 30, 2023

Description

🤖[deprecated] Generated by Copilot at 5ee3bc2

This pull request enhances the crosswalk module to handle different types of crosswalks and road situations. It adds and modifies some parameters, variables, and functions in the CrosswalkModuleManager, CrosswalkModule, and PlannerParam classes, and in the util.cpp and util.hpp files. It also updates the crosswalk.param.yaml configuration file and the manager.cpp file in the walkway module to support the changes. The main goal is to improve the behavior of the module in complex scenarios where multiple crosswalks and traffic lights are present.

Related Ticket: https://tier4.atlassian.net/browse/RT1-4093
Related PR: autowarefoundation/autoware_launch#714


Add new option to skip stuck vehicle checking for crosswalk in intersection. It seems that the vehilce doesn't have to stop in front of the crosswalk even when there is stopped vehicle in intersection because such a vehicle are basically going to move in almost all following situations.

      # param for stuck vehicles
      stuck_vehicle:
        enable_stuck_check_in_intersection: false # [-] flag to enable stuck vehicle checking for crosswalk which is in intersection

image

Crosswalk module skips stuck vehicle checking for crosswalks which are satisfied with following conditions:

  1. Is in intersection.
  2. Is controlled by traffic lights.

Screenshot from 2023-11-30 10-27-29

Therefore, the stuck checking still enables for simple crosswalk like this:

Screenshot from 2023-11-30 10-26-41

Tests performed

Effects on system behavior

Change crosswalk module behavior for stuck vehicle.

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.

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.

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 Nov 30, 2023
@satoshi-ota satoshi-ota marked this pull request as ready for review November 30, 2023 02:21
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Nov 30, 2023
Copy link

codecov bot commented Nov 30, 2023

Codecov Report

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

Comparison is base (765a596) 15.32% compared to head (5ee3bc2) 9.23%.
Report is 104 commits behind head on main.

Files Patch % Lines
...behavior_velocity_crosswalk_module/src/manager.cpp 0.00% 8 Missing and 2 partials ⚠️
..._velocity_crosswalk_module/src/scene_crosswalk.cpp 0.00% 6 Missing ⚠️
...ng/behavior_velocity_crosswalk_module/src/util.cpp 50.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #5722       +/-   ##
==========================================
- Coverage   15.32%   9.23%    -6.10%     
==========================================
  Files        1721      14     -1707     
  Lines      118559    1278   -117281     
  Branches    37995     756    -37239     
==========================================
- Hits        18169     118    -18051     
+ Misses      79657     905    -78752     
+ Partials    20733     255    -20478     
Flag Coverage Δ
differential 9.23% <10.00%> (?)
total ?

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

updateRTCStatus(
getUUID(lane_id), true, std::numeric_limits<double>::lowest(), path.header.stamp);
getUUID(crosswalk_lanelet_id), true, std::numeric_limits<double>::lowest(),
path.header.stamp);
};

const auto crosswalk_leg_elem_map = planning_utils::getRegElemMapOnPath<Crosswalk>(
path, rh->getLaneletMapPtr(), planner_data_->current_odometry->pose);

for (const auto & crosswalk : crosswalk_leg_elem_map) {
// NOTE: The former id is a lane id, and the latter one is a regulatory element's id.
Copy link
Contributor

Choose a reason for hiding this comment

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

@satoshi-ota
question for my understanging
crosswalk.second.id(): id of the lanelet on the path
crosswalk.first->crosswalkLanelet().id(): id of the crosswalk lanelet
crosswalk.first->id(): id of the crosswalk regulatory element

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.

Copy link
Contributor

@kyoichi-sugahara kyoichi-sugahara left a comment

Choose a reason for hiding this comment

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

LGTM!

@satoshi-ota satoshi-ota merged commit b42fce4 into autowarefoundation:main Nov 30, 2023
47 of 51 checks passed
@satoshi-ota satoshi-ota deleted the fix/crosswalk-stuck-condition branch November 30, 2023 11:54
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Dec 15, 2023
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) run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants