braid_from_trajectories — DRIVE braidpath op

• Data kinds: any → table

• Call: import fullseye as fs; fs.ledger.braid_from_trajectories(trajectories, obstacles=None, angle=0.1, jitter='auto') (to call the implementation directly, import braidpath; braidpath.braid_from_trajectories(trajectories, obstacles=None, angle=0.1, jitter='auto'); from the registry, opsdrive.get("braid_from_trajectories"))

• GPU: none (CPU reference implementation only)

Usage

Builds a braid word (a sequence of crossing signs) from planar trajectories (and stationary obstacle points).

Assuming straight-line motion within each step, the time at which two adjacent strands swap order on the projection axis x' = x cos θ + y sin θ is found in closed form (the relative motion is also linear, so there is at most one zero), and the crossings become letters in time order. If the left strand passes below (the smaller-y' side) to the right, the letter is +i (counter-clockwise half-twist); if it passes above, −i.

★Triple points of the projection: under symmetric grid motions (e.g. two agents moving point-symmetrically on either side of an obstacle point), three strands rotate while staying collinear, so three crossings coincide at every angle. jitter="auto" then, and only then, adds a small constant offset per strand (minimum distance × JITTER_FRACTION, direction by the golden angle) and recomputes. The offset is much smaller than the minimum distance, so the braid does not change (verified by a gate).

Parameters

trajectories : numpy (K, T, 2) = [x, y], or a list of grid paths (each agent's (row, col) sequence) / a planner dict (paths).

obstacles : (M, 2) points, optional. Each hole is represented by one point (any point inside the hole gives the same class).

angle : angle of the projection axis [rad]. The class decision (homotopy_class_compare) does not depend on the angle, but the word itself does.

jitter : "auto" or the size of the offset (0 = no offset; upper bound is 1 % of the minimum distance).

Returns

dict: word (1-D int array), n_strands, n_agents, start_order / end_order (strand indices in positional order), times (time of each letter, in step units), angle, jitter (offset used), clearance (minimum distance between strands).

Raises

ValueError: two strands reach the same point (a collision has no braid), triple point with jitter=0 (TriplePointError), wrong shape, NaN.

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_braid_homotopy_classes — py -3.11 examples/poc_braid_homotopy_classes.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 (braidpath)

braid_reduce · braid_artin_images · dynnikov_coordinates · dynnikov_act · braid_equivalent · homotopy_class_compare · pairwise_winding · homotopy_shortest_paths


*Provenance: braidpath.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.