S2 Arena

A full simulator for the ARC Championship (ARCC), built with CU Robotics. It generates rulebook arenas, inspects robots, and referees matches automatically. Six robots can play one match, and each robot can run the team's real firmware against a MuJoCo plant. People drive those robots from a browser.

Driving Sim runs on a host machine, so it is only live while that host is running a match.

The 2026-27 3v3 field in the simulator, with ramps, walls, tile surfaces, objectives and two robots

The 2026-27 3v3 field, composed by the arena generator and drawn with the MuJoCo renderer. The robots are the generic reference robots.

2
seasons of rules, keyed as data
1 kHz
physics step, with a 100 Hz control tick
6
robots per match, each with private firmware
4
perception levels, from ground truth to images

Why we built it

ARCC is a robot combat competition. Teams build robots that fire projectiles at armor plates. A referee system on each robot measures hits, power, barrel heat and muzzle speed, and it can cut power when a robot breaks a limit. A team gets very little time on a real field, and a broken robot stops all testing.

The first simulator drove one robot with real firmware. Then the team needed full matches, so that drivers could practice and strategy could be tested. When the Season 2 manuals came out, the rules changed. We decided to build the simulator so that a new season is new data, not an edit to old code. The goal has three parts:

  • Inspect any robot against the building rules, as event Inspection does.
  • Referee any robot at runtime: chassis power, barrel heat, muzzle speed, armor hits, HP, penalties, autonomy and ammunition.
  • Play on arenas built to the dimensions in the manuals: 2026-27 3v3 and 1v1, and 2025-26 3v3.

System architecture

The match server has one rule at its center: the world does not know the referee. The physics world reports events. The referee turns events into decisions. The game mode connects the two. So each part can be tested alone, and the same referee can run any season. The core is C++20 with Python bindings.

Browser drivers
Humans, in Driving Sim
Scripted bots
Rule-based opponents
RL policies
Out-of-process controllers
Team firmware
Real code, on the plant
Level K: velocity, gimbal and fire commands. Level M: raw sensors and referee serial bytes in, motor commands out.
Match server
InputRouter
Enforces the operating mode and autonomy rules for each slot.
GameMode
Roster, arena, periods and win logic. One mode per Events chapter.
Referee
Pure rules. Event in, decision out. Deterministic, with no physics.
Events go up to the referee. Decisions (HP, cuts, cards, VP) come back down.
Physics world (MuJoCo)
Arena, robots, rounds and objectives, at 1 kHz. Deterministic from a seed.
PowerGateArmorSensor x4SpeedMonitorRFIDMainControlLightsSupercapMeter
Everything above is built from data
Rules
Per-season YAML, each value cited
arena_gen
Parametric MJCF plus zones
Robot packages
Model plus manifest
Recordings
Exact replay from commands
Figure 1. One match. Controllers of any type connect through the same interface, and all of them stay behind the same referee and power gate.

We copy the real referee system

Teams do not write the referee. The organizers lend each team the hardware, and team code can only read it through a serial port. We copy that boundary exactly. Each real module has a simulated part, so any firmware that works on a real robot can read the same data here.

Real moduleWhat it doesSimulated part
Power ManagementMeasures chassis power and cuts outputs on a penaltyPowerGate
Armor Module x4Detects hits and collisions on each plateArmorSensor
Speed MonitorMeasures each muzzle speed. Barrel heat comes from thisSpeedMonitor
Main ControlHolds robot state and gives team code the referee serial portMainControl
RFIDReads cards under zones, such as resupplyRfid
Light IndicatorsTeam color, HP, buffs. Opponents aim at the plate lightsLights

Rules are data

Limits, damage, heat, victory points and durations live in YAML under rules/<season>/, and each value cites its manual section. C++ and Python load the same files. A mode is named 3v3@2025-26, so an older season stays playable with its own rules, arena and robots.

Robots are packages

A robot is a robot.yaml manifest and a model.xml. The arena has no code that is specific to our robots. Inspection reads a package and makes the static checks that event Inspection makes: weight, dimensions, armor placement, launchers, battery and supercap energy. The repo includes generic, rule-legal reference robots that come only from rulebook limits.

View from above of the whole 3v3 field, with base platforms, a central wall and ramps

What it can simulate

AreaModel
Rigid bodiesChassis, suspension, omni and mecanum wheels, gimbal, ramps, walls and objectives, with contacts, in MuJoCo at 1 kHz.
Projectiles17 mm and 42 mm rounds with gravity and quadratic drag (midpoint RK2). Each step tests a swept sphere against plate faces and a ray against other geometry. Dispersion, speed spread and resting rounds are included.
Electrical powerA DC motor model per motor: I = (V - k_e w) / R, clipped to the current limit. It includes copper loss and regeneration. The referee integrates the limit minus measured power into the 60 J buffer. A cut makes the wheels coast.
RefereeHP, armor damage, barrel heat, over-speed, over-power, respawn, penalties, resupply, autonomy, objectives and victory points.
PerceptionFour levels, chosen per slot. The server sends each robot only what that level allows (Figure 2).
TimingLockstep for training and tests, so that the same seed and commands give the same bytes. Real time for external hardware: late commands are held and counted, as on a real field.
Level 0: Ground truth
Exact pose of all robots, rounds and objectives. Debug only.
Level 1: State estimates
Pose, velocity and type of each visible enemy, with field of view, range, line of sight, dropout, latency and noise.
Level 2: Detections
Four corner pixels per visible armor plate, light color, number and confidence, with pixel noise, misses, false positives and motion blur.
Level 3: Images
Rendered aim-camera frames, as JPEG or H.264 from the server, or drawn by the client from a culled pose stream.
Figure 2. Perception levels. The bar shows relative compute cost, not a measurement. Level 3 is for testing a vision pipeline, not for training a detector, because the renderer is not photorealistic.

