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 <border_goldenmarket@yahoo.co.jp>

* Replace boost::shared_ptr into std::shared_ptr

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Add lock guard

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Add detetcor nodelet

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Integrate main into node

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Add SubscriberStatusCallback

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add image_transport_decompresser nodelet

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* Add visualizer nodelet

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* fixed bug

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* Fix plugin name

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Launch nodelet

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* Fix classifier constructor

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* add decompresser node

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* fix typo

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* fixed bug

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* fixed bug

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* cosmetic change

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* add param

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* fix bug

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* Fix build warning

Signed-off-by: Daisuke Nishimatsu <border_goldenmarket@yahoo.co.jp>

* change rgb

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

* change rgb

Signed-off-by: Yukihiro Saito <yukky.saito@gmail.com>

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>

* remove ROS1 packages temporarily

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* Revert "remove ROS1 packages temporarily"

This reverts commit e884716313c52a9392fe58f3e6a1c95e7515725e.

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* add COLCON_IGNORE to ros1 packages

Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>

* 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 <servando.german.serrano@linaro.org>

* Fix package.xml

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* Removed unused mutex

Signed-off-by: Servando German Serrano <servando.german.serrano@linaro.org>

* 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 <taichi.higashide@tier4.jp>

* 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 <horibe.takamasa@gmail.com>

* 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 <isamu.takagi@tier4.jp>

* 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 <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_visualization

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix topic name of traffic_light_map_based_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_recognition

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_classifier

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* Fix lint traffic_light_ssd_fine_detector

Signed-off-by: Takagi, Isamu <isamu.takagi@tier4.jp>

* 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 <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* back to RTD as superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* Rviz overlay render in update (autowarefoundation#465)

* Moved painiting in SteeringAngle plugin to update()

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* super class now back to MFD

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* uncrustified

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* acquire data in mutex

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* removed unnecessary includes and some dead code

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

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

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

* restored RTD superclass

Signed-off-by: Adam Dabrowski <adam.dabrowski@robotec.ai>

Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>

* Remove use_sim_time for set_parameter (autowarefoundation#1260)

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

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

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* 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 <kmiya@outlook.com>

* 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 <kmiya@outlook.com>
Co-authored-by: pre-commit <pre-commit@example.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>

* 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 <border_goldenmarket@yahoo.co.jp>

* Fix typo

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Fix topic name and qos

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

* Replace deprecated duration api

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>

* 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 <kenji.miyake@tier4.jp>

* Fix mistake

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* fix spell

* Fix lint issues

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Ignore flake8 warnings

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>

* 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 <kenji.miyake@tier4.jp>

* Remove ament_cmake_uncrustify and ament_clang_format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply Black

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix for cpplint

* Fix include double quotes to angle brackets

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Apply clang-format

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Fix build errors

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* Add COLCON_IGNORE (autowarefoundation#500)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* [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 <border_goldenmarket@yahoo.co.jp>

* Update traffic light topic name in perception

Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp>

Co-authored-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp>
Co-authored-by: Yukihiro Saito <yukky.saito@gmail.com>
Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com>
Co-authored-by: Nikolai Morin <nnmmgit@gmail.com>
Co-authored-by: Servando <43142004+sgermanserrano@users.noreply.github.com>
Co-authored-by: Shinnosuke Hirakawa <8327162+0x126@users.noreply.github.com>
Co-authored-by: Taichi Higashide <taichi.higashide@tier4.jp>
Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp>
Co-authored-by: Ryohsuke Mitsudome <43976834+mitsudome-r@users.noreply.github.com>
Co-authored-by: Takamasa Horibe <horibe.takamasa@gmail.com>
Co-authored-by: Takagi, Isamu <43976882+isamu-takagi@users.noreply.github.com>
Co-authored-by: Kazuki Miyahara <kmiya@outlook.com>
Co-authored-by: Makoto Tokunaga <vios-fish@users.noreply.github.com>
Co-authored-by: Adam Dąbrowski <adam.dabrowski@robotec.ai>
Co-authored-by: Keisuke Shima <19993104+KeisukeShima@users.noreply.github.com>
Co-authored-by: pre-commit <pre-commit@example.com>
Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com>
Co-authored-by: wep21 <border_goldenmarket@yahoo.co.jp>
Co-authored-by: Hiroki OTA <hiroki.ota@tier4.jp>
Co-authored-by: Satoshi OTA <44889564+satoshi-ota@users.noreply.github.com>
Co-authored-by: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com>
@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
Signed-off-by: yutaka <purewater0901@gmail.com>

Signed-off-by: yutaka <purewater0901@gmail.com>
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