Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
f906492
start.py: auto_arm option for unattended sim runs
daniel-debrun Oct 29, 2026
67ee033
TrackFollower: optional speed cap from the steered curvature
daniel-debrun Oct 29, 2026
ff84fe2
Minimum-curvature racing line for track following
daniel-debrun Oct 29, 2026
650afae
Race settings for the AutoDRIVE compete track
daniel-debrun Oct 29, 2026
2b4c3a4
ORB-SLAM3 RGB-D-inertial mode (slam.inertial)
daniel-debrun Oct 29, 2026
cdf6533
RGB-D-inertial benchmark: ORB-SLAM3 (CUDA fork) vs cuVSLAM
daniel-debrun Oct 29, 2026
d246562
Real-track RGB-D-inertial benchmark: recording, conversion, AprilTag …
daniel-debrun Oct 29, 2026
06462ad
autodrive_xvfb: screen size from sim.env (SCREEN_W, SCREEN_H)
daniel-debrun Oct 29, 2026
c33e550
Fix the ORB-SLAM3 RGB-D-inertial reset loop (fork), exact-depth bench…
daniel-debrun Oct 29, 2026
5010c48
VIO bench runners: real-time replay and a CPU budget
daniel-debrun Oct 29, 2026
9c556f3
ORB-SLAM3 RGB-D-inertial startup fix (fork 7cb97e4) and the real-time…
daniel-debrun Oct 29, 2026
7508f61
ORB-SLAM3 fork: blackout recovery in the same map and crash guards; l…
daniel-debrun Oct 29, 2026
b14f85f
ORB_SLAM3 -> 7121458: tracker/local-mapping race fixed, no divergence…
daniel-debrun Oct 30, 2026
e7e537d
Rear-IMU vehicle-state EKF (control.ImuEKF) and its sim evaluation (d…
daniel-debrun Oct 30, 2026
061c6fc
Rear IMU on the car with the existing firmware: IMUWorker raw stream,…
daniel-debrun Oct 30, 2026
8dd9a58
Figures: ORB-SLAM3 CUDA vs cuVSLAM, and the rear-IMU estimator vs Pos…
daniel-debrun Oct 30, 2026
19d7e8f
AutoDRIVE: recover from collision respawns, bench arms after its rese…
daniel-debrun Oct 30, 2026
fd30d85
AutoDRIVE steering-cap sweep: 5.5-8 m/s^2 hits the bottom hairpin's e…
daniel-debrun Oct 30, 2026
e9d81d0
Race config: accel / decel 5 -> 8 m/s^2: compete 107.2-107.6 s in 3 r…
daniel-debrun Oct 30, 2026
87d0a26
No LiDAR anywhere: the sim maps from the camera's segmentation; no gr…
daniel-debrun Oct 30, 2026
110a083
Practice track map built from the camera's segmentation (no LiDAR) an…
daniel-debrun Oct 30, 2026
92a7156
Compete track map from the camera (scripts/seg_map.py), racing on it;…
daniel-debrun Oct 31, 2026
0807c27
No-LiDAR AutoDRIVE results: compete 120.04-130.64 s, 0-1 collisions; …
daniel-debrun Oct 31, 2026
98ed9e4
Map the lap from segmentation scans on the car and in the sim
daniel-debrun Nov 9, 2026
f207b75
Optional SLAM-like degradation of the sim pose
daniel-debrun Nov 9, 2026
3d06e00
Jetson self-test, stage latency report, deploy from release tags
daniel-debrun Nov 9, 2026
522f051
CI on pushes to main; live-mapping and degraded-pose sim stages
daniel-debrun Nov 9, 2026
35f06ac
Licence notice for the GPLv3 ORB-SLAM3 wrapper
daniel-debrun Nov 9, 2026
84a3b6d
Pin ORB_SLAM3 to the fork's master
daniel-debrun Nov 9, 2026
31beeda
HUD: label the map by its source
daniel-debrun Nov 9, 2026
c831843
Mapping: non-blocking retries, teleports by speed, extract from the f…
daniel-debrun Nov 9, 2026
b625a26
Degraded pose: bounded, mean-reverting bias
daniel-debrun Nov 9, 2026
0a4bc8c
Cluster job: degraded-pose overrides
daniel-debrun Nov 9, 2026
2db1a63
In-loop mapping and degraded-pose results
daniel-debrun Nov 9, 2026
529d53a
Docs: sim-to-real, results, roadmap, deployment
daniel-debrun Nov 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
# CI: pyflakes + hardware-free tests (oakd / slam tests deselected), on pull requests only
# (not again when a PR is merged); run it by hand from the Actions tab if needed.
# CI: pyflakes + hardware-free tests (oakd / slam tests deselected), on pull requests and on
# every push to main; run it by hand from the Actions tab if needed.
name: CI

on:
pull_request:
push:
branches: [main]
workflow_dispatch:

concurrency:
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/jetson-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Jetson image (JetPack 6, aarch64) built natively on an arm64 runner: on car-v* tags it is pushed
# to ghcr.io; run by hand from the Actions tab to only build it. ORB_SLAM3 is checked out without
# the private firmware submodule, which the image does not need.
name: Jetson image

on:
push:
tags: ["car-v*"]
workflow_dispatch:
inputs:
target:
description: "Dockerfile target (runtime = with ORB-SLAM3, noslam = without)"
default: runtime
type: choice
options: [runtime, noslam]

permissions:
contents: read
packages: write

jobs:
build:
runs-on: ubuntu-24.04-arm
timeout-minutes: 240
steps:
- uses: actions/checkout@v4
with:
submodules: false

- name: ORB_SLAM3 submodule
run: git submodule update --init --depth 1 ORB_SLAM3

- name: Disk space for the JetPack base image
run: |
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache || true
sudo docker system prune -af || true
df -h /

- name: Build
run: |
docker build --target "${{ inputs.target || 'runtime' }}" -t pilot_core-jetson -f Dockerfile .
docker run --rm --shm-size=1g --entrypoint python3 pilot_core-jetson scripts/jetson_selftest.py --only shm,buffers

- name: Push
if: startsWith(github.ref, 'refs/tags/car-v')
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin
image="ghcr.io/$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')"
docker tag pilot_core-jetson "$image:${GITHUB_REF_NAME}"
docker push "$image:${GITHUB_REF_NAME}"
14 changes: 14 additions & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pilot_core
Copyright 2024-2026 UTASR - UT Autonomous Scale Racing

pilot_core is licensed under the Apache License, Version 2.0 (LICENSE), with the
exceptions below.

ORB-SLAM3 (submodule ORB_SLAM3/, a fork of UZ-SLAMLab/ORB_SLAM3) is licensed under the
GNU General Public License, version 3 (ORB_SLAM3/LICENSE). orbslam3_wrapper/ links it
and is distributed under the GPL, version 3 or later, as well. The built module
orbslam3_python, and any program or image that includes it (the Dockerfile's slam-build
and runtime targets), is a combined work under the GPL, version 3. The Dockerfile's
noslam target and the Python packages run without ORB-SLAM3 and stay under Apache 2.0.

The Arduino firmware (submodule firmware/) is a separate repository with its own terms.
2 changes: 1 addition & 1 deletion ORB_SLAM3
Submodule ORB_SLAM3 updated 30 files
+18 −0 Examples/Benchmarks/orb_cuda_check.cc
+1 −0 Examples/Benchmarks/slam_cpu_vs_cuda.sh
+0 −134,643 evaluation/Ground_truth/EuRoC_imu/MH_GT.txt
+0 −66,347 evaluation/Ground_truth/EuRoC_imu/V1_GT.txt
+0 −68,463 evaluation/Ground_truth/EuRoC_imu/V2_GT.txt
+0 −3,639 evaluation/Ground_truth/EuRoC_left_cam/MH01_GT.txt
+0 −3,000 evaluation/Ground_truth/EuRoC_left_cam/MH02_GT.txt
+0 −2,632 evaluation/Ground_truth/EuRoC_left_cam/MH03_GT.txt
+0 −1,977 evaluation/Ground_truth/EuRoC_left_cam/MH04_GT.txt
+0 −2,222 evaluation/Ground_truth/EuRoC_left_cam/MH05_GT.txt
+0 −13,466 evaluation/Ground_truth/EuRoC_left_cam/MH_GT.txt
+0 −2,872 evaluation/Ground_truth/EuRoC_left_cam/V101_GT.txt
+0 −1,672 evaluation/Ground_truth/EuRoC_left_cam/V102_GT.txt
+0 −2,095 evaluation/Ground_truth/EuRoC_left_cam/V103_GT.txt
+0 −6,637 evaluation/Ground_truth/EuRoC_left_cam/V1_GT.txt
+0 −2,241 evaluation/Ground_truth/EuRoC_left_cam/V201_GT.txt
+0 −2,310 evaluation/Ground_truth/EuRoC_left_cam/V202_GT.txt
+0 −1,891 evaluation/Ground_truth/EuRoC_left_cam/V203_GT.txt
+0 −6,440 evaluation/Ground_truth/EuRoC_left_cam/V2_GT.txt
+0 −130 evaluation/associate.py
+0 −229 evaluation/evaluate_ate_scale.py
+18 −0 include/ORBextractorCuda.h
+6 −0 include/Settings.h
+22 −0 include/Tracking.h
+4 −0 src/ImuTypes.cc
+7 −2 src/LocalMapping.cc
+18 −0 src/ORBextractorCuda.cu
+45 −14 src/Optimizer.cc
+12 −0 src/Settings.cc
+113 −27 src/Tracking.cc
66 changes: 36 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,26 @@ mapping, control and actuation, run as Python processes that share data through
shared-memory ring buffers. The same pipeline drives the real car (OAK-D, Jetson,
Arduino) and the AutoDRIVE RoboRacer simulator.

![Telemetry HUD: a mapping lap, then a racing lap, in the AutoDRIVE RoboRacer sim](docs/images/hud.gif)
![Telemetry HUD: a camera-only mapping lap, then racing, in the AutoDRIVE RoboRacer sim](docs/images/hud.gif)

The AutoDRIVE RoboRacer sim at 5× speed. A LiDAR follow-the-gap lap maps the track and closes
the loop, then `pure_pursuit` races the boundary it just extracted (16.73 s, 0 collisions).
Every panel is drawn from the recorded buffers on one clock:

- sim chase view
- car camera with the live Fast-SCNN segmentation
- map built from LiDAR, with the trail coloured by speed
- controller command vs. what the safety supervisor actually sent

Rendered by [`scripts/render_hud.py`](#telemetry-hud). Full-resolution frame: [hud_frame.png](docs/images/hud_frame.png).
The AutoDRIVE RoboRacer sim at 4× speed, camera only: follow-the-gap on the segmentation's
track edge drives the mapping lap, the walls come from an occupancy grid over those scans, and
`pure_pursuit` races the map it just built. Every panel is drawn from the recorded buffers on one
clock (sim chase view, car camera with the live Fast-SCNN mask, map and trail, commands before and
after the safety supervisor), by [`scripts/render_hud.py`](#telemetry-hud).
Full-resolution frame: [hud_frame.png](docs/images/hud_frame.png).

| | |
| --- | --- |
| **Sim validation** | link, arming, steering, reset, stop and map-then-race checks pass; 84 benchmark runs, 0 errors ([results](docs/results.md)) |
| **Controllers** | `pure_pursuit`: 12.89 s best practice lap, 0 collisions; `mpc` about 0.25 s per lap slower, with the lowest cross-track error |
| **Vision** | sim track segmentation IoU 0.94 on an unseen track, live in the loop |
| **Safety** | neutral until armed; 150 ms command watchdog; speed cap and slew limits; RC override on the car |
| **No LiDAR** | car and sim map and race from the camera's segmentation; one set of workers for both ([sim to real](docs/sim_to_real.md)) |
| **Mapping in the loop** | practice track mapped in 55 s with 0 hits, 3 of 3 runs; then 10 laps, 0 collisions, 76.2–76.9 s. Compete track mapped in 3 of 3 runs, 4–5 hits ([results](docs/results.md)) |
| **Racing** | compete track, 10 laps on the camera map: 120.04 s with 0 collisions in 2 of 5 runs (published final: 15th 113.19 s) |
| **Sim to real** | a SLAM-like degraded pose for the sim; latency and dropouts, not noise, are what the race settings cannot take yet |
| **Jetson** | self-test before every start, per-stage latency from any recording, deploys from release tags, image built in CI ([deployment](docs/deployment.md)) |
| **Safety** | neutral until armed; 150 ms command watchdog; speed cap and slew limits; RC override and a 250 ms firmware timeout on the car |
| **Tests** | 398 hardware-free tests in CI |

Nothing here has yet run on the car with this code; [docs/roadmap.md](docs/roadmap.md#car) lists the steps.

## Quick start

Expand Down Expand Up @@ -87,17 +88,18 @@ All timestamps are on `time.monotonic()`. Controllers use signed units (steering

| `control_mode` | Controller | Needs |
| -------------- | ---------- | ----- |
| `pure_pursuit` (default), `stanley`, `lqr`, `mpc` | Track followers | SLAM + mapped track |
| `pure_pursuit` (default), `stanley`, `lqr`, `mpc` | Track followers (`lqr` / `mpc` sim-only until the car's yaw rate is measured) | SLAM + mapped track |
| `policy` | PPO policy (ONNX) from `rl/train.py` | SLAM + mapped track + model |
| `depth_ftg` | Follow-the-Gap on a depth scan | depth camera |
| `bc`, `vae` | Behaviour cloning / VAE policy (ONNX) | depth camera + model |

**No LiDAR on the car.** The follow-the-gap mapping drive (`track_control.mapping_drive`)
takes a 2D scan. In the sim that is the LiDAR's; on the car it is built from the edge of
the segmentation mask and the depth at that edge (`control/seg_scan.py`, `seg_scan:` in the
configs, needs `vision.enabled`). On the sim's showcase run, inside the camera's view, it
places walls within 0.9 cm median (10.9 cm p90) of the LiDAR, misses none within 3 m, and
steers within 0.2° of the LiDAR-driven gap follower ([results](docs/results.md#segmentation-edge-scan)).
**No LiDAR, on the car or in the sim.** `SegScanWorker` turns the segmentation mask's edge
into a LiDAR-format scan (`control/seg_scan.py`): the depth at the edge places it, or where there
is none, the point where its pixel's ray meets the floor. The follow-the-gap mapping drive
(`track_control.mapping_drive`) drives on that scan, and `MappingWorker` builds the walls from it
on an occupancy grid (`control/occupancy_map.py`): rays free the floor they cross, so an edge
placed short from far away is cleared by the floor seen up close. The same workers run on the car
and in the sim ([docs/sim_to_real.md](docs/sim_to_real.md)).

Safety supervisor (`control/safety.py`): neutral until armed; commands older than
150 ms, future-stamped or non-finite → neutral throttle; 1.5 m/s speed cap, reverse
Expand Down Expand Up @@ -156,15 +158,16 @@ python scripts/recording_to_dataset.py <run> --vision datasets/track --bootstrap
`config_autodrive.yaml` runs the whole pipeline against the AutoDRIVE RoboRacer Unity
simulator. pilot_core is the server the sim connects to on port 4567, so no ROS or
bridge is involved. Sensors fill the usual buffers, and the actuator's supervised
command goes back to the sim. A LiDAR follow-the-gap lap maps the track, then the
control mode races on it. Setup on a GPU box, the sim's protocol quirks, calibration
and the benchmark are in [docs/autodrive.md](docs/autodrive.md).
command goes back to the sim. A follow-the-gap lap on the camera's scan maps the track, then
the control mode races on it; `sim_pose_degrade.enabled` makes the sim's ground-truth pose late,
noisy and drifting like ORB-SLAM3's. Setup on a GPU box or a Slurm cluster, the sim's protocol
quirks, calibration and the benchmark are in [docs/autodrive.md](docs/autodrive.md).

```bash
python start.py --config config_autodrive.yaml # then: python scripts/autodrive_sim_ctl.py connect
```

Validation and benchmark results: [docs/results.md](docs/results.md).
Results: [docs/results.md](docs/results.md).

## Telemetry HUD

Expand Down Expand Up @@ -193,7 +196,7 @@ contents, checksums, rebuild commands and the data still to collect are in
| Path | Contents |
| ---- | -------- |
| `start.py` | Entry point: builds the pipeline from a config, supervises workers, handles keys |
| `workers/` | One process per stage (camera, IMU, SLAM, LiDAR, state, mapping, vision, control, actuator, AutoDRIVE link, recorder) |
| `workers/` | One process per stage (camera, IMU, SLAM, segmentation scan, state, mapping, vision, control, actuator, AutoDRIVE link, recorder) |
| `shared_buffer/` | Shared-memory ring buffers, one typed buffer per stream |
| `control/` | Controllers, EKF, safety supervisor, bicycle-model sim (plain library) |
| `vision/` | Track segmentation models, training and inference |
Expand All @@ -213,21 +216,24 @@ contents, checksums, rebuild commands and the data still to collect are in
python -m pytest -m "not oakd and not slam" # hardware-free suite (CI)
OAKD_AVAILABLE=1 python -m pytest -m oakd # with an OAK-D on USB 3
python -m pyflakes control vision workers shared_buffer rl scripts tests start.py
python scripts/jetson_selftest.py --skip camera,i2c # the checks the Jetson runs before a start
```

## Documentation

| Guide | |
| ----- | - |
| [docs/autodrive.md](docs/autodrive.md) | AutoDRIVE sim: setup, protocol, calibration, benchmark, vision, telemetry export |
| [docs/results.md](docs/results.md) | Sim validation and benchmark results |
| [docs/results.md](docs/results.md) | Sim results: camera-only racing, in-loop mapping, degraded pose, stage latency |
| [docs/sim_to_real.md](docs/sim_to_real.md) | Every gap between the sim and the car, and how the pipeline handles it |
| [docs/oakd.md](docs/oakd.md) | OAK-D bench check, USB 3 requirement, open camera items |
| [docs/slam.md](docs/slam.md) | ORB-SLAM3 build and the Python wrapper |
| [docs/deployment.md](docs/deployment.md) | Running on the Jetson, natively or in Docker |
| [docs/deployment.md](docs/deployment.md) | Running on the Jetson: release tags, self-test, measuring, Docker |
| [docs/datasets.md](docs/datasets.md) | Data and model bundles, and what is still to collect |
| [docs/roadmap.md](docs/roadmap.md) | What is next |
| `firmware/README.md` | Arduino firmware and the I2C interface |

## License

[Apache-2.0](LICENSE). ORB-SLAM3 (submodule, linked by `orbslam3_wrapper`) is GPLv3.
[Apache-2.0](LICENSE), except `orbslam3_wrapper` and anything built with it, which link the
GPLv3 ORB-SLAM3 submodule and are GPLv3 ([NOTICE](NOTICE)).
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
36 changes: 36 additions & 0 deletions bench/2026-10-29_autodrive/results.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# AutoDRIVE re-run and steering-cap sweep (2026-10-29)

> **Superseded: these runs used a LiDAR-built map and fused the sim's own velocity.** The
> race map and racing line were made in June from a LiDAR mapping lap on the ground-truth
> pose, and StateWorker fused the sim's exact speed. pilot_core no longer does either (no
> LiDAR; no ground-truth speed): see [the no-LiDAR runs](../2026-10-31_autodrive_nolidar/results.md). The leaderboard comparison is
> also not like-for-like: the track was known and settings were tuned on it, one run each.

`scripts/autodrive_bench.py run --config config_autodrive_compete.yaml --laps 10`, stock 2026-iros
builds, L40S. Scored like the published final: race time + 10 s per collision.

| run | laps | collisions | laps (s) | adjusted (s) | place of 23 |
|---|---|---|---|---|---|
| qualifier, practice track | 10 | 0 | 9.19, then 6.89-6.98 | ~71.6 | qualified |
| final, compete, steer_lat_accel 5.0 (config) | 10 | 0 | 13.39, then 10.52-10.76 | **109.07** | **15** |
| compete, steer_lat_accel 5.5 | 10 | 6 | 13.98, 10.43-11.62 | 172.85 | 22 |
| compete, steer_lat_accel 6.0 | 8 (stopped at 10+ hits) | 11 | 10.93-12.05 | - | - |
| compete, steer_lat_accel 7.0 | 5 (stopped) | 11 | 10.78-11.75 | - | - |
| compete, steer_lat_accel 8.0 | 5 (stopped) | 11 | 10.60-12.20 | - | - |

| compete, accel / decel 8 m/s^2 (cap 5.0), 3 runs | 10 | 0 | 12.62, then 10.36-10.65 | **107.19 / 107.17 / 107.62** | **14** |
| qualifier, accel / decel 8 m/s^2 | 10 | 0 | 9.03, then 6.86-6.91 | ~71.0 | qualified |

Published final: 1st 71.82 s (best lap 7.16 s), 14th 107.77 s, 15th 113.19 s.

- A higher cap hits the wall at the exit of the bottom hairpin, every time at the same spot
(x 2.4, y -15.3: clipping the end of the inner wall at ~2 m/s), and at 6.0 also out of the
top hairpin (fig_steer_collisions.png). The zig-zags never touched.
- Even clean it would gain little: the best lap at 5.5 was 10.43 s against 10.52 s.
- Where the time goes, flying lap at 5.0: mean 4.1 m/s (the winners ~6.1 m/s); hairpins mean
2.3 m/s (min 1.6), zig-zag 3.8 m/s, the long straight peaks at 8.8 m/s (v_max 12, accel and
decel 5 m/s^2 never let it get there).

accel / decel 8 m/s^2 is now in config_autodrive_compete.yaml: 1.5-1.9 s off the race, mostly the
standing-start lap (13.39 -> 12.62 s). The straight still peaks at ~8.6 m/s, so the planner's
acceleration is not what limits it there: the sim car does not accelerate faster than that.
Binary file added bench/2026-10-29_vio_sim/fig_dual_imu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bench/2026-10-29_vio_sim/fig_slam_compare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading