Skip to content

Commit 32465c3

Browse files
jackbart94bernatx
authored andcommitted
Revert broken MP stage change
1 parent 592eec0 commit 32465c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

LibCarla/source/carla/trafficmanager/MotionPlanStage.cpp

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

0 commit comments

Comments
 (0)