Revert broken MP stage change

This commit is contained in:
Jacopo Bartiromo 2021-08-02 13:11:19 +02:00 committed by bernat
parent 592eec0377
commit 32465c3ba8
1 changed files with 2 additions and 2 deletions

View File

@ -329,10 +329,10 @@ std::pair<bool, float> MotionPlanStage::CollisionHandling(const CollisionHazardD
} }
// If vehicle is approaching a lead vehicle and the lead vehicle is further // If vehicle is approaching a lead vehicle and the lead vehicle is further
// than CRITICAL_BRAKING_MARGIN but closer than FOLLOW_LEAD_DISTANCE. // than CRITICAL_BRAKING_MARGIN but closer than FOLLOW_LEAD_DISTANCE.
else if (available_distance_margin > CRITICAL_BRAKING_MARGIN && other_velocity.Length() < 1.0f) { else if (available_distance_margin > CRITICAL_BRAKING_MARGIN) {
// Then follow the lead vehicle by acquiring it's speed along current heading. // Then follow the lead vehicle by acquiring it's speed along current heading.
dynamic_target_velocity = std::max(other_speed_along_heading, RELATIVE_APPROACH_SPEED); dynamic_target_velocity = std::max(other_speed_along_heading, RELATIVE_APPROACH_SPEED);
} else if (available_distance_margin < CRITICAL_BRAKING_MARGIN) { } else {
// If lead vehicle closer than CRITICAL_BRAKING_MARGIN, initiate emergency stop. // If lead vehicle closer than CRITICAL_BRAKING_MARGIN, initiate emergency stop.
collision_emergency_stop = true; collision_emergency_stop = true;
} }