HUXMechanical project
WorkshopDocumentsSoftwareV0-GENESIS · archive

PARKED STAIR-V1 — 2026-09-28. Preserved planning history. V1-PROOF now governs active work.

Software#

Status: architecture decided 2026-09-26 (decisions.md); no code on main yet. No RL, no inference model.

Prefer checklists and milestone order over a fake finished stack. Electronics that enable the modes: electronics-minimum.md. Review that produced this shape: research/compute-stack-review.md.

Mechanical interface correction — 2026-09-28#

The eight-axis sandbox is a legacy experiment, not the current stair design. Head and leg review governs the redesign. The architecture may have ten powered axes plus a passive pitch-level carrier; neither is implemented in firmware. No controller may treat a short hop as the single-support gate.

Required interface fields: geometry_revision, explicit SI units; X forward / Y left / Z up; hip-center datum; real joint origins/axes, yoke and axle offsets; joint limits and calibrated zero/sign; per-link mass/COM/full inertia; effective contact geometry and contact/load state; installed torque/speed/thermal limits; IMU-to-frame transform. Legacy drawing axes map (x, y_up, z_right) to (X=x, Y=-z_right, Z=y_up), converting inches to metres.

Candidate bus schedule: wheel nodes at 1 kHz on A; four hip/ankle-roll nodes at 400 Hz on B; four hip-pitch/knee nodes at 400 Hz on C. Run estimator/mode control at 1 kHz with timestamps, interpolation/prediction and stale-data rejection. Arbitration, watchdog and bounded command latency must be measured; a node-count array hard-coded to eight is not acceptable for the candidate.

Whole-robot COM must be summed from articulated masses. Recalibrate after moving the battery, changing a companion or adding a bracket. Ankle roll must correspond to the real carrier transform; counter-rotating a motor about a pitched shin axis does not keep the wheel upright without yaw. Enforce friction/COP limits and a controlled return to two contacts. No instantaneous pose/height changes may be hidden by the simulator.

Legacy numerical results are research evidence only. The full-step acceptance test requires a continuous collision-free trajectory, measured support margin, actual torque-speed/thermal duty and physical controlled support/return before R37 trials. A motor-off event is a fall risk until a physical support/catch exists.

Four layers (decided 2026-09-26)#

The pattern Diablo, Mini-Cheetah, Unitree and Stompy converge on. Hux adopts the shape, not anyone's code.

LayerWhat runs thereRateHux choice
1. ActuatorsFOC current loop and joint PD on the actuator. Takes torque / position / velocity setpoints over CAN.Vendor-dependent FOC; 400–1000 Hz setpointsCAN QDD / FOC actuators on 8S. Wheels, hip roll, knee, hip swing. SKUs TBD (electronics.md).
2. Control coreEstimator (IMU + wheel odometry), mode machine, balance controller, one-leg loop, safety limits. Plain C++ library, no hardware calls, unit-tested.—firmware/hux_control/ (name TBD). The same source links into layer 3, layer 4 and the digital twin.
3. Real-time MCURuns layer 2 at 1 kHz: reads the IMU, parses CRSF, is CAN master, holds the mode, enforces the hardware watchdog and torque cut, logs blackbox.1 kHzMCU with CAN — Teensy 4.1-class or H743-WING-class, picked with the actuators. Not the F765-Wing (no CAN; P0–P1 bench only).
4. Linux companionROS 2. Teleop, telemetry, live parameters, MCAP logging, cameras, face, later perception and the trained policy. Talks to layer 3 over a framed binary serial / USB link.50–500 HzPi 5 class initially; one camera. Jetson at P5 only if workloads justify it. Portable application containers plus platform-specific camera/acceleration adapters.

