Racing — one track, every AI method¶
The Racing courses are plain Python files in your workspace, ~/physicar_ws/tutorials/racing- —
installed and kept up to date by the PhysiCar panel › Tutorials tab › Racing, which runs them
for you from the terminal. You will climb the ladder of AI methods on the same track:
- Line Tracing — rule-based: you write the rules (HSV or RGB
color + steering), no training at all. Files:
tutorials/racing-rb/line_tracing.py+tutorials/racing-rb/settings.json(+myapp.html, the page the course shows in the MYAPP tab while it runs). - Supervised Learning — you label photos, a CNN learns
to imitate you. Files:
tutorials/racing-ml/train.py,tutorials/racing-ml/inference.py+tutorials/racing-ml/settings.json(+myapp.html); labeled photos intutorials/racing-ml/data/{left,straight,right}/, trained models intutorials/racing-ml/models/<id>.onnx.
How a course page works¶
- The ▶ button (Line Tracing / Train / Inference) types the course command into the terminal —
python3 ~/physicar_ws/tutorials/racing-rb/line_tracing.py,python3 ~/physicar_ws/tutorials/racing-ml/train.pyorpython3 ~/physicar_ws/tutorials/racing-ml/inference.py— and the output is the terminal. The live view is the app's MYAPP tab while a course runs. - Stop is Ctrl+C in that terminal, or the panel's Stop button.
- The gear holds the course settings — speed, steering, camera angle, line
color — stored in the course's
settings.json(edit either one) and applied live to a running course. - The scripts are in the explorer under
tutorials/(read-only). Read them when you're curious; copy a script into your own folder when you want to go custom. - One course drives at a time — starting a run stops the other. Training can run alongside a drive.
Race day? Time your laps with the Racing Lap Timer and start fair with the Remote Traffic Light.