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(static_obstacle_avoidance): remove velocity factor #1740

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 @@ -132,9 +132,6 @@ class StaticObstacleAvoidanceModule : public SceneModuleInterface
}

if (finish_distance > -1.0e-03) {
steering_factor_interface_.set(
{left_shift.start_pose, left_shift.finish_pose}, {start_distance, finish_distance},
SteeringFactor::LEFT, SteeringFactor::TURNING, "");
planning_factor_interface_->add(
start_distance, finish_distance, left_shift.start_pose, left_shift.finish_pose,
PlanningFactor::SHIFT_LEFT, SafetyFactorArray{});
Expand All @@ -155,9 +152,6 @@ class StaticObstacleAvoidanceModule : public SceneModuleInterface
}

if (finish_distance > -1.0e-03) {
steering_factor_interface_.set(
{right_shift.start_pose, right_shift.finish_pose}, {start_distance, finish_distance},
SteeringFactor::RIGHT, SteeringFactor::TURNING, "");
planning_factor_interface_->add(
start_distance, finish_distance, right_shift.start_pose, right_shift.finish_pose,
PlanningFactor::SHIFT_RIGHT, SafetyFactorArray{});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ StaticObstacleAvoidanceModule::StaticObstacleAvoidanceModule(
parameters_{parameters},
generator_{parameters}
{
steering_factor_interface_.init(PlanningBehavior::AVOIDANCE);
velocity_factor_interface_.init(PlanningBehavior::AVOIDANCE);
}

bool StaticObstacleAvoidanceModule::isExecutionRequested() const
Expand Down Expand Up @@ -782,8 +780,6 @@ void StaticObstacleAvoidanceModule::updateEgoBehavior(
insertReturnDeadLine(isBestEffort(parameters_->policy_deceleration), path);

set_longitudinal_planning_factor(path.path);

setVelocityFactor(path.path);
}

bool StaticObstacleAvoidanceModule::isSafePath(
Expand Down Expand Up @@ -1216,14 +1212,6 @@ CandidateOutput StaticObstacleAvoidanceModule::planCandidate() const
output.start_distance_to_path_change = sl_front.start_longitudinal;
output.finish_distance_to_path_change = sl_back.end_longitudinal;

const uint16_t steering_factor_direction = std::invoke([&output]() {
return output.lateral_shift > 0.0 ? SteeringFactor::LEFT : SteeringFactor::RIGHT;
});
steering_factor_interface_.set(
{sl_front.start, sl_back.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]() {
return output.lateral_shift > 0.0 ? PlanningFactor::SHIFT_LEFT : PlanningFactor::SHIFT_RIGHT;
});
Expand Down
Loading