Skip to content

Commit eceefd7

Browse files
zulfaqar-azmi-t4pre-commit-ci[bot]
authored andcommitted
fix(lane_change): do not return empty path if no valid path (autowarefoundation#6686)
* fix(lane_change): do not return empty path if no valid path Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> * style(pre-commit): autofix --------- Signed-off-by: Zulfaqar Azmi <zulfaqar.azmi@tier4.jp> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3ea6caf commit eceefd7

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

planning/behavior_path_lane_change_module/src/interface.cpp

-4
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ BehaviorModuleOutput LaneChangeInterface::plan()
9999
resetPathCandidate();
100100
resetPathReference();
101101

102-
if (!module_type_->isValidPath()) {
103-
return {};
104-
}
105-
106102
auto output = module_type_->generateOutput();
107103
path_reference_ = std::make_shared<PathWithLaneId>(output.reference_path);
108104
*prev_approved_path_ = getPreviousModuleOutput().path;

planning/behavior_path_lane_change_module/src/scene.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,14 @@ BehaviorModuleOutput NormalLaneChange::generateOutput()
197197
{
198198
BehaviorModuleOutput output;
199199

200+
if (!status_.is_valid_path) {
201+
output.path = prev_module_path_;
202+
output.reference_path = prev_module_reference_path_;
203+
output.drivable_area_info = prev_drivable_area_info_;
204+
output.turn_signal_info = prev_turn_signal_info_;
205+
return output;
206+
}
207+
200208
if (isAbortState() && abort_path_) {
201209
output.path = abort_path_->path;
202210
output.reference_path = prev_module_reference_path_;

0 commit comments

Comments
 (0)