# Export, verify and package a robot application The deterministic path starts with a normalized model and an explicit controller contract. The agent skills choose the route and extract metadata; CLI commands perform transformations, numerical checks and publication. Read [BUNDLE.md](BUNDLE.md) when implementing a consumer and [the main tutorial](../docs/TUTORIAL.md) for asset onboarding. ## Native MuJoCo application ```bash python scripts/onboard.py inspect assets/my_robot python scripts/onboard.py build-mjcf assets/my_robot --output out/my_robot/model.xml python scripts/onboard.py setup-tier2 --model out/my_robot/model.xml \ --config assets/my_robot/controller.json --output out/my_robot/control python scripts/onboard.py verify --model out/my_robot/control/robot.xml \ --config out/my_robot/verify-input.json --report out/my_robot/verification.json python scripts/deploy.py --robot my_robot --model out/my_robot/control/robot.xml \ --control out/my_robot/control/controller.json --controls out/my_robot/control/controls.yaml \ --verification out/my_robot/verification.json --bundle out/apps python scripts/play.py --app out/apps/my_robot.app --headless --steps 100 python scripts/deploy.py --check-reference out/apps/my_robot.app ``` Configuration examples for IK, joint sliders, trajectories, wheel mixing, CPG and policy adapters are in [CONTROLLER_SETUP.md](../docs/CONTROLLER_SETUP.md). Verification requires explicit expected physical responses. A generated configuration or an ONNX graph that compiles is not evidence that the robot tracks a command. Geometry-only assets can publish `model_viewer` apps by omitting `--control` and `--verification`. They carry no physical/control acceptance claim. A controlled application is refused unless its verification matches model dependencies, controller parameters, controls, policy and trajectory bytes. An ONNX application additionally supplies `--policy ` and its verified controller JSON. The native application contains the normalized model, meshes, contracts, references and portable Python runtime. It needs host Python and the listed third-party packages. Mode support is explicitly versioned; do not pass a native hybrid-action contract to a legacy board reader. Include each imported asset's license and attribution with repeatable `--license PATH` arguments. The application preserves these files and their hashes; the platform license does not replace third-party terms. ## Training export ```bash python scripts/export.py --task my_robot --checkpoint logs/my_robot/my_robot/run/model_N.pt ``` The exporter validates measurable observations and numerical parity with the checkpoint. Preserve the emitted joint orders, action transforms, gains, rates, command ranges and provenance. Use the source revision and robot spec that the checkpoint was trained with. Reconfiguring the environment after training is not an adaptation of the old policy. ## Legacy board and web builds The Rust FSM remains the common controller for its supported legacy policy contracts. `manifests.json` contains no default robot. Add explicit export paths, mode switches and a cascade configuration for your machine, or use: ```bash python scripts/deploy.py --mode walk= --bundle out/legacy ``` A complete legacy build converts ONNX to RKNN, cross-builds the board controller and Python extensions, builds WebAssembly, checks contracts on each included host, writes a reference and packs one app. It requires the documented toolchains. `--allow-incomplete` omits unavailable board components and records omissions; this flag is for development hosts, not a board-ready release. - [ONNX to RKNN](convert/README.md) - [Rust controller and runtime builds](fsm/README.md) - [DDS wire interface](dds/README.md) Do not infer a board address or mechanical compatibility. Use the deploy skill's read-only board preflight with an explicit host before deployment. First open the app with `--dry-run`, then run `--check-reference`; these checks do not drive a bus. Actual hardware operation requires the target machine configuration and the operator's explicit instruction. ## Operator manuals Every build includes `manual.en.json`. Apply the bundle-manual skill after each build to create the Chinese translation. Add it through the checked path: ```bash python scripts/deploy.py --translate out/apps/my_robot --language zh --manual /tmp/manual.zh.json ``` Identifiers must remain unchanged. The command updates hashes and repacks the app.