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_path_planner): resample path in the route #3179

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

takayuki5168
Copy link
Contributor

@takayuki5168 takayuki5168 commented Mar 27, 2023

Description

Resampled path_with_lane_id is supposed to be used, but actually not used.

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: Takayuki Murooka <takayuki5168@gmail.com>
@takayuki5168 takayuki5168 marked this pull request as ready for review March 27, 2023 07:02
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 27, 2023
@takayuki5168
Copy link
Contributor Author

@rej55 @TakaHoribe Could you review the PR.
I will confirm the planning simulator works well with the PR.

Copy link
Contributor

@TakaHoribe TakaHoribe left a comment

Choose a reason for hiding this comment

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

LGTM

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d4708ce) 12.21% compared to head (9a0db42) 12.21%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3179   +/-   ##
=======================================
  Coverage   12.21%   12.21%           
=======================================
  Files        1352     1352           
  Lines       94313    94313           
  Branches    26776    26776           
=======================================
  Hits        11517    11517           
  Misses      70636    70636           
  Partials    12160    12160           
Flag Coverage Δ *Carryforward flag
differential 5.51% <0.00%> (?)
total 12.21% <ø> (+<0.01%) ⬆️ Carriedforward from d4708ce

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

Impacted Files Coverage Δ
planning/behavior_path_planner/src/utilities.cpp 7.57% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@VRichardJP
Copy link
Contributor

VRichardJP commented Mar 27, 2023

How come this was not caught by gcc warnings?
All autoware cmake packages should normally inherit -Wall -Wextra -Wpedantic -Werror (from autoware_package()).
-Wall adds -Wunused-value, which should have prevented the old code from compiling with -Werror. It does not seem like behavior_path_planner have any -Wno-*, so how come?

@takayuki5168
Copy link
Contributor Author

@VRichardJP I also expected the warning. I'm not sure why.

@VRichardJP
Copy link
Contributor

VRichardJP commented Mar 28, 2023

Is it a bug from GCC?

If I try something like this:

  const auto resampled_path_with_lane_id = motion_utils::resamplePath(
    raw_path_with_lane_id, parameter.input_path_interval, parameter.enable_akima_spline_first);
  const auto test = malloc(1);
  return raw_path_with_lane_id;

I get the error:

/home/sig/autoware/src/universe/autoware.universe/planning/behavior_path_planner/src/utilities.cpp: In function ‘autoware_auto_planning_msgs::msg::PathWithLaneId behavior_path_planner::util::getCenterLinePath(const route_handler::RouteHandler&, const ConstLanelets&, const Pose&, double, double, const BehaviorPathPlannerParameters&, double)’:
/home/sig/autoware/src/universe/autoware.universe/planning/behavior_path_planner/src/utilities.cpp:1982:14: error: unused variable ‘test’ [-Werror=unused-variable]
 1982 |   const auto test = malloc(1);
      |              ^~~~
cc1plus: all warnings being treated as errors

Somehow resampled_path_with_lane_id is not caught as unused value. I also test with clang, it does not detect this either.

@VRichardJP
Copy link
Contributor

@takayuki5168 takayuki5168 merged commit 07fa672 into autowarefoundation:main Mar 28, 2023
@takayuki5168 takayuki5168 deleted the fix/resample-route-path branch March 28, 2023 13:54
ktro2828 pushed a commit to ktro2828/autoware.universe that referenced this pull request Apr 7, 2023
…ation#3179)

Signed-off-by: Takayuki Murooka <takayuki5168@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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants