BeamNG.Earth
BeamNG.drive용 1:1 비율 실시간 지구, 실제 고도·위성 이미지·부동 원점·보조 서버에서 LOD 스트리밍
GPU 배치 레이스 트랙·게이트 생성, 실시간 충돌·진행·인스턴싱 지원 – 순수 NVIDIA Warp, CUDA‑graph 기반
GPU-batched race-track & gate generation with runtime collision, progress and instancing utilities — pure NVIDIA Warp, CUDA-graph native.
게임PythonGitHub @AntoineRichard온라인운영자 미확인
써 보셨어요? 한 번만 눌러 주세요. 로그인은 필요 없어요.
개인 계정의 공개 저장소 소유자는 GitHub로 로그인해 운영자를 확인하고 소개를 직접 관리할 수 있습니다. 관리자 승인은 필요하지 않습니다.
로그인한 뒤 확인 파일을 만들어 이 저장소의 기본 브랜치에 30분 안에 커밋해 주세요. 다른 브랜치나 포크의 파일은 인정하지 않습니다. 파일을 올린 뒤 아래에서 확인하면 관리자 승인 없이 관리할 수 있습니다. 자격을 유지하려면 파일을 남겨 두세요.
로그인이 필요하면 로그인 화면으로 이동합니다. 로그인 후 이곳으로 돌아와 원하는 확인 버튼을 다시 눌러 주세요.
프로젝트 폴더에서 /nomorevibe verify를 실행하면 소유권을 확인하고 소개를 직접 관리할 수 있습니다.
1분 만에 확인하기메이커가 쓴 소개는 위의 한 줄이 전부입니다. 더 자세한 내용은 저장소 README에서 읽을 수 있습니다. 저장소 README ↗
README 전체를 불러오는 중입니다.
README 전문 보기 ↗GPU-batched race tracks, gate courses, and the runtime signals to race them — pure NVIDIA Warp, CUDA-graph native.
[!NOTE] Coming from 0.1? Read Upgrading from 0.1: most 0.1 code keeps running, but some results change without an error.
Given a batch of per-environment seeds, TrackGen generates E closed-loop
tracks (or gate sequences) in parallel — and then keeps working at sim
time: out-of-bounds collision, checkpoint progress and rewards, prop
instancing, all as Warp kernels over the same batched buffers.
seeds[E] ─► generator ─► resample ─► XPBD relax ─► road band ─► checks ─► Track ─► Course ─► your sim
bezier · checkpoint · hull · polar · voronoi · repulsive valid[E] checkpoints · progress · collision
| docs | ||
|---|---|---|
| Six track generators | Bezier, checkpoint-steering, hull, polar, Voronoi, and repulsive-growth (self-repulsive serpentines, far slower: for offline datasets) — one preset, per-env knobs | Generators |
| Pipelines as data | Each generator runs a pipeline of stages described by a spec: start from a preset, swap or add stages, save and reload it | Generating |
| Relaxation & inflation | XPBD-relaxed centerlines inflated into constant-width road bands — index-aligned outer/center/inner borders with tangent/normal frames | How it works |
| Gate sequences | Batched gate courses with gate poses and collision-solved spacing | Tutorial |
| Checked results | Every env is checked (self-crossings, thickness, truncation, ...): valid[e] and fail bits on every result | Invalid envs |
| Out-of-bounds collision | Oriented boxes vs the drivable band — exact segment scan or baked SDF — plus disc obstacles (gate posts, cones) | Collision |
| Boundary props | Cone lines and wall pieces along any boundary, seam-free, for instanced rendering | Props |
| Checkpoints & progress | Ordered goals from gates or subsampled centerlines; pass/lap events and dist_to_next rewards | Progress |
| Track-frame localization | Arc-length s / lateral offset n per env (warm-startable), centerline curvature, curvature-limited speed profiles | Localize |
| The Course | One object: Course.track(...) → bind() → step() / reset(mask) / regenerate(mask=...), recordable into your CUDA graph | Courses |
| Plugins | Your own generators, stages and runtime components, found through an entry point and checked by a conformance kit | Extending |
Python ≥ 3.10; numpy and warp-lang ≥ 1.18 are the only runtime deps. The
cuda device needs an NVIDIA driver R580+ and an sm_75+ GPU (Warp's PyPI
wheels); the cpu device runs anywhere.
uv add "git+https://github.com/AntoineRichard/[email protected]" # a release (recommended)
pip install "track_gen @ git+https://github.com/AntoineRichard/[email protected]" # or with pip
uv add "git+https://github.com/AntoineRichard/TrackGen.git@main" # or the latest main
From a checkout: uv venv --python 3.12 && uv pip install -e ".[dev]".
Extras: dev (tests, torch, matplotlib) · ui (Gradio parameter explorer)
· docs (Sphinx). Details:
installation.
Generate a batch of tracks from a preset:
from track_gen import TrackGenerator
from track_gen.pipeline import presets
E, device = 64, "cuda:0" # or "cpu"
spec = presets.track(num_envs=E, device=device, half_width=0.03, n_max=512)
gen = TrackGenerator(spec, seeds=0) # builds the pipeline, runs one generation
track = gen.generate() # a Track: flat [E * N_max] vec3f point fields
center = track.center.numpy().reshape(E, -1, 3) # count[e] real points per env, then NaN
valid = track.valid.numpy() # [E]: 0 for an env that failed a check
…or let one object run the sim-time side — checkpoints, progress, out-of-bounds checks, per-env regeneration:
from track_gen.course import Course
course = Course.track(spec, checkpoint_spacing=0.6, collision="segments", seeds=42)
course.bind(position=pos, orientation=quat, half_extents=half_extents) # your sim's [E] buffers
regen = course.inputs["regen_mask"]
res = course.step() # every sim step: progress events + contacts
valid = res.valid.numpy() # gate rewards and observations on valid
done = (res.contacts.oob.numpy() == 1) | (valid == 0)
if done.any(): # a host read: only when an episode ended
regen.assign(done.astype("int32"))
course.regenerate(mask=regen, advance=True) # new courses for those envs only
An env whose course failed a check (valid[e] == 0) reads oob = 1 and
frozen progress: gate rewards and observations on res.valid and give it a
new course
(invalid envs).
On the cpu device (or with a generator that has a step that runs on the
host), regenerate(mask=...) runs a full generation even with an all-zero
mask, hence the if. On cuda it replays the course's own CUDA graph, which
skips an all-zero mask on device with CUDA 12.4 or newer (conditional nodes),
as does recording it into your own Warp capture
(RL auto-reset).
More: quickstart · concepts and terms · CUDA graphs in a sim
| Getting started | install, quickstart, concepts and terms, parameter explorer |
| Upgrading from 0.1 | what changed, what to check, how to port |
| Generating tracks and gates | presets, specs, params, seeds; results; curricula; choosing a generator |
| Generators | the six families, quality benchmarks |
| Courses, simulators and RL | courses, CUDA graphs in a sim, RL auto-reset, runtime utilities |
| Extending TrackGen | generators, gate generators, stages, components, testing and packaging plugins |
| Reference |
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q -m "not slow and not benchmark and not cuda" # fast lane (docs examples included)
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q # full suite
PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 python -m pytest -q tests/test_doc_snippets.py # docs examples only
python tests/_doc_snippets.py # per-page docs examples report
python docs/_tools/build_ci_env.py -W --keep-going -E -b html docs docs/_build/html # docs, as CI builds them
python docs/_tools/check_readme_anchors.py docs/_build/html README.md # README links into the docs
python -m sphinx -b linkcheck -q docs docs/_build/linkcheck # external links
Contributing guides (dev setup, writing a generator, rendering the committed figures) live in the docs.
| the public API, configuration |
| Internals | the pipeline, CUDA graphs, resample → XPBD → inflation |