Rules that fall out of this:

  • The actuator bus picks the MCU. CAN is decided; the exact MCU follows the actuator choice (how many buses, FD or classic, which CAN protocol the actuators speak).
  • Layer 2 never includes a HAL call. If it needs the time, it takes a timestamp argument. If it needs an IMU sample, it takes a struct. That is what makes it run unchanged on the MCU, on the Pi, on a Jetson and inside the twin — the carry-forward Steve asked for.
  • Layer 3 is thin. Drivers, timing, CAN framing, safety. It does not own gains or logic; those are layer 2 and are set as parameters from layer 4.
  • Layer 4 is not real-time and never in the torque path. A hung companion must trigger the measured local abort/stop behavior; PARKED is entered only after a physical rest support is verified. Continued balance cannot be guaranteed through power loss or mechanical failure.
  • ROS 2 on the companion only. The MCU speaks a small framed protocol (micro-ROS is optional later). The reason for ROS 2 is what plugs into it: Isaac ROS on a Jetson, MuJoCo / Isaac bridges for the twin, rosbag / MCAP, Foxglove, PlotJuggler.
  • Containers on the companion from day one. Keep portable arm64 application code, with platform adapters for camera drivers and acceleration. Containerization does not eliminate host-kernel, camera or JetPack compatibility checks. Avoid coupling the control core to Pi GPIO or camera-specific libraries.
  • Licensing: Hux is MIT. Layer 2 is clean-room from understanding (R18 pointers below). ROS 2 is Apache-2.0, SimpleFOC MIT, CAN actuator SDKs vary — cite each.

Historical F765-Wing and Pi 5 bench plan#

The 2026-09-25 bench plan (F765-Wing bare metal + Pi 5 listener, ../tools/living-drawings/software.html) is bench learning, P0–P1: blink, bind the Nano, learn CRSF, spin one SimpleFOC wheel over UART. Nothing written for it is expected to survive except what lands in layer 2. Neither board is confirmed reserved inventory. Pi 5 remains the initial companion class; application portability still needs camera/driver compatibility checks.

Manual control modes#

Steve, 2026-09-20. Four manual states, selected by a human, before any automated motion (R14).

Automation (open-loop step scripts, pathfinding, later stair gait) waits until a pilot can enter, hold, and leave each mode from RC. Do not write fake firmware here. Channel map is TBD with the MCU; the stack is the four layers above.

States#

ModeEnum (intent)What it isWheels / legsElectronics phase
ParkedPARKEDSupported idle, entered only after a verified rest support takes the load. Lost link first requests zero motion while retaining balance.Neither wheel driven by the balance loopP2 (MCU + RX from P0)
2-wheel balanceTWO_WHEELBoth wheels active for bipedal balance / teleop. Baseline stance.Left + right planted and drivenP2
Left wheel onlyLEFT_ONLYBalance / drive on the left planted wheel. Right leg free for a step cycle.Left planted; right freeP4 (after hip-roll class)
Right wheel onlyRIGHT_ONLYMirror of left.Right planted; left freeP4

LEFT_ONLY and RIGHT_ONLY are the one-leg-balance gates (R2 / R14). They are not an automatic step. Mode change does not lift, plant, or path-follow.

State machine (intent)#

                         rest support verified / explicit supported Parked
                    ┌──────────────────────────────────────────┐
                    │                                          │
                    ▼                                          │
              ┌──────────┐                                     │
              │  PARKED  │  safe idle; no balance-loop drive   │
              └────┬─────┘                                     │
                   │ RC → 2-wheel                              │
                   ▼                                           │
           ┌───────────────┐                                   │
           │  TWO_WHEEL    │  both wheels; teleop baseline     │
           └──┬─────────┬──┘                                   │
              │         │                                      │
     RC left-only    RC right-only                             │
              │         │                                      │
              ▼         ▼                                      │
     ┌────────────┐  ┌─────────────┐                           │
     │ LEFT_ONLY  │  │ RIGHT_ONLY  │                           │
     │ right free │  │ left free   │                           │
     └─────┬──────┘  └──────┬──────┘                           │
           │                │                                  │
           └──► TWO_WHEEL ◄─┘   (RC back to 2-wheel)           │
                    │                                          │
                    └──────────────────────────────────────────┘

