Overtaking on an undivided two-lane road is one of the hardest decisions an Indian driver makes. There is a slow lorry ahead, oncoming traffic at 50 km/h, and the lorry itself hides most of the oncoming lane. The lorry driver might ease off and wave you past, hold speed, or speed up the moment you pull out. In the previous two posts (narrow road, crossroads) the planner had to read other drivers in slow, close-quarters negotiations. Overtaking is the fast version of the same problem, and the price of a wrong read is a head-on collision. This post describes a behaviour planner for it and what 180 simulated runs say about each of its parts.
TL;DR
The planner has three habits: it assumes a car is hiding just past what it can see and peeks out before committing; it reads the lorry driver (lets me by, holds speed, races me) from the lorry’s acceleration while it is out; and ten times a second it compares the time to finish with the time to back out, and does whichever is quicker.
Same road and traffic, two lorry drivers: against one that holds speed it waits for a gap with 1.5 s to spare and finishes; against one that races, it reads “races me” at 91% within about two seconds, sees its spare time collapse to 0.2 s, and backs out.
Across 60 runs per planner (20 traffic patterns x 3 lorry drivers), no planner crashed, because the simulated oncoming drivers brake. The difference is who does the work: a naive planner forced an oncoming driver to brake hard in 45 of 60 runs, one that ignores the blind spot in 37, and the full planner in 6 (Fisher’s exact p < 10^-8 against either).
The price is fewer completed overtakes (41 of 60 against 53 for the naive planner) and more time behind the lorry. It only aborted four times, all against lorries that raced.
The scene
A straight two-lane road with a dashed centre line. India drives on the left, so the ego car’s lane is the left one and it overtakes on the right, through the oncoming lane. Ahead of it is a 10 m lorry at about 24 km/h. Oncoming traffic (cars, SUVs, an auto-rickshaw, a scooter) comes at 40 to 50 km/h with irregular gaps, a few long, many tempting but short. A scooter rides behind the ego. Each oncoming driver has their own assertiveness, so some move towards their kerb and slow down for an overtaking car and others hold their line.
The lorry driver has one of three hidden styles: a helper who slows a little and moves towards the kerb when someone pulls out to pass, a steady driver who holds speed, and a racer who speeds up when someone pulls out and settles back once they give up. The planner is not told which one it got.
Perception is the same noisy, occluded, tracked view as in the earlier posts, extended to 320 m because overtaking needs long sight lines, and the lorry genuinely blocks the line of sight to the oncoming lane.
Three habits
It plans for what it can’t see. Each planning cycle it ray-casts from its roof sensor along the oncoming lane and finds where the lorry (or an oncoming vehicle) starts blocking the view. Beyond that point it assumes a car is there, driving towards it at 50 km/h: a phantom, drawn as a pink outline [1]. The phantom enters the gap calculation like any real car, so the planner never commits into road it cannot see. To see further it peeks: it edges towards the centre line, which opens the sight line past the lorry, and waits there while real oncoming cars go by.
Figure 1 — Peeking. The car has edged towards the centre line to see past the lorry; an oncoming car is passing, so the gap gives 0 s against the 7.1 s the pass needs. The strip at the top right is its view of the next 320 m: what it sees, the stretch it can't, and the car it assumes is hiding there.
It reads the lorry driver. The time a pass needs depends on what the lorry does. For each reading (lets me by, holds speed, races me) the planner simulates its own acceleration against the lorry’s, and gets the time until it is fully past with a 4 m gap, plus time to merge back. It weights the three by its belief, which starts at 15% / 75% / 10% and updates from the lorry’s acceleration, estimated with a 1.2 s velocity fit while the ego is out. It goes only when the gap gives at least 1.5 s more than the expected pass needs, sustained for half a second, and when the chance that the pass doesn’t fit is below 20%.
It knows its point of no return. Once it has pulled out, it recomputes every 0.1 s both the time to finish and the time to drop back behind the lorry and be in lane again. If the spare time drops below 0.6 s, it does whichever is quicker: backing out while it is still behind the lorry, finishing once it is past the point where backing out takes longer.
Figure 2 — Mid-pass beside a lorry that holds speed: 3.3 s spare. Backing out would now take 9.5 s against 2.0 s to finish, so it is past the point of no return and finishing is the safe choice.
Underneath, the same sampling path planner from the earlier posts [2] checks over a thousand candidate paths against everyone’s predicted motion, including the phantom’s, so the behaviour layer chooses what to attempt and the lattice chooses how.
Same road, two lorry drivers
The two runs below share the road, the traffic and the random seed. Only the lorry driver differs.
Video 1 — Take 1: the lorry holds speed. The car peeks, waits while the gap is short, goes with 3.3 s spare and completes the overtake. Take 2: identical until the car pulls out; then the lorry speeds up, the read moves to "races me" (91%), the spare time drops to 0.2 s, and it backs out and tucks in behind.Figure 3 — The abort. The lorry is speeding up; the planner reads it as a racer (91%), only 0.2 s of spare time is left, and backing out takes 1.2 s against 6.0 s to finish.
Results
I ran three planners over the same 20 traffic patterns, each with all three lorry drivers: the full planner; the same planner without the blind-spot reasoning, which commits on whatever it can currently see; and a naive version that also never aborts once it has pulled out. Everything else, including the path planner underneath, is identical.
over 60 runs each
full planner
ignores the blind spot
naive
contacts
0
0
0
forced an oncoming driver to brake hard (over 3 m/s²)
6
37
45
head-on time-to-collision under 2 s
5
27
41
mean of the hardest braking it forced, per run
0.8 m/s²
3.9 m/s²
5.2 m/s²
aborts (runs with an abort)
4 (4)
116 (51)
0
overtakes completed
41
45
53
median time spent behind the lorry
24.6 s
20.5 s
12.5 s
Figure 4 — The same 60 runs per planner, with 95% Wilson intervals. No planner had a contact; the naive planners get away with it because the oncoming drivers brake for them.
The headline is not a crash rate. None of the planners hit anyone, because the low-level path checker avoids anything it can already see and the simulated oncoming drivers brake for a car in their lane. The difference is who does the work. The naive planner completes the most overtakes and spends the least time behind the lorry, and it gets away with it by making other drivers brake hard in three runs out of four, with a head-on time-to-collision under two seconds in 41 of 60. Removing only the blind-spot reasoning gives a planner that commits on a gap that looks clear, discovers the car that was hiding behind the lorry, and bails out: 116 aborts across 51 of 60 runs, and still 37 runs with hard braking forced on someone else.
The full planner forces hard braking in 6 runs (p = 2 x 10^-13 against the naive planner and 3 x 10^-9 against the one without blind-spot reasoning, Fisher’s exact test). It pays for that with fewer completed overtakes and about 12 more seconds behind the lorry. Its four aborts were all against lorries that raced, which is what the abort logic is for; against racers it also completes fewer overtakes (11 of 20 against 15 of 20 for the other two styles), which is the right trade.
Two caveats on these numbers. The oncoming drivers here are forgiving by construction: they brake and move towards their kerb, so a planner that leans on them never pays the full price, and on a real road some of those 45 runs would be collisions. And “hard braking forced” counts any oncoming vehicle braking over 3 m/s² while the ego is in the oncoming half of the road, which can include braking the ego did not cause.
Caveats
Everything is simulated. The lorry drivers have three styles where real ones have many, and the racer’s behaviour is mine. The behaviour layer is hand-designed: the phantom speed, the 1.5 s margin and the prior over lorry drivers are choices, not learned quantities. The phantom also makes the planner conservative by design; on a real road, how far you can see is itself uncertain.
References
Tas, Ö. Ş. and Stiller, C. Limited visibility and uncertainty aware motion planning for automated driving. IEEE Intelligent Vehicles Symposium, 2018.
Werling, M., Ziegler, J., Kammel, S. and Thrun, S. Optimal trajectory generation for dynamic street scenarios in a Frenet frame. ICRA, 2010.