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(lane_change, pull_over): fix predicted path size is small case #517

Conversation

1222-takeshi
Copy link
Contributor

@1222-takeshi 1222-takeshi commented Mar 14, 2022

Related Issue(required)

Description(required)

Fixed segmentation fault when predicted path size was small.

sample code

#include <iostream>
#include <vector>

int main()
{
    std::vector<double> vec{5.0, 2.0, 3.0};
	std::cout << vec.size() << std::endl;
    std::vector<double> vec2;
    vec2.resize(vec.size()); // Without this, segmentation fault
	std::cout << "copy start" << std::endl;
    std::copy(vec.begin(), vec.end(), vec2.begin());
	std::cout << "copy end" << std::endl;
	std::cout << vec2.size() << std::endl;

    for(int i=0;i<vec2.size();i++){
	std::cout << vec2.at(i) << std::endl;
    }
	return 0;
}

Review Procedure(required)

Related PR(optional)

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

If you are adding new package following items are required:

  • Documentation with description of the package is available
  • A sample launch file and parameter file are available if the package contains executable nodes

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR / build-and-test-pr: Required to pass before the merge.
  • Build and test for PR / clang-tidy-pr: NOT required to pass before the merge. It is up to the reviewer(s). Found false positives? See the [guidelines][clang-tidy-guidelines].
  • Check spelling: NOT required to pass before the merge. It is up to the reviewer(s). See here if you want to add some words to the spell check dictionary.

@tkimura4
Copy link
Contributor

Without resizing, behavior_planner throws the following error on this line.

[ERROR] [component_container_mt-13]: process has died [pid 238, exit code -11, cmd '/opt/ros/galactic/lib/rclcpp_components/component_container_mt --ros-args -r __node:=behavior_planning_container -r __ns:=/planning/scenario_planning/lane_driving/behavior_planning --params-file /tmp/launch_params_or783mhq'].

This PR fixed this.

@codecov
Copy link

codecov bot commented Mar 14, 2022

Codecov Report

Merging #517 (0c3ae2c) into main (a03ab1f) will decrease coverage by 10.93%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #517       +/-   ##
==========================================
- Coverage   10.93%   0.00%   -10.94%     
==========================================
  Files         705      34      -671     
  Lines       49780    4832    -44948     
  Branches     7085       0     -7085     
==========================================
- Hits         5442       0     -5442     
+ Misses      39976    4832    -35144     
+ Partials     4362       0     -4362     
Impacted Files Coverage Δ
...path_planner/src/scene_module/lane_change/util.cpp 0.00% <0.00%> (ø)
...r_path_planner/src/scene_module/pull_over/util.cpp 0.00% <0.00%> (ø)
...analysis/src/control_performance_analysis_node.cpp
...planner/include/scene_module/crosswalk/manager.hpp
..._monitor/include/traffic_reader/traffic_reader.hpp
...g_rviz_plugin/src/trajectory_footprint/display.cpp
...utoware_auto_common/test/test_bool_comparisons.cpp
localization/ndt/include/ndt/pcl_generic.hpp
...anning_rviz_plugin/src/tools/jsk_overlay_utils.cpp
...auto_common/include/helper_functions/type_name.hpp
... and 663 more

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 a03ab1f...0c3ae2c. Read the comment docs.

Copy link
Contributor

@tkimura4 tkimura4 left a comment

Choose a reason for hiding this comment

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

LGTM

@tkimura4 tkimura4 merged commit f916650 into autowarefoundation:main Mar 15, 2022
mkuri pushed a commit to mkuri/autoware.universe that referenced this pull request Mar 15, 2022
* release v0.4.0

