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(start_planner): remove velocity factor #1742

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading