A MuJoCo simulation (Franka Panda + a conveyor belt) wired to WARP shared-memory
topics through the zero_schema Python bindings.
| Direction | Topic | Type | Meaning |
|---|---|---|---|
| publish | robot/joint_states |
JointStateArray |
7 arm joints: position / velocity / accel |
| subscribe | robot/joint_commands |
JointStateArray |
position targets → actuators |
| publish | camera/image |
Image |
downward belt camera, RGB |
| subscribe | belt/cmd_vel |
Twist |
linear.x = belt speed (m/s) |
The belt carries a few red boxes (kinematic mocap bodies) under the camera; the
speed is settable live on belt/cmd_vel.
Needs the sibling ../warp and ../zero-schema checkouts. pixi install builds
the editable zero-schema extension against this env's Python (3.12, so PyO3
0.23 builds).
pixi installpixi run warpd # terminal 1 — the WARP daemon (start first)
pixi run sim # terminal 2 — sim + interactive viewer
# or, no GUI:
pixi run sim-headless
# drive it (terminal 3):
pixi run python sim/set_belt.py 0.3
pixi run python sim/send_command.py 0.0 -0.6 0.0 -2.0 0.0 1.6 0.8
pixi run python sim/view_camera.py # confirms frames + counts red pixels- macOS viewer: the interactive viewer must run under
mjpython(thesimtask already does). Headless (--headless) runs under plainpython. - Linux headless rendering: set
MUJOCO_GL=egl(orosmesa) so the offscreen camera renderer can get a GL context. ImageSHM size:Image.datahas theFHDcapacity (~6.2 MB) regardless of the rendered resolution, so each shared-memory slot is ~6.2 MB. That's fine on macOS, but if creating thecamera/imagetopic ever fails for memory reasons, shrink theFHDtier in../zero-schema/schemas/sizes.warp(thenpixi run genover there) or add a smaller image type.- The sim must be started after
warpd;Node.connectblocks with back-off and errors out if the daemon isn't reachable.
src/main.rs is the original Rust (mujoco-rs) sim and is unchanged
(pixi run run / pixi run build). The Python sim above is the current path.