Add a backend
- Create
src/backend/<name>/withbackend.cppandCMakeLists.txt. Keep SDK includes, compile flags and linking inside this directory. - Implement
RobotBackend:start,read_state,submit,stop. Map joints by name between the robot config and the SDK's motor order. - Register a factory with
BackendRegistry::addand add a build option if the backend needs an external SDK. - For hardware, add a
hardwaresection withdriver: <name>to the robot config;--backend realuses it. Simulation backends getconfigs/backends/<name>.yamlwithtype: <name>.
Hardware backends should reuse the shared inline hardware scheduler, which runs the high-rate command writer and the command/state watchdog.
Do not expose key events, pause or reset through the backend: the policy loop must not depend on which backend it runs on.