From d693bce52c95d9e7860ff2d6ce934b1b55f1b087 Mon Sep 17 00:00:00 2001 From: satoshi-ota Date: Thu, 26 Dec 2024 10:13:54 +0900 Subject: [PATCH] fix(lane_change): remove velocity factor Signed-off-by: satoshi-ota --- .../src/interface.cpp | 31 ------------------- 1 file changed, 31 deletions(-) diff --git a/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/interface.cpp b/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/interface.cpp index 8309a1ab63672..ccae8adcc5128 100644 --- a/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/interface.cpp +++ b/planning/behavior_path_planner/autoware_behavior_path_lane_change_module/src/interface.cpp @@ -49,8 +49,6 @@ LaneChangeInterface::LaneChangeInterface( { module_type_->setTimeKeeper(getTimeKeeper()); logger_ = utils::lane_change::getLogger(module_type_->getModuleTypeStr()); - steering_factor_interface_.init(PlanningBehavior::LANE_CHANGE); - velocity_factor_interface_.init(PlanningBehavior::LANE_CHANGE); } void LaneChangeInterface::processOnExit() @@ -153,8 +151,6 @@ BehaviorModuleOutput LaneChangeInterface::plan() set_longitudinal_planning_factor(output.path); - setVelocityFactor(output.path); - return output; } @@ -193,8 +189,6 @@ BehaviorModuleOutput LaneChangeInterface::planWaitingApproval() set_longitudinal_planning_factor(out.path); - setVelocityFactor(out.path); - return out; } @@ -421,15 +415,6 @@ MarkerArray LaneChangeInterface::getModuleVirtualWall() void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & output) { universe_utils::ScopedTimeTrack st(__func__, *getTimeKeeper()); - const auto steering_factor_direction = std::invoke([&]() { - if (module_type_->getDirection() == Direction::LEFT) { - return SteeringFactor::LEFT; - } - if (module_type_->getDirection() == Direction::RIGHT) { - return SteeringFactor::RIGHT; - } - return SteeringFactor::UNKNOWN; - }); const auto current_position = module_type_->getEgoPosition(); const auto status = module_type_->getLaneChangeStatus(); @@ -438,10 +423,6 @@ void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & o const auto finish_distance = autoware::motion_utils::calcSignedArcLength( output.path.points, current_position, status.lane_change_path.info.shift_line.end.position); - steering_factor_interface_.set( - {status.lane_change_path.info.shift_line.start, status.lane_change_path.info.shift_line.end}, - {start_distance, finish_distance}, steering_factor_direction, SteeringFactor::TURNING, ""); - const auto planning_factor_direction = std::invoke([&]() { if (module_type_->getDirection() == Direction::LEFT) { return PlanningFactor::SHIFT_LEFT; @@ -460,18 +441,6 @@ void LaneChangeInterface::updateSteeringFactorPtr(const BehaviorModuleOutput & o void LaneChangeInterface::updateSteeringFactorPtr( const CandidateOutput & output, const LaneChangePath & selected_path) const { - const uint16_t steering_factor_direction = std::invoke([&output]() { - if (output.lateral_shift > 0.0) { - return SteeringFactor::LEFT; - } - return SteeringFactor::RIGHT; - }); - - steering_factor_interface_.set( - {selected_path.info.shift_line.start, selected_path.info.shift_line.end}, - {output.start_distance_to_path_change, output.finish_distance_to_path_change}, - steering_factor_direction, SteeringFactor::APPROACHING, ""); - const uint16_t planning_factor_direction = std::invoke([&output]() { if (output.lateral_shift > 0.0) { return PlanningFactor::SHIFT_LEFT;