Firmware in the loop and the robot plant

Most robot simulators use an ideal controller. We run the team's real firmware instead. The estimator, reference governor, controllers and safety state all run as they do on the robot. Only the hardware layer changes: stubs replace CAN and sensors, and a virtual clock replaces the hardware clock. No firmware source is copied. It compiles from a git submodule, so the simulator always runs the firmware the team really uses.

Firmware was never written to run many times in one process. It keeps process-wide globals. So we split the robot into two libraries with a plain C boundary. Each robot loads a private copy of the firmware library, and a fault in one robot leaves the others alone.

Plant (static library)
MuJoCo model, device bindings, realism settings, motor envelope, sensing and actuation.
SimulationDeviceBindingsRealismFirmwareInstance
encoders, gyro,
referee bytes
rm_fw_*motor
commands
Firmware (one copy per robot)
Real control code, plus simulated motors, encoders and gyro. Exports only the C ABI.
EstimatorGovernorControllersSafety state
Figure 3. The plant-firmware boundary. The plant never links the firmware. The C ABI has no C++ types and no exceptions.

FirmwareInstance copies the shared library to a unique temp file, opens it with dlopen(RTLD_NOW | RTLD_LOCAL), unlinks the file and resolves each rm_fw_* symbol. Each copy has its own globals. A safety fault in firmware becomes a FirmwareFault in Python, and a reset starts a new episode.

The robot configuration uses the same path as the real robot. A small Rust tool turns the team's robot YAML files into the packets that the robot computer sends to firmware. In the arena, this is the Level M interface: each tick the firmware reads simulated sensors and referee bytes, and it returns motor commands. A browser driver or RL policy sends Level K intent into that same stack, so a person drives a robot with the real control loops.

Plant fidelity

The plant uses omni wheels on sprung corners, a motor model with a back-EMF current envelope, and gimbal numbers from CAD and measured replays. Each number has a recorded source, and we keep a numbered list of assumptions. We mark each value as measured, from CAD, from a data sheet, or a guess. This list shows where results can be trusted.

A wheel model made a large speed change. We replaced rings of roller spheres with one ellipsoid on each axle, carried by one free roller hinge that resets each step. A 3v3 match has a fifth of the bodies and contacts. With a projectile grid and work on hot paths, matches run about 2.3 times faster.

Firmware sim
Real firmware on the full plant. Use it for how the robot really drives and aims.
Highest fidelityRobot questions
Game world
Six robots in MuJoCo with controllers fitted to the firmware sim. Use it for match questions.
42 of 45 fit cells passMatch questions
Fast world
A 2.5D batched world with fitted tables, at about 20,000x real time. Used for training.
Parity gatesTraining
Figure 4. Three levels of fidelity. Each lower level is fitted to, and tested against, the level above it. The fast world is for reinforcement learning.

Driving Sim

Driving Sim is the front end. Anyone can open a link and drive a robot with no install. One server process hosts several games. A player hosts a game and gets a six-character code. Each of the six slots can be a human, a scripted bot or a policy, and empty slots become bots.

  • Three transports carry the match, in order of preference: a WebRTC data channel, WebSocket, and SSE. A tunnel forwards only TCP, so the client falls back by itself.
  • The server decides what each client sees. Clients get only the state their robot may know, and the viewer draws it.
  • Auto-aim runs only on the server, so competition code never reaches a browser.
  • Each match records to disk. Replays re-simulate from the recorded commands.
  • First and third person, a spectator view, a lobby, and ranked accounts.

Open source boundary

The arena is built to be released under Apache-2.0, for other teams. The team's competition software stays private. A test fails the build if the public tree imports anything from the private side, and private values stay in one adapter folder.

Public: arena
Generic, and safe to share.
rulesrefereeinspectionarena_genworldreference_robots
Private: sim_plant
Our real robots, on Level M.
Robot configurationFirmware libraryReal gimbal numbersAuto-aim
Figure 5. The public arena has no knowledge of our robots. The private adapter is how our robots enter a match.

Current status

  • Working: 1v1 and 3v3 2026-27, and 3v3 2025-26, on the arena code, with real firmware on the plant for each robot. A full match with the team's auto-aim on both sides runs with zero plant faults.
  • In progress: a simulated LiDAR sensor and localization, for the Sentry.
  • Open: the Site Manual and Communication Protocol for Season 2 are not out yet, so the parts that depend on them are marked to be done.
  • Stretch goals: the Drone Challenge and Dart Challenge need flight models.

The S2 Arena repo is not public yet. This page will link to it after the release.