Rules (intent, not firmware):

  • Controlled stop precedes parking. Lost TBS link or a Parked request commands zero translation/yaw while retaining balance. Enter unpowered PARKED only after verifying a mechanically supported rest pose. The sandbox refuses parking when its proposed skid is absent. Disarm/emergency torque cut is a separate action that can cause a fall; it is not a balanced idle. The hardware support and lost-link watchdog remain to be implemented.
  • Enter 2-wheel from Parked when the pilot arms / selects the stance mode.
  • Enter left-only or right-only from 2-wheel (not by jumping Parked → one-wheel on the bench until 2-wheel is proven).
  • Return to 2-wheel before flipping left ↔ right. Do not cross-switch through a one-wheel mode.
  • The machine does not lift, plant, or path-follow because a mode changed. Mode select only enables which wheels the balance / teleop loop may drive.
  • No autonomy process is allowed to command wheel or leg motion until these four modes work from RC.

Mode select and telemetry#

  • Switching: RC on the TBS Nano RX, likely an aux switch / flight-modes style channel. Exact aux channel and CRSF ranges are TBD with the MCU — do not invent a mixer here.
  • Telemetry: Wi‑Fi telem (Pi first; ESP32 only as a thin bridge) reports the active mode as a name + the enum above. USB / serial is enough for P2; Wi‑Fi can wait until P5.
  • Stick (pitch / roll / yaw / throttle semantics) still maps to tilt / speed / yaw inside the selected mode. Stick does not replace the mode switch.

Bring-up order for these modes: checklists/software-bringup.md.

One-leg balance (intent)#

Steve 2026-09-20 / confirmed. One-leg balance is a full control loop, not a hip pose and not a wheel-only trick (R17).

Hip roll remains in the research baseline (R16), with active ankle roll and finite-width contact under investigation. Controlled support and return are required before committing to the stair actuator set; merely shipping a joint and mode name does not meet that gate.

Coupled jobs (R17)#

On one wheeled leg, lateral and fore-aft balance must both remain controlled. The candidate adds finite lateral support, which must stay loaded:

  1. Hip roll → CoG over the planted wheel. Lean the body so the CoG projection sits on the planted contact. Without this (or an equivalent lateral shift), the free side falls. Mechanical DOF: mechanical.md. The roll actuator is dynamic (FOC BLDC / small QDD / fast bus servo) — not a stepper.
  2. Planted wheel → contact under the CoG. Drive that wheel forward / back so the contact patch stays under the CoG in the pitch plane. Same class of problem as a Segway / two-wheel balancer, but on one rim. Serra's teaching loop is a simple P; Hux still studies XRobots PID.
  3. Ankle/contact → lateral support moment. Regulate the real ankle and estimate contact load/COP so both lateral tread contacts remain loaded within friction and camber limits. The proposed pitch-level carrier must exist physically; its transform cannot be invented in the controller.

All three functions are needed for the candidate. Centering the mass alone does not establish a stable, recoverable support state.

Do not write gains, a mixer, or a channel map here. This is the story, not a controller; the controller is layer 2. Do not fake a CoG shift if the roll joint is unplugged — and do not unplug it to wait for V2.

How the modes use the loop#

  • Parked — loops off only after mechanical support is verified; not a catch-all failsafe.
  • TWO_WHEEL — both wheels in the pitch / yaw balance. Hip roll is optional disturbance lean, not the one-leg gate.
  • LEFT_ONLY — measured left-foot support, active lateral ankle/contact moment, hip placement and wheel fore/aft balance. Right foot must be verified unloaded before lift.
  • RIGHT_ONLY — mirror.

Bring-up still goes Parked → 2-wheel → left-only → right-only.

Reuse, do not reinvent (R18)#

Explicit non-goal: writing a novel Hux balance controller from scratch for V1.

Prefer existing excellent control systems / patterns. Cite them as research pointers, not a lock. TBD which we adopt. Study before we copy; licenses still apply (research/README.md).

