Revert broken MP stage change
This commit is contained in:
parent
592eec0377
commit
32465c3ba8
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue