Examples¶
The workspace ships with examples/ — seven ready-to-run notebooks that take you
from reading a sensor to training a deep-learning racer. Each notebook explains itself as
it goes: read a cell, run it, watch the robot react. Supporting files (web pages, models,
configs) live in examples/assets/.
How to run a notebook¶
- Run the simulator and open the workspace (a real kit's
workspace is seeded with the same
examples/folder). - In the file explorer, open a notebook — say
examples/line-tracing.ipynb. - When VS Code asks for a kernel, pick Python 3 (PhysiCar AI) — ROS 2 and every library the examples use are already set up in it.
- Run the cells top to bottom. Driving loops run until you press ⏹ (interrupt) — the notebook then stops the car for you.
Live views open in app.physicar's MYAPP tab (they serve on port 5000, one at a
time). Broke a notebook? Reset Examples in the PHYSICAR AI panel's settings restores
the originals.
The notebooks¶
Two are references — runnable tours of the interfaces everything else builds on:
- PhysiCar ROS 2 — the robot: every ROS 2 topic and Web API endpoint — sensors, control, audio.
- PhysiCar SIM — the simulator: teleport, worlds, traffic lights, reset, evaluation. (simulator only)
Five are projects — each builds one complete robot behavior:
- Line Tracing — follow the yellow line with a color filter and P-control. No learning — your first autonomous drive.
- Object Detection — detect objects with YOLOv8 and chase one.
- Navigation — map the track with the LiDAR (SLAM), then click a destination and the car drives itself there (Nav2).
- Racing Deep Learning — one CNN, two teachers: supervised learning from your driving, reinforcement learning from a reward.
- Agent — chat and voice agents that drive the robot through LLM tool calling.
Recommended order¶
- PhysiCar ROS 2 — the robot's interfaces; every project wraps them
- PhysiCar SIM — worth an early skim if you practice in the simulator
- Line Tracing — the perception → decision → control loop, at its simplest
- Object Detection — the same loop, with a neural network doing the seeing
- Navigation — the standard ROS 2 stack: SLAM, then Nav2
- Agent — wrap the robot's API into tools an LLM can call
- Racing Deep Learning — the deepest one: train the driver yourself, both ways
Most notebooks run unchanged on a real kit — they only talk to the robot's local interfaces. PhysiCar SIM and the reinforcement-learning half of Racing Deep Learning need the simulator.
Learn more
Start the simulator → Start with a virtual robot. Robot endpoints → Web API. ROS 2 topics → ROS2 interface reference.