PointerWhy it is on the listNot a Hux lock
XRobots TallBalancer pos_hold / vel_holdClean MPU6050 → PID → wheel-torque / encoder holdMIT; still Phase C. Not an ODrive buy.
XRobots SonicRobotBrushless + balance electronics; IMU → PID → ODrive torque / velocityGPL-2.0. Study only until Steve says otherwise.
XRobots RobotXWheeled-biped lineage; IMU → wheel when a leg leaves the groundGPL3 README. Do not vendor.
Hattori STRIDE V2Contemporary wheeled-biped stairs / extra DOF / open-loop swing-legBlog lessons, not CAD or a stack.
Build Some Stuff / SerraWheel-under-CoG geometry; in-wheel encoder packagingTeaching P loop. Not the Hux controller. Do not flash their sketch.
Mini-Cheetah-style stacksKnown legged WBC / QP / joint-PD pattern (MIT Cheetah lineage)Research pointer only. Hux is a wheeled biped, not a Mini-Cheetah port.
FC attitude loopsRoll / pitch / yaw PID the on-hand flight controllers already runPattern for the estimator + rate loop; the boards themselves are bench-only.
ODrive / SimpleFOC torque modesCurrent / torque command into a BLDC wheel or jointPattern, not a purchase.

Phase A of research/study-plan.md is where we extract how those loops actually work. Phase C is where Steve picks adapt vs rewrite. Until then: no Hux-original balance firmware, no fake mixer, no invented gains.

Tazer spent a long time on LQR with a bad model; a PID cascade is what actually balanced. That is R18 in someone else's blood. Do not start V1 on LQR. See research/tazer-lessons.md.

Stompy is a week-build RL walker — CAD/reality match, not a Hux V1 stack. Do not require RL walking. Keep this reuse list. See research/stompy-sim2real.md. Diablo and Tazer say the same order: LQR / PID before RL. A later twin / dojo does not replace this section.

If a pointer is copyleft (RobotX, SonicRobot), keep Hux MIT unless Steve decides. Watching and rewriting from understanding is the default.

Motion control (class, not a vendor): wheels and hip roll want high-bandwidth FOC / QDD / model-based loops. That is the plant we want, not a SKU. Knee / hip swing: CAN QDD is the working class on 8S; servo or stepper+belt is the fallback (2026-09-26).

First software, in order#

Tracked in ../NOTES.md. Bring-up list: checklists/software-bringup.md.

  1. Layer 2 skeleton with tests — mode machine, a stub estimator, a stub controller, parameter table, all as a library that builds on the host and runs its tests with no hardware. Before any board is flashed.
  2. Blink + CRSF — bench board (F765 is fine here). Bind the Nano, print sticks and the mode. Electronics P0.
  3. Spin — one restrained CAN actuator (or a SimpleFOC wheel over UART on the F765 if actuators are not here yet). Not on carpet. P1.
  4. First real image on the CAN MCU — layer 2 linked in; IMU at 1 kHz; CAN to both wheels; blackbox to SD; live parameters over the framed link; hardware torque cut + IWDG proven by pulling the plug. Telem says PARKED only after support is verified. P2.
  5. Companion listener — ROS 2 node in a container on the Pi 5: parses the framed stream, publishes state, records MCAP, sets parameters. Listen-only until step 5 holds.
  6. TWO_WHEEL balance teleop — the studied PID cascade (R18) in layer 2, tuned from blackbox + live params, TBS in, telem reports TWO_WHEEL. P2.
  7. Pose joints from the stick — knee + hip swing on CAN, position mode, teleop hold. P3.
  8. LEFT_ONLY, then RIGHT_ONLY — hip roll + planted-wheel fore/aft, best-effort. P4. May not work as hoped; still expose the modes. Gate before stairs.
  9. Open-loop step toward a 9.5" riser fixture. Not before the four modes work. V1 finish line (R37, 2026-09-27): one 9.5" step, 9 of 10 attempts, from a standstill on the lower tread. A flight is V2 on the same hardware.
  10. Camera stream — one teleop stream through the companion. P5.
  11. Perception — stereo depth and nosing detection; this is where the companion becomes a Jetson if the Pi 5 cannot hold the rate. P5.
  12. Twin — layer 2 compiled into the simulator, same parameters, same estimator inputs. Pipeline TBD (decisions.md); the contract comes first.

Phased roadmap#

Steve, 2026-09-22. Three phases. Do not invert them. R14 and R18 stay.

