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(behavior_path_planner): fix invalid access in avoidance module #4081

Merged
merged 1 commit into from
Jun 26, 2023

Conversation

tkimura4
Copy link
Contributor

@tkimura4 tkimura4 commented Jun 26, 2023

Description

image

When avoiding near the goal, the avoidance module occasionally dies with the following error when the path length changes

[component_container_mt-28] terminate called after throwing an instance of 'std::out_of_range'
[component_container_mt-28]   what():  vector::_M_range_check: __n (which is 209) >= this->size() (which is 86)
[ERROR] [component_container_mt-28]: process has died [pid 1028191, exit code -6, cmd '/opt/ros/humble/lib/rclcpp_components/component_container_mt --ros-args -r __node:=behavior_planning_container -r __ns:=/planning/scenario_planning/lane_driving/behavior_planning -p use_sim_time:=False -p wheel_radius:=0.31 -p wheel_width:=0.18 -p wheel_base:=2.75 -p wheel_tread:=1.485 -p front_overhang:=0.8 -p rear_overhang:=0.85 -p left_overhang:=0.105 -p right_overhang:=0.105 -p vehicle_height:=2.5 -p max_steer_angle:=0.65'].

This is because blinker_end_idx can be larger than the size of the path.
(In the case of the image above, the size of path was 158 and blinker_end_idx266 was 266.)

I fixed this by forcing the blinker index to be less than the size of the path

Related links

Tests performed

Notes for reviewers

Interface changes

Effects on system behavior

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.

Signed-off-by: tomoya.kimura <tomoya.kimura@tier4.jp>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Jun 26, 2023
@codecov
Copy link

codecov bot commented Jun 26, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.20 🎉

Comparison is base (aacd1d2) 14.43% compared to head (9de3c40) 14.64%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4081      +/-   ##
==========================================
+ Coverage   14.43%   14.64%   +0.20%     
==========================================
  Files        1462     1475      +13     
  Lines      102977   106449    +3472     
  Branches    29876    32297    +2421     
==========================================
+ Hits        14864    15585     +721     
- Misses      71879    73848    +1969     
- Partials    16234    17016     +782     
Flag Coverage Δ *Carryforward flag
differential 13.64% <0.00%> (?)
total 14.43% <ø> (+<0.01%) ⬆️ Carriedforward from aacd1d2

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

Impacted Files Coverage Δ
...er/src/scene_module/avoidance/avoidance_module.cpp 9.88% <0.00%> (+5.74%) ⬆️

... and 41 files with indirect coverage changes

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

@tkimura4 tkimura4 merged commit 52099a5 into autowarefoundation:main Jun 26, 2023
@tkimura4 tkimura4 deleted the fix/avoidance_died branch June 26, 2023 12:43
tkimura4 added a commit to tier4/autoware.universe that referenced this pull request Jun 26, 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants