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(obstacle_cruise_planner): fix get index #1331

Closed

Conversation

tkimura4
Copy link
Contributor

@tkimura4 tkimura4 commented Jul 13, 2022

Signed-off-by: tomoya.kimura tomoya.kimura@tier4.jp

Description

In such a case,
image
obstacle_cruise_planner died with following message.

[component_container_mt-50] terminate called after throwing an instance of 'std::out_of_range'
[component_container_mt-50]   what():  vector::_M_range_check: __n (which is 146) >= this->size() (which is 146)
[ERROR] [component_container_mt-50]: process has died [pid 1812534, exit code -6, cmd '/opt/ros/galactic/lib/rclcpp_components/component_container_mt --ros-args -r __node:=motion_planning_container -r __ns:=/planning/scenario_planning/lane_driving/motion_planning --params-file /tmp/launch_params_tybtn0if'].

This is caused by invalid access in this code when *start_idx == points.size() - 1.

tier4_autoware_utils::calcDistance2d(points.at(i), points.at(i + 1));

I fixed it.

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: tomoya.kimura <tomoya.kimura@tier4.jp>
@tkimura4 tkimura4 requested a review from takayuki5168 July 13, 2022 04:20
@codecov
Copy link

codecov bot commented Jul 13, 2022

Codecov Report

Merging #1331 (7f5508c) into main (44c4bd1) will decrease coverage by 0.00%.
The diff coverage is 0.00%.

@@           Coverage Diff            @@
##            main   #1331      +/-   ##
========================================
- Coverage   9.48%   9.48%   -0.01%     
========================================
  Files       1096    1096              
  Lines      76293   76307      +14     
  Branches   16990   16990              
========================================
  Hits        7239    7239              
- Misses     62440   62454      +14     
  Partials    6614    6614              
Flag Coverage Δ *Carryforward flag
differential 0.00% <0.00%> (?)
total 9.47% <0.00%> (ø) Carriedforward from 44c4bd1

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

Impacted Files Coverage Δ
..._planner/include/obstacle_cruise_planner/utils.hpp 0.00% <0.00%> (ø)
...lude/obstacle_cruise_planner/planner_interface.hpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44c4bd1...7f5508c. Read the comment docs.

@tkimura4
Copy link
Contributor Author

#1332

@tkimura4 tkimura4 closed this Jul 13, 2022
kyoichi-sugahara pushed a commit to kyoichi-sugahara/autoware.universe that referenced this pull request Jun 12, 2024
…ts (autowarefoundation#7177) (autowarefoundation#1331)

Signed-off-by: Yuki Takagi <yuki.takagi@tier4.jp>
Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com>
@tkimura4 tkimura4 deleted the fix/obstacle_cruise_died branch December 23, 2024 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant