pkg-config answers whether mediad will build. Whether it will stream is a
different question, and on macOS the answer can be no while the build is perfect:
Homebrew's gstreamer symlinks libgstnice.dylib into a separate libnice-gstreamer
formula that is not one of its dependencies, so the link dangles and webrtcbin has
no ICE agent.
What that looks like is everything working. The pipeline comes up, the camera
feeds it, the duck registers with the rendezvous and the console page loads — and
then the first browser to ask for video dies at request_webrtcbin_pad with
"libnice elements are not available", from inside a GStreamer thread.
So the preflight now asks gst-inspect for nice, webrtcsink and x264enc, where the
answer can still name the formula to install.
Assisted-by: Claude:claude-opus-5
Remote access was the one thing the twin could not exercise. A simulated duck had
no identity to register with and no account to register as, so the rendezvous
listing, the control lane over WebRTC and the video were reachable from a board
and nowhere else.
**One fact, declared once.** `configd --simulated <serial>` is the only place it
is stated; `system.info` carries it, `mediad` learns it there — it already asks
that question for the name — and puts `simulated: true` in the `meta` it
registers with. `robotctl system info` prints it, and the Space's listing shows
it. `--sim-camera` sets it too, as a backstop for a `configd` that answers late;
the two cannot disagree, because there is no arrangement in which the frames come
from a simulator and the robot is real.
**The flag takes a serial because identity is the harder half.** A laptop has no
SoC serial, `/etc/machine-id` is one value per machine so four ducks in a scene
would evict each other from the listing one at a time, and macOS has no such file
at all. `sim-duck-a` is stable per duck, derives the robot's name the way a real
serial does — the duck comes up as `duck-eb55`, not as the laptop's hostname —
and is what `hardware_id` has to be. One flag rather than a `--simulated` beside
a `--serial`, because a real robot handed a serial override is a robot lying
about which one it is.
**The account is the robot's own flow.** `duck-sim` runs `configd` and `updaterd`
beside the others, so `scripts/duck-sim ctl account login` is RFC 8628 against
Hugging Face — a code, typed on a phone — and `mediad` picks the token up without
a restart. `updaterd --token` is what lets the credential live outside /etc;
`account_at` is the same `hf-robot-account` store at another path, still talking
to the real Hugging Face, because a simulated duck's account is a real account.
Two smaller things fall out. The renderer's rate and the rung `mediad` is told
have to be the same number, so `--camera-fps 30` goes with `--cameras`: left
alone, every simulated duck with an eye logged "capture is below its target rate"
forever, on the one line that would matter if the simulator really were falling
behind. And `fake_duck.py` sets the same key rather than being deleted — it needs
a token and `uv run` where the simulator needs MuJoCo, a cargo build and a
GStreamer, and it exercises the Space rather than the robot.
Verified against MuJoCo on macOS: `scripts/duck-sim` brings up configd, updaterd,
tofd and robotd, the duck stands at 49.9 Hz, `ctl system info` reports
`sim-duck-a` / `duck-eb55` / `body MuJoCo`, and `ctl account status` answers as a
robot does. With develop's body server rendering, `mediad` takes frames from the
real camera at 31.2 fps against a target of 30 and registers as a producer whose
meta carries name, serial and `simulated`. Clippy clean under -D warnings, aarch64
cross build clean. Not run: the container form, which is Linux-only.
Assisted-by: Claude:claude-opus-5
robotd: stamp robot.state.t_ns at the sensor read, not at publish. controller.step() (an ONNX
forward pass) sat between the two, so every timestamp lagged the joint angles it labels by one
inference -- the exact bias the shared clock exists to remove. Captured next to safety.read() and
carried down; it rides the coast, so a coasted tick republishes the sample's real read time.
tofd: untangle a merge artifact that attached the --sim doc to --imu-hz (and swallowed --sim's own
doc, plus a stray "maploc"); name head_imu.stream, not imu.stream, in the tofd and updater error
messages and the ImuStatus doc; reopen the BMI088 on an accelerometer read failure instead of
publishing (0,0,0), which reads as free-fall and never recovers -- same as the gyro path.
mediad: --sim-camera and Source::Sim doc no longer cite --width/--height/--fps, which mediad does
not have (geometry is [media] quality); fix the stray run of spaces in the frame-size error; reset
"complained" on a clean reconnect in the sim-camera reader, so a disconnect after successful
streaming is not silent for the life of the process.
Camera intrinsics keep the "measured on THIS robot" signal Pierre flagged: media.video's
intrinsics gain a "source" of robot|family|nominal. The alpha family calibration is no longer the
robotd-params serde default (which mediad could not tell from an operator writing the same numbers)
-- it is mediad's fallback, gated on a known sensor mode and tagged source:family, so calibrated
stays true for a real solve while source says whose. duckslam reads "source".
Docs: the by-hand mediad example used the same non-existent flags.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DwL3kbvjNRCvzNETDYoXow
docs/robot/simulation.md is the user's page — what --sim is, what it is good for and cannot tell
you, the one-duck and container forms of scripts/duck-sim, scenes and cameras, every knob, and the
traps (real time, no hot-join, --sim vs --fake). design/simulation.md stays the design, and its
status paragraph no longer says the containers, ether and camera are unbuilt. Both pages are now
in docs/README.md, which had listed neither.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>