feat(crosswalk): forcibly stop for pedestrians that are on crosswalk poylgon#12015
Conversation
|
Thank you for contributing to the Autoware project! 🚧 If your pull request is in progress, switch it to draft mode. Please ensure:
|
There was a problem hiding this comment.
Pull request overview
This PR implements a feature to forcibly stop the ego vehicle for any pedestrians present on the crosswalk polygon, regardless of their velocity, trajectory, or other conditions. The feature is controlled by the stop_for_pedestrian_on_crosswalk parameter (default: false) and ensures the ego vehicle remains stopped until pedestrians leave the crosswalk polygon.
Changes:
- Added new parameter
stop_for_pedestrian_on_crosswalkto control the feature - Modified collision detection logic to create virtual collision points for pedestrians on crosswalk
- Updated object state transition logic to force YIELD state for pedestrians on crosswalk when feature is enabled
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.hpp | Added new parameter to struct, updated function signatures to accept is_object_on_crosswalk flag, and implemented force-stop logic in transitState |
| planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/scene_crosswalk.cpp | Refactored is_object_on_crosswalk calculation, added collision point creation for pedestrians on crosswalk, and updated function calls with new parameter |
| planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/src/manager.cpp | Added parameter loading for stop_for_pedestrian_on_crosswalk |
| planning/behavior_velocity_planner/autoware_behavior_velocity_crosswalk_module/config/crosswalk.param.yaml | Added new parameter with default value false and documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| const unique_identifier_msgs::msg::UUID & uuid, const geometry_msgs::msg::Point & position, const double vel, | ||
| const rclcpp::Time & now, const bool is_ego_yielding, const bool has_traffic_light, | ||
| const std::optional<CollisionPoint> & collision_point, const uint8_t classification, | ||
| const PlannerParam & planner_param, const lanelet::BasicPolygon2d & crosswalk_polygon, |
There was a problem hiding this comment.
The function signature formatting was changed to place multiple parameters on the same line, which is inconsistent with the formatting style used for the transitState function above (lines 212-218). Consider keeping the existing style of one parameter per line for better readability and consistency with the rest of the codebase.
| const unique_identifier_msgs::msg::UUID & uuid, const geometry_msgs::msg::Point & position, const double vel, | |
| const rclcpp::Time & now, const bool is_ego_yielding, const bool has_traffic_light, | |
| const std::optional<CollisionPoint> & collision_point, const uint8_t classification, | |
| const PlannerParam & planner_param, const lanelet::BasicPolygon2d & crosswalk_polygon, | |
| const unique_identifier_msgs::msg::UUID & uuid, | |
| const geometry_msgs::msg::Point & position, | |
| const double vel, | |
| const rclcpp::Time & now, | |
| const bool is_ego_yielding, | |
| const bool has_traffic_light, | |
| const std::optional<CollisionPoint> & collision_point, | |
| const uint8_t classification, | |
| const PlannerParam & planner_param, | |
| const lanelet::BasicPolygon2d & crosswalk_polygon, |
…dless of any other conditions Signed-off-by: TakahikoHasegawa97 <takahiko.hasegawa@tier4.jp>
Signed-off-by: TakahikoHasegawa97 <takahiko.hasegawa@tier4.jp>
…crosswalk_module/src/scene_crosswalk.cpp Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
f8629de to
2d3f580
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #12015 +/- ##
==========================================
+ Coverage 19.20% 19.50% +0.30%
==========================================
Files 1895 1895
Lines 130246 130502 +256
Branches 46613 46660 +47
==========================================
+ Hits 25010 25459 +449
- Misses 85652 85811 +159
+ Partials 19584 19232 -352
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@Kotakku @yuki-takagi-66 @satoshi-ota |
Description
The feature is implemented to stop for any pedestrians on crosswalk. Ego will continue to stop until they leave the crosswalk polygon; Ego will stop as long as pedestrians are inside the crosswalk polygon.
stop_for_pedestrian_on_crosswalkparameter❗ Should be merged after autowarefoundation/autoware_launch#1744 is merged
Results
Before
A_Before.mp4
After
A_After.mp4
Before
B_before.mp4
After
B_after.mp4
Before
C_before.mp4
After
C_after.mp4
Related links
Parent Issue:
How was this PR tested?
Notes for reviewers
None.
Interface changes
None.
Effects on system behavior
None.