New here? This is the full pipeline in five commands. All commands must be run from inside the ar4-physical-ai/ folder — open a terminal, cd ar4-physical-ai, and keep that terminal open.
Step
Command
Notes
1. Build images
docker compose build
First time only — takes ~20–30 min
2. Start simulation
docker compose up
Opens Gazebo + RViz2. Wait for "MoveIt Servo ready" in logs
3. Collect episodes
docker compose run --rm record
New terminal — arm moves to home, then you drive it
X11 display for the Gazebo GUI — if you get a permission error, run xhost +local:docker once in your terminal before starting
Xbox One (or compatible) controller — USB or Bluetooth; plug it into any USB port, it is detected automatically
ROS 2 Jazzy on your host machine — only needed if you want to use rqt_image_view to preview the wrist camera. If you don't have it, Foxglove works without any local ROS install
# Clone with submodules (the AR4 ROS driver lives under vendor/)git clone --recurse-submodules https://github.com/aegean-ai/ar4-physical-ai.gitcd ar4-physical-ai# Build all Docker images (base → overlay → dev)# This takes a while the first time — grab a coffeedocker compose build
Forgot --recurse-submodules? Run git submodule update --init --recursive to fix it.
Important: Every docker compose command in this README must be run from inside the ar4-physical-ai/ folder. If you open a new terminal, cd back into the repo first:
docker compose up (no arguments) starts only the simulation — Gazebo and MoveIt. Everything else is opt-in so you never accidentally launch two Gazebo instances or start hardware drivers alongside a sim.
Command
What it starts
docker compose up
Gazebo GUI + MoveIt2 + RViz2 (simulation)
docker compose --profile hardware up
Real AR4 driver + MoveIt2
docker compose --profile headless up sim-tabletop-headless
Gazebo without a display (for servers / CI)
docker compose --profile obs up foxglove-bridge
Foxglove WebSocket bridge
docker compose run --rm record
Xbox teleop + LeRobot recorder
docker compose run --rm smolvla
SmolVLA policy inference
docker compose run demo
C++ pick-and-place demo
Services that run with docker compose run are one-shot interactive containers — they start, do their job, and exit cleanly on Ctrl-C. The simulation (up) stays running in the background while you use them.