A Digital Twin of a Robotic Storage
A partner's robotic storage cabinet runs its own open-source control software, unmodified, on motors, sensors and buses we simulate in time with the real machine, so we can build and test against it without the cabinet.
- Approach
- THEIR SOFTWARE UNMODIFIED · OUR HARDWARE SIMULATED
- Stack
- PYTHON · PYMODBUS · FASTAPI · DOCKER · THREE.JS
- Services
- SIMULATION · INTEGRATION · TEST RIGS
- Status
- RUNNING IN DEVELOPMENT AND CI
Three Layers, One API
Nothing in the partner's code knows it is not on a cabinet. We replaced what sits under it, and the layer above talks to the twin as it talks to the machine.
- 01
Their Software Sees Ordinary Buses
The control software takes its Modbus ports and scanner from config. Pointed at socket addresses, it speaks Modbus RTU to our simulator as it would over RS-485. The only addition is a remote GPIO backend, kept on a fork branch to offer upstream.
- 02
Hardware That Answers Like Hardware
Each emulated drive runs a trapezoidal profile from the speed and ramp registers the software writes, and every reply waits for its frame time at the configured baud. A move into a divider stalls, and a grip short of the sleeve catches nothing.
- 03
One API for Real and Virtual
CCA Labs reaches a real cabinet through the maker's cloud API. For a twin it points at our emulator of that API, so the same connector code serves both. In a development build, a retrieve from CCA Labs brought the item to the twin's hatch in 18 s.
Real Behaviour, Real Errors
The twin is judged by what the partner's unmodified software does on it: the same commands, the same refusals and the same recoveries.
A GPIO Backend
Their GPIO layer only had an in-process fake, so we added a backend that reads and writes pins over TCP. If the link drops, reads fail and their e-stop and door monitors fail safe. Every other file runs as published.
Their Own Errors Back
A lost grip, a drive alarm, a stall, a dropped bus, a broken light curtain, an open door and the e-stop. Each one makes their software raise its own error and ask for its own recovery, as the machine would.
A Fleet in Containers
Ten twins ran at once on one workstation, each about 180 MB, and all passed the check suite.