| name | add-servo-profile |
| description | Add a new servo spec or mass profile to params.py, then regenerate the model and verify. Use when asked to add/support a new servo (e.g. a new Feetech/Dynamixel model) or a new mass profile to the Stack-chan simulator. |
Add a servo or mass profile
All physical parameters live in src/stackchan_sim/params.py (the single source
of truth). Add the new entry there, keep facts vs estimates separated and cite the
source, then regenerate and verify.
Add a servo
- In
params.py, find the SERVOS dict (values are ServoSpec). Add a key with:
name, stall_torque_Nm, no_load_speed_rad_s, mass_kg, note. Convert
catalog units explicitly (e.g. kgf·cm via the existing KGFCM_TO_NM,
sec/60° → rad/s) and cite the datasheet/source in a comment. Keep facts
(datasheet specs) separate from estimates.
- Do NOT change
DEFAULT_SERVO unless asked.
Add a mass profile
- Find the
MASS_PROFILES dict (values describe base/pan/head split + total).
Add a key following the existing pattern; document whether numbers are facts
(official total) or estimates (per-link split), per the report.
Regenerate & verify (always)
- Regenerate the committed MJCF snapshot if the default profile/servo geometry
could change: run the
/regenerate-model skill and review git diff of
models/stackchan/stackchan.xml.
- Run tests:
uv run pytest -q (see tests/test_params.py).
- Audit traceability with the params-auditor subagent (it checks every value
traces to the report and that facts/estimates stay separated).
- The new key automatically appears in the dashboard selectors (served from
/api/model); optionally confirm with /verify-dashboard.
Notes
- Servo limits are enforced in the model: stall torque via actuator
forcerange,
no-load speed via ServoController rate-limiting — so the new specs take effect
without extra wiring.
- Keep new physical numbers traceable to a primary source; do not guess.