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, launch): fix launch error #5847

Merged
merged 5 commits into from
Dec 13, 2023

Conversation

satoshi-ota
Copy link
Contributor

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

Description

🤖[deprecated] Generated by Copilot at 0274073

This pull request fixes a parameter handling issue in the behavior path planner and the behavior velocity planner nodes. It adds a condition to check if the module name is ”” and skips loading it, to prevent errors with ROS 2.

FIx following error:

[component_container_mt-10] [ERROR] [1702012466.731917489] [planning.scenario_planning.lane_driving.behavior_planning.behavior_planning_container]: Component constructor threw an exception: parameter 'launch_modules' has invalid type: Wrong parameter type, parameter {launch_modules} is of type {string_array}, setting it to {byte_array} is not allowed.

Tests performed

Psim (disable all scene modules)

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.

@github-actions github-actions bot added component:planning Route planning, decision-making, and navigation. (auto-assigned) component:launch Launch files, scripts and initialization tools. (auto-assigned) labels Dec 12, 2023
@satoshi-ota satoshi-ota added the run:build-and-test-differential Mark to enable build-and-test-differential workflow. (used-by-ci) label Dec 12, 2023
@satoshi-ota satoshi-ota marked this pull request as ready for review December 12, 2023 05:52
Copy link

codecov bot commented Dec 12, 2023

Codecov Report

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

Comparison is base (dd3050a) 15.31% compared to head (9aef450) 15.31%.
Report is 2 commits behind head on main.

Files Patch % Lines
...or_path_planner/src/behavior_path_planner_node.cpp 0.00% 0 Missing and 1 partial ⚠️
planning/behavior_velocity_planner/src/node.cpp 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5847      +/-   ##
==========================================
- Coverage   15.31%   15.31%   -0.01%     
==========================================
  Files        1740     1740              
  Lines      119879   119882       +3     
  Branches    36450    36453       +3     
==========================================
  Hits        18355    18355              
  Misses      80992    80992              
- Partials    20532    20535       +3     
Flag Coverage Δ *Carryforward flag
differential 9.52% <0.00%> (?)
total 15.31% <ø> (ø) Carriedforward from 478e454

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

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

Copy link
Contributor

@soblin soblin left a comment

Choose a reason for hiding this comment

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

How about using "" (empty) string instead ?

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@h-ohta
Copy link
Contributor

h-ohta commented Dec 13, 2023

I confirmed with following steps.

  1. added debug code

  2. set all behavor modules to false https://github.com/autowarefoundation/autoware_launch/blob/main/autoware_launch/config/planning/preset/default_preset.yaml#L2-L82

  3. launched planning simulator and confirm debug print

hrkota@npc2103034:~/dev/autoware$ ros2 launch autoware_launch planning_simulator.launch.xml vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit map_path:=$HOME/map/psim_virtualmap/ pointcloud_map_file:=pointcloud_map.pcd rviz:=true
[INFO] [launch]: All log files can be found below /home/hrkota/.ros/log/2023-12-13-15-36-04-258740-npc2103034-354700
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [launch.user]: behavior_path_planner_launch_modules: [""]
[INFO] [launch.user]: behavior_velocity_planner_launch_modules: [""]
...
  1. confrimed following error is not showed.
    [component_container_mt-10] [ERROR] [1702012466.731917489] [planning.scenario_planning.lane_driving.behavior_planning.behavior_planning_container]: Component constructor threw an exception: parameter 'launch_modules' has invalid type: Wrong parameter type, parameter {launch_modules} is of type {string_array}, setting it to {byte_array} is not allowed.

@satoshi-ota satoshi-ota merged commit a25114a into autowarefoundation:main Dec 13, 2023
21 of 25 checks passed
@satoshi-ota satoshi-ota deleted the fix/launch-error branch December 13, 2023 07:38
danielsanchezaran pushed a commit to tier4/autoware.universe that referenced this pull request Dec 15, 2023
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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
* fix(launch): set null to avoid launch error

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(behavior): check null

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* chore(behavior): add comment

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): set  at the end of list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

* fix(launch): fill empty string at the end of module list

Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>

---------

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:launch Launch files, scripts and initialization tools. (auto-assigned) component:planning Route planning, decision-making, and navigation. (auto-assigned) 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.

3 participants