Parking Assistant 3D

A Blender-built street and car: the same planner and bicycle model drive the wheels, the sensor cones and the parking path.

Presets

Playback

Camera

Layers

Quality

Model check

The science

Where the car turns: the kinematic bicycle model

At parking speed (about 5 km/h) the tyres do not slip, so a car can be reduced to a bicycle with wheelbase L. The reference point is the centre of the rear axle (x, y) with heading θ and front-wheel angle δ:

dx/ds = cosθ, dy/ds = sinθ, dθ/ds = tanδ / L, where s is the signed distance travelled (negative when reversing). For a fixed steering angle the rear axle runs on a circle of radius R = L / tanδ; at full lock this is the minimum turning radius. The page integrates these equations with a fourth-order Runge-Kutta step, so the path is exact for arcs and straights.

Swept corners

Every point of the body moves on a circle around the same centre. With the centre on the inner side, the front outer corner (the nose) sweeps Rf = √((R + w/2)2 + (L + of)2), the rear outer corner √((R + w/2)2 + or2) and the inner rear corner √((R − w/2)2 + or2), where w is the width and of, or are the front and rear overhangs. This is why a car with a long nose needs a longer slot than its wheelbase suggests. Switch on Turning circles and swept corners to see them.

Parallel parking: the S-path

The assistant reverses along two full-lock arcs of equal angle θ, steering first towards the kerb and then away from it, with a straight reverse of length s in between. The rear axle moves backwards by 2R sinθ + s cosθ and sideways by d = 2R(1 − cosθ) + s sinθ, so for a chosen θ the straight is s = (d − 2R(1 − cosθ)) / sinθ and the car ends parallel to the kerb (heading 0). The planner scans θ, the length of an initial straight reverse and the final position in the slot, rejects every path where the car (inflated by the safety margin) overlaps a parked car, and keeps the shortest one. The shortest slot for which a path exists is found by bisection.

Perpendicular parking

One reverse arc of 90 degrees takes the car from the driving line to the bay axis: starting at (R, y0) the rear axle reaches (0, y0 − R) with heading 90 degrees, and a straight reverse of y0 − R − yf finishes the manoeuvre. A radius larger than the minimum is tried as well, so the path can be flatter.

Ultrasonic sensors

A transducer sends a 40 kHz burst and times the echo: d = c t / 2 with the speed of sound c ≈ 331.3 + 0.606 T m/s (343 m/s at 20 °C). The side sensor sees the parked car at a short distance and the kerb or wall at a long one; the slot length is the distance driven between the two edges, so its resolution is the speed times the sampling interval. Eight sensors at the front and rear bumpers (range 2.5 m) feed the beeper bar and the emergency stop.

Honest simplifications

Perfect rectangles instead of real bodies, no tyre slip, a steering rate limit of 38 deg/s, noise-free sensors, flat ground, and a heuristic (not provably optimal) planner. The numbers describe the geometry of automatic parking, not a particular manufacturer's system.

Loading model...
Loading Blender model...
Heading and front-wheel angle against time
Rear and side sensor distances
Minimum slot against steering lock
Made with 🟠 Blender · Three.js