passing_gap_required — DRIVE traffic op

• Data kinds: none → table (an op determined by its arguments alone — it takes no image or data input)

• Call: import fullseye as fs; fs.ledger.passing_gap_required(parked_len: 'float', margin_front: 'float', margin_back: 'float', v_ego: 'float', v_oncoming: 'float', *, lane_change_time: 'float', ego_length: 'float' = 0.0, pet_min: 'float' = 0.0, v_obstacle: 'float' = 0.0) -> 'Dict[str, float]' (to call the implementation directly, import drivetraffic; drivetraffic.passing_gap_required(parked_len: 'float', margin_front: 'float', margin_back: 'float', v_ego: 'float', v_oncoming: 'float', *, lane_change_time: 'float', ego_length: 'float' = 0.0, pet_min: 'float' = 0.0, v_obstacle: 'float' = 0.0) -> 'Dict[str, float]'; from the registry, opsdrive.get("passing_gap_required"))

Usage

Time needed to clear the section where the car swerves into the oncoming lane to pass a parked car, and the threshold distance at which the oncoming vehicle does not arrive before then (closed form).

The ego vehicle starts moving into the oncoming lane margin_back short of the parked vehicle's rear end (x_in), and after passing margin_front beyond its front end (x_out) takes lane_change_time to return fully to its own lane. Encroaching length L_occ = margin_back + parked_len + margin_front + ego_length; encroaching time t_occ = L_occ / v_ego + T_lc. The boundary of the distance to the oncoming vehicle at decision time (ego at x_in) such that the oncoming vehicle reaches the fully-returned point P = x_in + L_occ + v_ego T_lc at least pet_min after the time of full return (PET ≥ pet_min):

D* = t_occ (v_ego + v_on) + v_on · pet_min

Moving obstacle (a bicycle etc., travelling in the same direction at v_obstacle): the encroaching length is a distance relative to the obstacle, so t_occ = L_occ / (v_ego − v_obstacle) + T_lc, and the fully-returned point P = x_in + v_ego t_occ. The formula for D* has the same form. With v_obstacle = 0 it reduces to the formula for a stopped vehicle.

Returns dict: L_occ, t_occupy, d_required (= D*), clear_point (distance from x_in to P).

Raises ValueError: negative lengths or margins, v_ego ≤ 0, v_oncoming < 0, lane_change_time < 0, v_obstacle < 0 or v_obstacle ≥ v_ego (cannot catch up).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• poc_driving_traffic — py -3.11 examples/poc_driving_traffic.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (traffic)

idm_accel · idm_equilibrium_gap · idm_platoon_simulate · driver_style · lateral_wobble · ou_estimate · social_force_step · pedestrian_crossing


*Provenance: drivetraffic.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.