* fixed bug (autowarefoundation#717)

* Add nodelets of tlr nodes (autowarefoundation#715)

* Add classifier nodelet

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Replace boost::shared_ptr into std::shared_ptr

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Add lock guard

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Add detetcor nodelet

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Integrate main into node

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Add SubscriberStatusCallback

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* add image_transport_decompresser nodelet

Signed-off-by: Yukihiro Saito <[email protected]>

* Add visualizer nodelet

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* fixed bug

Signed-off-by: Yukihiro Saito <[email protected]>

* Fix plugin name

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Launch nodelet

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* Fix classifier constructor

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* add decompresser node

Signed-off-by: Yukihiro Saito <[email protected]>

* fix typo

Signed-off-by: Yukihiro Saito <[email protected]>

* fixed bug

Signed-off-by: Yukihiro Saito <[email protected]>

* fixed bug

Signed-off-by: Yukihiro Saito <[email protected]>

* cosmetic change

Signed-off-by: Yukihiro Saito <[email protected]>

* add param

Signed-off-by: Yukihiro Saito <[email protected]>

* fix bug

Signed-off-by: Yukihiro Saito <[email protected]>

* Fix build warning

Signed-off-by: Daisuke Nishimatsu <[email protected]>

* change rgb

Signed-off-by: Yukihiro Saito <[email protected]>

* change rgb

Signed-off-by: Yukihiro Saito <[email protected]>

Co-authored-by: Yukihiro Saito <[email protected]>

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <[email protected]>

* Revert "remove ROS1 packages temporarily"

This reverts commit e884716313c52a9392fe58f3e6a1c95e7515725e.

Signed-off-by: mitsudome-r <[email protected]>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <[email protected]>

* Rename launch files to launch.xml (autowarefoundation#28)

* Adjust copyright notice on 532 out of 699 source files (autowarefoundation#143)

* Use quotes for includes where appropriate (autowarefoundation#144)

* Use quotes for includes where appropriate

* Fix lint tests

* Make tests pass hopefully

* Port traffic light visualization (autowarefoundation#121)

* Port

Signed-off-by: Servando German Serrano <[email protected]>

* Fix package.xml

Signed-off-by: Servando German Serrano <[email protected]>

* Removed unused mutex

Signed-off-by: Servando German Serrano <[email protected]>

* Run uncrustify on the entire Pilot.Auto codebase (autowarefoundation#151)

* Run uncrustify on the entire Pilot.Auto codebase

* Exclude open PRs

* support traffic_light_state in traffi_light_visualization (autowarefoundation#1115) (autowarefoundation#339)

* support traffic_light_state in traffi_light_visualization

* support unsynced detection and classification result

* apply clang-format

Co-authored-by: Taichi Higashide <[email protected]>

* add use_sim-time option (autowarefoundation#454)

* Sync public repo (autowarefoundation#1228)

* [simple_planning_simulator] add readme (autowarefoundation#424)

* add readme of simple_planning_simulator

Signed-off-by: Takamasa Horibe <[email protected]>

* Update simulator/simple_planning_simulator/README.md

* set transit_margin_time to intersect. planner (autowarefoundation#460)

* Fix pose2twist (autowarefoundation#462)

Signed-off-by: Takagi, Isamu <[email protected]>

* Ros2 vehicle info param server (autowarefoundation#447)

* add vehicle_info_param_server

* update vehicle info

* apply format

* fix bug

* skip unnecessary search

* delete vehicle param file

* fix bug

* Ros2 fix topic name part2 (autowarefoundation#425)

* Fix topic name of traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <[email protected]>

* Fix issues in hdd_reader (autowarefoundation#466)

* Fix some issues detected by Coverity Scan and Clang-Tidy

* Update launch command

* Add more `close(new_sock)`

* Simplify the definitions of struct

* fix: re-construct laneletMapLayer for reindex RTree (autowarefoundation#463)

* Rviz overlay render fix (autowarefoundation#461)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <[email protected]>

* Rviz overlay render in update (autowarefoundation#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <[email protected]>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <[email protected]>

* uncrustified

Signed-off-by: Adam Dabrowski <[email protected]>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <[email protected]>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <[email protected]>

* Adepted remaining vehicle plugin classes to render-in-update concept. Returned to MFD superclass

Signed-off-by: Adam Dabrowski <[email protected]>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <[email protected]>

Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: tkimura4 <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <[email protected]>

* Use sensor data qos for traffic light recognition (autowarefoundation#1440)

Signed-off-by: wep21 <[email protected]>

* Add pre-commit (autowarefoundation#1560)

* add pre-commit

* add pre-commit-config

* add additional settings for private repository

* use default pre-commit-config

* update pre-commit setting

* Ignore whitespace for line breaks in markdown

* Update .github/workflows/pre-commit.yml

Co-authored-by: Kazuki Miyahara <[email protected]>

* exclude svg

* remove pretty-format-json

* add double-quote-string-fixer

* consider COLCON_IGNORE file when seaching modified package

* format file

* pre-commit fixes

* Update pre-commit.yml

* Update .pre-commit-config.yaml

Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: pre-commit <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>

* Porting traffic light viz (autowarefoundation#1284)

* Feature/traffic light viz (autowarefoundation#1001)

* add tl map viz

* bug fix

* update map visualizer

* add launch

* add install in cmake

* remove unused file

* fix build error

* Fix lint

Signed-off-by: wep21 <[email protected]>

* Fix typo

Signed-off-by: wep21 <[email protected]>

* Fix topic name and qos

Signed-off-by: wep21 <[email protected]>

* Replace deprecated duration api

Signed-off-by: wep21 <[email protected]>

Co-authored-by: Yukihiro Saito <[email protected]>
Co-authored-by: wep21 <[email protected]>

* suppress warnings for traffic light classifier (autowarefoundation#1762)

* add Werror

* fix type

* fix unused

* Fix -Wunused-parameter (autowarefoundation#1836)

* Fix -Wunused-parameter

Signed-off-by: Kenji Miyake <[email protected]>

* Fix mistake

Signed-off-by: Kenji Miyake <[email protected]>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <[email protected]>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <[email protected]>

Co-authored-by: Hiroki OTA <[email protected]>

* add sort-package-xml hook in pre-commit (autowarefoundation#1881)

* add sort xml hook in pre-commit

* change retval to exit_status

* rename

* add prettier plugin-xml

* use early return

* add license note

* add tier4 license

* restore prettier

* change license order

* move local hooks to public repo

* move prettier-xml to pre-commit-hooks-ros

* update version for bug-fix

* apply pre-commit

* Change formatter to clang-format and black (autowarefoundation#2332)

* Revert "Temporarily comment out pre-commit hooks"

This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3.

* Replace ament_lint_common with autoware_lint_common

Signed-off-by: Kenji Miyake <[email protected]>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <[email protected]>

* Apply Black

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <[email protected]>

* Apply clang-format

Signed-off-by: Kenji Miyake <[email protected]>

* Fix build errors

Signed-off-by: Kenji Miyake <[email protected]>

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <[email protected]>

* [traffic_light_visualization] support autoware auto msgs  (autowarefoundation#517)

* doc traffic light visualizer (autowarefoundation#628)

* add readme

* run pre-commit

* add purpose

* fix typo

* run pre-commit

* remove reference

* update descriptions

* Update traffic light topic name (autowarefoundation#729)

* Update traffic light topic name

Signed-off-by: wep21 <[email protected]>

* Update traffic light topic name in perception

Signed-off-by: wep21 <[email protected]>

Co-authored-by: mitsudome-r <[email protected]>
Co-authored-by: Yukihiro Saito <[email protected]>
Co-authored-by: Daisuke Nishimatsu <[email protected]>
Co-authored-by: Nikolai Morin <[email protected]>
Co-authored-by: Servando <[email protected]>
Co-authored-by: Shinnosuke Hirakawa <[email protected]>
Co-authored-by: Taichi Higashide <[email protected]>
Co-authored-by: tkimura4 <[email protected]>
Co-authored-by: Ryohsuke Mitsudome <[email protected]>
Co-authored-by: Takamasa Horibe <[email protected]>
Co-authored-by: Takagi, Isamu <[email protected]>
Co-authored-by: Kazuki Miyahara <[email protected]>
Co-authored-by: Makoto Tokunaga <[email protected]>
Co-authored-by: Adam Dąbrowski <[email protected]>
Co-authored-by: Keisuke Shima <[email protected]>
Co-authored-by: pre-commit <[email protected]>
Co-authored-by: Kenji Miyake <[email protected]>
Co-authored-by: wep21 <[email protected]>
Co-authored-by: Hiroki OTA <[email protected]>
Co-authored-by: Satoshi OTA <[email protected]>
Co-authored-by: Takeshi Miura <[email protected]>
@1222-takeshi 1222-takeshi deleted the fix/fix-lane-change-and-pull-over-utils branch March 17, 2022 01:23
1222-takeshi referenced this pull request in tier4/autoware.universe Mar 22, 2022
)

* fix(lane_change):fix predicted path size is small case

* fix(pull_over):fix predicted path size is small case
tkimura4 referenced this pull request in tier4/autoware.universe Oct 24, 2022
kosuke55 pushed a commit to kosuke55/autoware.universe that referenced this pull request May 29, 2023
fix(intersection): decide go/stop by checking pass judge  (autowarefoundation#3711)
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.

2 participants