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): use previous module output #3042

Conversation

satoshi-ota
Copy link
Contributor

@satoshi-ota satoshi-ota commented Mar 10, 2023

Description

In this PR, I added new function util::getCurrentLanesFromPath to get current lanelet from not current pose but previous module output.

#ifdef USE_OLD_ARCHITECTURE
  const auto current_lanes = util::getCurrentLanes(planner_data_);
#else
  const auto current_lanes =
    util::getCurrentLanesFromPath(*getPreviousModuleOutput().reference_path, planner_data_);
#endif

Additionaly, I added util::getCenterLinePathFromRootLanelet to output reference path that is used in next module.

#ifdef USE_OLD_ARCHITECTURE
  path_reference_ = getPreviousModuleOutput().reference_path;
  prev_approved_path_ = path;
#else
  const auto reference_path =
    util::getCenterLinePathFromRootLanelet(status_.lane_change_lanes.front(), planner_data_);
  output.reference_path = std::make_shared<PathWithLaneId>(reference_path);
  path_reference_ = std::make_shared<PathWithLaneId>(reference_path);
  prev_approved_path_ = *getPreviousModuleOutput().path;
#endif

Test in my local env

1.set option COMPILE_WITH_OLD_ARCHITECTURE to FALSE

set(COMPILE_WITH_OLD_ARCHITECTURE TRUE)

2.set enable_simultaneous_execution to true (lane_change, avoidance only)

...
    lane_change:
      enable_module: true
      enable_simultaneous_execution: true
      priority: 4
      max_module_size: 1
...
    avoidance:
      enable_module: true
      enable_simultaneous_execution: true
      priority: 3
      max_module_size: 1

https://github.com/autowarefoundation/autoware_launch/blob/17eed3623580804896d1a9417c1a49c7098deca8/autoware_launch/config/planning/scenario_planning/lane_driving/behavior_planning/behavior_path_planner/behavior_path_planner.param.yaml#L41-L69

simplescreenrecorder-2023-03-10_09.34.48.mp4

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: satoshi-ota <satoshi.ota928@gmail.com>
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
@github-actions github-actions bot added the component:planning Route planning, decision-making, and navigation. (auto-assigned) label Mar 10, 2023
@satoshi-ota satoshi-ota marked this pull request as ready for review March 10, 2023 01:47
@satoshi-ota
Copy link
Contributor Author

@zulfaqar-azmi-t4 I fixed some bugs, so could your review this PR?

@codecov
Copy link

codecov bot commented Mar 10, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.01 ⚠️

Comparison is base (90b7576) 11.93% compared to head (bd33811) 11.92%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3042      +/-   ##
==========================================
- Coverage   11.93%   11.92%   -0.01%     
==========================================
  Files        1321     1321              
  Lines       91991    92010      +19     
  Branches    24566    24576      +10     
==========================================
- Hits        10978    10976       -2     
- Misses      69654    69676      +22     
+ Partials    11359    11358       -1     
Flag Coverage Δ *Carryforward flag
differential 5.55% <0.00%> (?)
total 11.93% <ø> (-0.01%) ⬇️ Carriedforward from 90b7576

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

Impacted Files Coverage Δ
...lanner/include/behavior_path_planner/utilities.hpp 23.80% <ø> (ø)
...rc/scene_module/lane_change/lane_change_module.cpp 0.00% <0.00%> (ø)
planning/behavior_path_planner/src/utilities.cpp 7.58% <0.00%> (-0.12%) ⬇️

... and 1 file with indirect coverage changes

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.

@zulfaqar-azmi-t4
Copy link
Contributor

So far it seems fine

cap-.2023-03-10-18-47-33.mp4.mp4

Copy link
Contributor

@zulfaqar-azmi-t4 zulfaqar-azmi-t4 left a comment

Choose a reason for hiding this comment

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

LGTM

Additional note:

  1. I have set enable_module: false for pull over/out and side_shift for this to work.

@satoshi-ota satoshi-ota enabled auto-merge (squash) March 11, 2023 04:06
@satoshi-ota satoshi-ota merged commit 0056a2a into autowarefoundation:main Mar 11, 2023
@satoshi-ota satoshi-ota deleted the fix/use-previous-module-output-lane-change branch March 11, 2023 04:48
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.

2 participants