Skip to content

Commit b4369e1

Browse files
committed
fix(lane_change): set safety factor properly
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
1 parent 1bebec9 commit b4369e1

File tree

1 file changed

+7
-2
lines changed
  • planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src

1 file changed

+7
-2
lines changed

planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/interface.cpp

+7-2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
#include "autoware/behavior_path_planner_common/interface/scene_module_interface.hpp"
2020
#include "autoware/behavior_path_planner_common/interface/scene_module_visitor.hpp"
2121
#include "autoware/behavior_path_planner_common/marker_utils/utils.hpp"
22+
#include "autoware/behavior_path_planner_common/utils/path_safety_checker/safety_check.hpp"
2223

2324
#include <autoware_utils/ros/marker_helper.hpp>
2425
#include <autoware_utils/system/time_keeper.hpp>
@@ -410,9 +411,11 @@ void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & o
410411
return PlanningFactor::UNKNOWN;
411412
});
412413

414+
const auto & lane_change_debug = module_type_->getDebugData();
413415
planning_factor_interface_->add(
414416
start_distance, finish_distance, status.lane_change_path.info.shift_line.start,
415-
status.lane_change_path.info.shift_line.end, planning_factor_direction, SafetyFactorArray{});
417+
status.lane_change_path.info.shift_line.end, planning_factor_direction,
418+
utils::path_safety_checker::to_safety_factor_array(lane_change_debug.collision_check_objects));
416419
}
417420

418421
void LaneChangeInterface::updateSteeringFactorPtr(
@@ -425,9 +428,11 @@ void LaneChangeInterface::updateSteeringFactorPtr(
425428
return PlanningFactor::SHIFT_RIGHT;
426429
});
427430

431+
const auto & lane_change_debug = module_type_->getDebugData();
428432
planning_factor_interface_->add(
429433
output.start_distance_to_path_change, output.finish_distance_to_path_change,
430434
selected_path.info.shift_line.start, selected_path.info.shift_line.end,
431-
planning_factor_direction, SafetyFactorArray{});
435+
planning_factor_direction,
436+
utils::path_safety_checker::to_safety_factor_array(lane_change_debug.collision_check_objects));
432437
}
433438
} // namespace autoware::behavior_path_planner

0 commit comments

Comments
 (0)