TrackGen¶
GPU-batched generation of closed-loop race tracks — thousands of smooth,
validated tracks per generate() call, expressed as NVIDIA Warp kernels and
ready to drop into a batched RL simulator.
The runtime pipeline turns a raw generated centerline into a constant-spacing path, relaxes it with XPBD, then inflates it into a constant-width road band.¶
Features¶
Generate E tracks in parallel per generate() call — the Warp cpu
device for tests/CI, cuda for production.
Generation → constant-spacing resample → XPBD relaxation → inflation, every
stage a Warp kernel over flat [E*N] arrays.
Bezier, Hull, Polar, Voronoi, Checkpoint, and Repulsive — pluggable centerline generators, each with a distinct shape family.
The whole pipeline is captured once into a replayable CUDA graph and replayed
on every later call for high throughput (all generators except repulsive,
which runs eagerly every call — see Repulsive Generator).
Drone-style gate courses — gate centres and orientations — straight from the
centerline-generator anchors via GateGenerator.
Out-of-bounds collision, checkpoint progress and rewards, prop instancing — and one Course object that bundles them.
Gallery¶
Six centerline generators, one batch — representative raw centerlines from each standard generator.¶
Centerline self-collision relaxation — raw constant-spacing centerlines (top) versus the relaxed, inflated tracks (bottom).¶
Gate self-collision relaxation — raw anchors (top) versus separated gates (bottom).¶
Explore the docs¶
Install the library and generate your first batch.
End-to-end recipes for tracks, gates, CUDA-graph sim loops, and driving RL agents against the built-in collision engines — track out-of-bounds and gate posts.
How each centerline generator works and when to use it.
The XPBD stage that turns raw centerlines into inflatable, valid tracks.
The per-env collision solve that separates overlapping gates into usable drone-course sequences.
Collision, props, checkpoints & progress, and the Course facade.
The pipeline data flow, resample, inflation, and CUDA-graph capture.
Every knob, plus a guide to trading yield, diversity, and throughput.
TrackGenerator, GateGenerator, configs, and result types.