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(avoidance): fix invalid optional access #5804

Merged

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Dec 7, 2023

Description

🤖[deprecated] Generated by Copilot at 29517fd

Improved return-to-center shift line generation in behavior_path_avoidance_module. Added a threshold and adjusted the shift point condition to reduce redundant or invalid shift lines.


Fix following error:

#9  0x00007f6f607109cd in std::__throw_bad_optional_access () at /usr/include/c++/11/optional:102                                                                                                               
#10 0x00007f6f60714366 in std::optional<behavior_path_planner::ShiftLine>::value() const & (this=0x7f6f406cd200)                                                                                                
    at /usr/include/c++/11/optional:948                                                                 
#11 behavior_path_planner::utils::avoidance::ShiftLineGenerator::addReturnShiftLine (this=0x7f6f406cd1d0, shift_lines=..., data=...,                                                                            
    debug=...) at /home/satoshi/pilot-auto/src/autoware/universe/planning/behavior_path_avoidance_module/src/shift_line_generator.cpp:986                                                                       
#12 0x00007f6f607fee0f in behavior_path_planner::utils::avoidance::ShiftLineGenerator::applyPreProcess (this=0x7f6f406cd1d0,                                                                                    
    outlines=..., data=..., debug=...)                                                                  
    at /home/satoshi/pilot-auto/src/autoware/universe/planning/behavior_path_avoidance_module/src/shift_line_generator.cpp:397                                                                                  
#13 0x00007f6f607fef68 in behavior_path_planner::utils::avoidance::ShiftLineGenerator::update (this=this@entry=0x7f6f406cd1d0, data=...,                                                                        
    debug=...) at /home/satoshi/pilot-auto/src/autoware/universe/planning/behavior_path_avoidance_module/src/shift_line_generator.cpp:110                                                                       
#14 0x00007f6f60728dd4 in behavior_path_planner::AvoidanceModule::updateData (this=0x7f6f406ccd50)                                                                                                              
    at /home/satoshi/pilot-auto/src/autoware/universe/planning/behavior_path_avoidance_module/src/scene.cpp:1196                                                                                                
#15 0x00007f6f6072b288 in behavior_path_planner::SceneModuleInterface::run (this=0x7f6f406ccd50)                                                                                                                
    at /home/satoshi/pilot-auto/install/behavior_path_planner_common/include/behavior_path_planner_common/interface/scene_module_interface.hpp:158
#16 0x00007f6f61d045f7 in behavior_path_planner::PlannerManager::run (this=this@entry=0x7f6f4c110b60,                                                                                                           
    module_ptr=std::shared_ptr<behavior_path_planner::SceneModuleInterface> (use count 4, weak count 1) = {...},                                                                                                
    planner_data=std::shared_ptr<behavior_path_planner::PlannerData> (use count 21, weak count 0) = {...}, previous_module_output=...)                                                                          
    at /home/satoshi/pilot-auto/src/autoware/universe/planning/behavior_path_planner/include/behavior_path_planner/planner_manager.hpp:280 

Tests performed

Psim

Effects on system behavior

Nothing.

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.

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@satoshi-ota satoshi-ota marked this pull request as ready for review December 7, 2023 08:13
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Dec 7, 2023
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 added the tag:run-build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 7, 2023
@satoshi-ota satoshi-ota enabled auto-merge (squash) December 7, 2023 09:08
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

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

Comparison is base (765a596) 15.32% compared to head (29517fd) 12.73%.
Report is 172 commits behind head on main.

Files Patch % Lines
...nning/behavior_path_avoidance_module/src/scene.cpp 13.04% 561 Missing and 92 partials ⚠️
...path_avoidance_module/src/shift_line_generator.cpp 12.99% 443 Missing and 66 partials ⚠️
...nning/behavior_path_avoidance_module/src/utils.cpp 3.75% 195 Missing and 10 partials ⚠️
...th_avoidance_by_lane_change_module/src/manager.cpp 17.70% 0 Missing and 79 partials ⚠️
...nning/behavior_path_avoidance_module/src/debug.cpp 0.00% 61 Missing ⚠️
...ing/behavior_path_avoidance_module/src/manager.cpp 18.86% 0 Missing and 43 partials ⚠️
...test/test_behavior_path_planner_node_interface.cpp 25.53% 0 Missing and 35 partials ⚠️
...test/test_behavior_path_planner_node_interface.cpp 26.08% 0 Missing and 34 partials ⚠️
..._avoidance_by_lane_change_module/src/interface.cpp 28.57% 8 Missing and 2 partials ⚠️
.../include/behavior_path_avoidance_module/helper.hpp 22.22% 5 Missing and 2 partials ⚠️
... and 4 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #5804       +/-   ##
===========================================
- Coverage   15.32%   12.73%    -2.59%     
===========================================
  Files        1721       18     -1703     
  Lines      118559     3337   -115222     
  Branches    37995     1884    -36111     
===========================================
- Hits        18169      425    -17744     
+ Misses      79657     2163    -77494     
+ Partials    20733      749    -19984     
Flag Coverage Δ
differential 12.73% <13.24%> (?)
total ?

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

@satoshi-ota satoshi-ota merged commit 3ec6201 into autowarefoundation:main Dec 7, 2023
42 of 46 checks passed
@satoshi-ota satoshi-ota deleted the fix/invalid-optional-access branch December 7, 2023 10:27
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Dec 15, 2023
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Dec 19, 2023
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: karishma <karishma@interpl.ai>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request Dec 19, 2023
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: karishma <karishma@interpl.ai>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 26, 2024
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
karishma1911 pushed a commit to Interplai/autoware.universe that referenced this pull request May 28, 2024
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
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) tag: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.

2 participants