PhaseWhatNot
V1 — classical balance + modesLayer-2 skeleton → blink → spin → PARKED / TWO_WHEEL / LEFT_ONLY / RIGHT_ONLY from TBS on the CAN MCU. Reuse an existing simple balance pattern (R18). CAN QDD / FOC actuators on 8S. Open-loop 9.5" fixture after the four modes work. Done means R37: one step, 9/10. Flat-ground scope: 1.5 m/s top / 1.0 cruise (R38, the TWO_WHEEL speed command clamps there), flat + 1" sills + ~20° slopes (R40).An RL gate. A novel Hux V1 controller. A sim trainer before the robot stands. Firmware that only runs on the F765.
Later — CAD / URDF twin lockstepWhen CAD exists: CAD, exported model, and firmware zeros stay the same robot (Stompy lesson). Geometry edits flow through all three. Lock the contract first (CAD→URDF/USD or MJCF, observation parity, motorcycle-crown tire contact, firmware zeros, stack willingness). Layer 2 is the controller in the twin — no re-implementation. Pipeline (Isaac / MuJoCo / mjlab / other) stays TBD — 2026-09-25.A day-one wheel-balance task. A mjlab / Isaac lock. Standing up a dojo before TWO_WHEEL.
Horizon — sim dojo / RLIdentical digital twin + domain-randomized dojo so a policy trained in sim runs on the companion (a small MLP needs no GPU; the Jetson is for perception). Later terrains: stairs, rubble, dirt, fall leaves, wet mud.A replacement for R18. A V1 blocker. A reason to skip modes. Buying a 4090 or locking Isaac Lab.

V1 may / should stand and balance with classical / reused control before any of the later two. The twin and the dojo are the cool long-term goal, not the next firmware folder.

Repo homes (empty)#

  • ../firmware/ — layer 2 (hux_control, portable library + tests) and layer 3 (per-board firmware that links it). Bench sketches for the F765 live in a clearly named throwaway folder.
  • ../software/ — layer 4: ROS 2 workspace, container definitions, camera and telemetry nodes.

Explicitly not started#

  • Closed-loop stair gait.
  • Stereo / depth for stairs (P5; the Jetson question lives there).
  • Simulation (MuJoCo or otherwise) as a V1 job. The twin / dojo is a horizon, not this folder today. The pipeline is TBD — do not lock Isaac / MuJoCo / mjlab, and do not stand up Isaac Lab or buy a 4090 before TWO_WHEEL. The living-drawings 3D sandbox (../tools/living-drawings/sim.html, research/sim-sandbox.md) is a design toy with a game-grade engine and its own JS LQR — not the twin and not layer 2 (R18). Tires are a shared round-crown profile with a carcass spring since 2026-09-25 (tools/living-drawings/tire.js); the stiffness is a guess until a tire is measured.
  • A requirements-complete autonomy stack.
  • A novel Hux V1 balance controller (R18). Study existing patterns; do not invent one to fill layer 2.
  • micro-ROS on the MCU. Optional later; the framed protocol comes first.
  • Any code that only runs on the F765-Wing.

Control-core requirements from Sheet 1 (2026-09-27)#

  • Speed clamp. The TWO_WHEEL speed command clamps at 1.5 m/s (R38); cruise is 1.0. The locked RS05 on 8S has ~2 N·m of catch torque left at 1.5 m/s on the 6" wheel (1.6 near cutoff) — the ceiling is the wheel actuator's torque-speed line, not the legs. tools/living-drawings/spec.js holds the numbers.
  • Geometric levelling in the one-leg shift. With the roll axes at 3.0" the wheel planes sit 3.375" outboard of them, so the ~24° parallelogram roll lifts one axle and drops the other by 2.8". Equal leg lengths no longer keep the body level (they did within 0.8" at the old 5.4" axes). The shift is therefore roll + a leg-length difference of 2 × spacer × sin γ, fed forward from the commanded roll — not an integrator, which fought the shift servo (one-leg-stance.md §5). The sandbox does this since 2026-09-27 and settles the poise at ~20° roll at the 75% ride; the portable core needs the same term.
  • Terrain scope for V1 controls: flat floor, 1" sills at cruise, ~20° slopes (R40). Rough ground is Phase E.