CRANE-X7 hardware bring-up (M5 checklist)¶
Every app below was verified against the emulator first (dxl_emu).
Run the steps in order; do not skip ahead.
Safety: read first¶
deactivate()is not an emergency stop. Keep the arm's power switch (actuator supply cutoff) within reach for every powered step. If anything looks wrong: cut power. The arm will fall limp; keep the workspace under it clear.- Two watchdog layers run during every powered app: the servo-side Bus Watchdog (100 ms: halts the servos if the host dies or the cable drops) and the host-side deadman (250 ms: silences the bus if command writes stall or feedback reads fail persistently, which forces the servo watchdogs to fire). These protect against communication loss, not against wrong commands: stay clear of the arm's envelope while it is torqued.
- Every powered bring-up app records position-command write failures. A dropped command is reported and makes the run exit nonzero even if communication recovers before the host deadman expires.
- First motion is the wrist (canonical joint 6, DXL id 8) only, small and slow, before any multi-joint motion.
One-time host setup¶
USB latency (needed for stable 100 Hz+ cycles on FTDI adapters):
# /etc/udev/rules.d/99-crane-x7.rules
SUBSYSTEM=="usb-serial", DRIVER=="ftdi_sio", ATTR{latency_timer}="1"
sudo udevadm control --reload-rules && sudo udevadm trigger
cat /sys/bus/usb-serial/devices/ttyUSB0/latency_timer # expect: 1
Serial-port permission: sudo usermod -aG dialout $USER (then log out
and back in; this must be done even if the port initially works: a
desktop session grants a temporary device ACL that does NOT survive
unplugging and replugging the adapter, which the watchdog drill does).
Steps¶
Power on the arm, connect USB, then:
-
Scan (no torque, safe):
./build/apps/dxl_inspect --port /dev/ttyUSB0 scanExpect ids 2–9; id 3 reports model 1120 (XM540-W270), the rest 1020. Then dump each servo's registers by its bus id,./build/apps/dxl_inspect --port /dev/ttyUSB0 dump <id>for ids 2–9 (id 2 = shoulder pan … id 8 = wrist rotate, id 9 = gripper), and checkfirmware_version >= 38on every one (Bus Watchdog support: activation refuses older firmware). Record a machine-readable baseline before changing parameters:./build/apps/dxl_inspect --port /dev/ttyUSB0 dump-params x7-baseline.toml. The output contains raw servo units and should be kept with the hardware service record, not committed as a universal robot configuration. -
Read streaming (no torque, safe):
./build/apps/x7_read 20Move joints by hand; positions must track smoothly, voltage ~12 V, temperatures sane. This validates the sync-read path and the canonical joint order against the physical arm. -
ON/OFF (first torque: hands clear, power switch in reach):
./build/apps/x7_onoff 3Expect: zero motion on activation, then an immediate sag or drop on deactivation (direct torque-off; gains are not changed). Support the arm from below before release. If anything jumps: cut power and stop here. -
Parameter modification (torque off):
./build/apps/x7_set_param --p-gain 640then restore--p-gain 800. Before changing anything, the tool verifies that every servo reports torque off; a failed torque-state read or any enabled servo refuses the entire change. The before/after parameter reads are mandatory, and success requires every requested value to read back exactly on every servo. Stop on any nonzero exit or readback mismatch. For a reviewed multi-parameter change, edit a copy of the baseline so that each[motor.parameters]table contains only the intended keys, then use./build/apps/dxl_load_params --port /dev/ttyUSB0 <file>. The batch loader applies the same torque-off and exact-readback gates across all selected motors before writing anything. Communication and startup-configuration fields are audit-only and cannot be changed by this loader. -
Watchdog drill (recommended once, before any motion): run
./build/apps/x7_onoff 30, then pull the USB cable mid-hold. Expected (verified on hardware): the arm freezes in place with torque still on: the servo Bus Watchdog halts motion and locks out goal commands (register 98 reads 255). It does NOT go limp; freezing is the firmware's designed comm-loss response and the safer one for a vertical arm. To release afterwards: reconnect USB (wait ~10 s for the adapter to re-enumerate), then run./build/apps/x7_onoff 2(activation clears the tripped watchdogs and hands the arm back gently), or simply power-cycle the servos. -
First motion, wrist only, small and slow:
./build/apps/x7_move_simple 6 0.3~0.3 rad out and back at ≤0.5 rad/s. Near a soft limit, the endpoint is clamped before trajectory generation and a warning reports the adjusted displacement.completemeans the arm also settled for 0.3 s after the return and every measured joint is within 0.05 rad of its starting posture. TreatABORTED, a verification failure, or a nonzero exit as a failed step. Then, if clean, try another single joint. Multi-joint motion belongs to M6.
After bring-up (M6–M8)¶
The controller phases build on this checklist in order:
examples/x7_wave (multi-joint position mode), apps/x7_float
(gravity compensation: the arm floats and is hand-guidable), and the renewed
apps/x7_track trajectory replay. Rehearse the exact configuration with
apps/x7_track_sim, inspect the motion and CSV, then run x7_track --check
before any hardware session. The app homes in position mode and switches while
stationary to current mode with a staged gravity preload. Its tracking law is
deliberately the plain computed-torque equation and omits every practical term
described in the
computed-torque theory notes.
Feature coverage is mapped in parity.md.
Hardware loops run at 100 Hz, the only validated rate. Measuring and
qualifying higher rates follows control-rate qualification,
starting with the torque-off x7_bus_timing probe.
x7_follow_sim and x7_follow are the servo-side trajectory-following route.
They do not unpark x7_track: feedback remains inside the Dynamixel servo.
Before the first hardware trial, generate and inspect the complete simulation
motion and CSV, run x7_follow --check, and review the
tracking safety contract.
Start in position mode at 100 Hz with a short, slow reference. The frontend
ran on the physical arm on 2026-08-27 in both modes: the position versus
current-based-position comparison, then the current-based-position gain sweep
whose selected tuning repeated three times at RMS ≈ 0.018 rad with clean cycle
statistics (see the
gain decision).
That tuning is provisional and specific to the pick-approach reference; treat
every new reference, mode, or gain set as a fresh trial with the actuator power
cutoff in reach. Its final hold ends only after the operator supports the arm
from below and presses Enter, or after the configured timeout.
x7_teach records a hand-guided reference in either torque-off or
gravity-compensation mode. Start with torque-off mode after step 2 above. Its
gravity mode reuses the accepted x7_float calibration gate, held-position
activation, gravity preload, control timing, and verified shutdown. Both
teaching modes completed on the physical arm 2026-08-28, and the resulting
workflow was exercised through dynamics simulation and servo-side playback.
For every new taught path, rehearse with dxl_emu, run --check, inspect the
trajectory, complete both dynamics simulations, and keep the power cutoff in
reach during hardware use. Recording stop does not disable torque; a distinct
final Enter confirms that the arm is supported before shutdown. See the
manual teaching safety contract.
The former hardened
x7_trackimplementation was PARKED. The renewed textbook app is a new, hardware-unvalidated experiment, not an un-parking of that controller.x7_floatis UN-PARKED (2026-07-31) under the conditions in its bullet below. Two independent incidents:
- Former hardened
x7_track(2026-07-28): a scale-0.5 session never left the settle phase: from a compact resting posture the pan (canonical joint 0) anti-damped at 4.33 Hz, growing ~50 → ~350 mrad peak-to-peak within a second of torque-on; operator power cut. The failure precedes the scale argument (no scale is safe) and no code or configuration change preceded it. Parked until a reviewer-approved settle-phase fix lands.x7_float(2026-07-29 incident; UN-PARKED 2026-07-31): a float session accelerated the UNTOUCHED arm toward the upright posture (peak ~2.37 rad/s, joints riding their upper limits): gravity over-compensation, whose LEADING EXPLANATION is the torque-to-current calibration commanding 23–49 % more current per model-torque than the vendor's empirically tuned constants (not isolated as the sole cause: the passing remediation combined the calibrated scales with the held-position/preloaded startup). The COMBINED remediation PASSED its objective acceptance (M-GC3); the subjective back-drive criterion FAILED and the owner explicitly WAIVED it (a risk/quality acceptance, not a test pass) covering two characterized behaviors: the j1 notch (energized actuator-side behavior, strongly associated with crossing the low-current transition region q1 ≈ +0.27…+0.53 rad; mechanism not isolated) and a small j4 positive tendency under hand-guiding (command ≤ 0.055 Nm). CONDITIONS:x7_floatrefuses to touch the bus without the approved vendor calibration (config/crane_x7_vendor_scale.toml; default-scale adoption was declined, so the repo default config remains the known-failed all-1.0 configuration);--logis REQUIRED and created exclusively (an existing file is refused, never overwritten), so the unique-filename-per-attempt rule is ENFORCED before bus contact. Post-closure timing disposition (2026-08-04, owner-requested and accepted in review): the current acceptance protocol uses the default 10 s marker-anchored window. Demonstrations may select a non-default 5–50 s window with--evaluation-time <seconds>; those logs self-labelrun_mode: demonstrationand the acceptance validator rejects them. The outer deadline must be at least marker deadline (8 s) + evaluation time- margin (2 s). For example, a 20 s window uses:
./build/apps/x7_float \ --config config/crane_x7_vendor_scale.toml \ --log float_demo.csv --evaluation-time 20 30The archived M-GC3 evidence used its original 5 s protocol. Keep the power cutoff within reach. Full record: history.md. -
x7_identwas REMOVED (2026-08-18): its pass-2 identification campaign closed with a null result (2026-07-28, see history.md), and the parked hardware app was deleted in the project cleanup. The sim twin (x7_ident_sim), the analysis pipeline (tools/ident_analysis.py), and the null datasets underdata/are retained; any reopening restarts from external review per the closure's conditions.Telemetry of both incidents is ARCHIVED with manifest rows:
track9.csv/track9.csv.settleandfloat1.csv, sectionincidents-2026-07/in data-archive.md.x7_wave,x7_move_simple,x7_pose,x7_read, andx7_onoffremain usable in their default position or no-torque modes; those defaults do not touch the current-command path. The opt-inx7_pose --mode current-based-positionpath is outside this recovery ladder. The post-incident recovery ladder is steps 1–6 above.
Troubleshooting¶
no response from id N: check baud (3 Mbps), cabling, power.firmware vNN lacks Bus Watchdog: update servo firmware with the ROBOTIS tools before proceeding; activation intentionally refuses.DEADMAN: command stream stale: the host silenced the bus and the servos halted themselves. The message is printed for every escalation, so it does not name the cause by itself. Causes: the host command loop stalled (investigate latency_timer, CPU load), the feedback reads died (e.g. servo power was cut mid-run), or the command writes kept failing.x7_followandx7_trackprint theread failuresandwrite failurescounts on theirhardware faults:line; the other apps do not print them yet. Run logs are written by a separate thread, so a slow disk no longer stalls the loop. Before 2026-10-16 a log write that blocked for 250 ms or more caused this abort, and one that blocked for 25 ms or more endedx7_floatandx7_gravity_demoruns with a bareABORTEDandx7_teachrecordings with statusfeedback_gap(torque off) orcontrol_failure(gravity compensation).LOG INCOMPLETE: writing <log> failed(x7_float,x7_gravity_demo),log: writing <log> failed; the log is incomplete(x7_follow,x7_track), orcannot finish teach log(x7_teach): the filesystem refused a queued log write (for example, a full disk), or it stalled for about 30 s and the queue filled. The attempt is void.x7_followandx7_trackabort the run once the failure is detected; the other apps finish the session first, so that a released arm is not de-torqued, and exit 1 afterwards.- A nonzero
deadline missescount (x7_follow,x7_track) means controller computation or host scheduling did not leave the configured end-of-cycle write margin. Stop the run and inspect CPU load, USB latency, maximum cycle time, and maximum lateness; thehost-measured phases:lines show where the cycle's time went, and--timing-logkeeps every cycle's host stamps for analysis. The scheduler skips missed period boundaries; it never sends catch-up bursts. - Offline rehearsal of every step:
./build/apps/dxl_emu --link /tmp/ttyDXL &then add--port /tmp/ttyDXLto any app.