Skip to content

Commit

Permalink
fix(start_planner): remove velocity factor (#1742)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <[email protected]>
  • Loading branch information
satoshi-ota authored Dec 26, 2024
1 parent 5250e6c commit 153c9c8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,21 +201,6 @@ class StartPlannerModule : public SceneModuleInterface

bool requiresDynamicObjectsCollisionDetection() const;

uint16_t getSteeringFactorDirection(
const autoware::behavior_path_planner::BehaviorModuleOutput & output) const
{
switch (output.turn_signal_info.turn_signal.command) {
case TurnIndicatorsCommand::ENABLE_LEFT:
return SteeringFactor::LEFT;

case TurnIndicatorsCommand::ENABLE_RIGHT:
return SteeringFactor::RIGHT;

default:
return SteeringFactor::STRAIGHT;
}
};

uint16_t getPlanningFactorDirection(
const autoware::behavior_path_planner::BehaviorModuleOutput & output) const
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@ StartPlannerModule::StartPlannerModule(
std::bind(&StartPlannerModule::onFreespacePlannerTimer, this),
freespace_planner_timer_cb_group_);
}

steering_factor_interface_.init(PlanningBehavior::START_PLANNER);
velocity_factor_interface_.init(PlanningBehavior::START_PLANNER);
}

void StartPlannerModule::onFreespacePlannerTimer()
Expand Down Expand Up @@ -744,11 +741,8 @@ BehaviorModuleOutput StartPlannerModule::plan()

setDrivableAreaInfo(output);

setVelocityFactor(output.path);

set_longitudinal_planning_factor(output.path);

const auto steering_factor_direction = getSteeringFactorDirection(output);
const auto planning_factor_direction = getPlanningFactorDirection(output);

if (status_.driving_forward) {
Expand All @@ -759,9 +753,6 @@ BehaviorModuleOutput StartPlannerModule::plan()
path.points, planner_data_->self_odometry->pose.pose.position,
status_.pull_out_path.end_pose.position);
updateRTCStatus(start_distance, finish_distance);
steering_factor_interface_.set(
{status_.pull_out_path.start_pose, status_.pull_out_path.end_pose},
{start_distance, finish_distance}, steering_factor_direction, SteeringFactor::TURNING, "");
planning_factor_interface_->add(
start_distance, finish_distance, status_.pull_out_path.start_pose,
status_.pull_out_path.end_pose, planning_factor_direction, SafetyFactorArray{});
Expand All @@ -772,9 +763,6 @@ BehaviorModuleOutput StartPlannerModule::plan()
path.points, planner_data_->self_odometry->pose.pose.position,
status_.pull_out_path.start_pose.position);
updateRTCStatus(0.0, distance);
steering_factor_interface_.set(
{status_.pull_out_path.start_pose, status_.pull_out_path.end_pose}, {0.0, distance},
steering_factor_direction, SteeringFactor::TURNING, "");
planning_factor_interface_->add(
0.0, distance, status_.pull_out_path.start_pose, status_.pull_out_path.end_pose,
planning_factor_direction, SafetyFactorArray{});
Expand Down Expand Up @@ -860,7 +848,6 @@ BehaviorModuleOutput StartPlannerModule::planWaitingApproval()

setDrivableAreaInfo(output);

const auto steering_factor_direction = getSteeringFactorDirection(output);
const auto planning_factor_direction = getPlanningFactorDirection(output);

if (status_.driving_forward) {
Expand All @@ -871,10 +858,6 @@ BehaviorModuleOutput StartPlannerModule::planWaitingApproval()
stop_path.points, planner_data_->self_odometry->pose.pose.position,
status_.pull_out_path.end_pose.position);
updateRTCStatus(start_distance, finish_distance);
steering_factor_interface_.set(
{status_.pull_out_path.start_pose, status_.pull_out_path.end_pose},
{start_distance, finish_distance}, steering_factor_direction, SteeringFactor::APPROACHING,
"");
planning_factor_interface_->add(
start_distance, finish_distance, status_.pull_out_path.start_pose,
status_.pull_out_path.end_pose, planning_factor_direction, SafetyFactorArray{});
Expand All @@ -886,9 +869,6 @@ BehaviorModuleOutput StartPlannerModule::planWaitingApproval()
stop_path.points, planner_data_->self_odometry->pose.pose.position,
status_.pull_out_path.start_pose.position);
updateRTCStatus(0.0, distance);
steering_factor_interface_.set(
{status_.pull_out_path.start_pose, status_.pull_out_path.end_pose}, {0.0, distance},
steering_factor_direction, SteeringFactor::APPROACHING, "");
planning_factor_interface_->add(
0.0, distance, status_.pull_out_path.start_pose, status_.pull_out_path.end_pose,
planning_factor_direction, SafetyFactorArray{});
Expand Down

0 comments on commit 153c9c8

Please sign in to comment.