Skip to content

Commit

Permalink
fix(static_obstacle_avoidance): remove velocity factor (#1740)
Browse files Browse the repository at this point in the history
Signed-off-by: satoshi-ota <satoshi.ota928@gmail.com>
  • Loading branch information
satoshi-ota authored and soblin committed Jan 15, 2025
1 parent 8b4624c commit f0d60e1
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
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 @@ -778,8 +776,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 @@ -1212,14 +1208,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

0 comments on commit f0d60e1

Please sign in to comment.