Skip to content

Commit

Permalink
Revert broken MP stage change
Browse files Browse the repository at this point in the history
  • Loading branch information
jackbart94 authored and bernatx committed Aug 2, 2021
1 parent 592eec0 commit 32465c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions LibCarla/source/carla/trafficmanager/MotionPlanStage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
// 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.
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.
collision_emergency_stop = true;
}
Expand Down

0 comments on commit 32465c3

Please sign in to comment.