Anatomically Constrained Procedural Human Locomotion
An NM-PM study investigating how human-like walking, running, balance, support changes, and terrain adaptation can be generated from anatomy, body state, momentum, foothold choice, and environmental constraints rather than primarily replaying fixed gait clips.
Research Problem
movement intent
|
v
desired body velocity
|
v
terrain + body state
|
v
support analysis
|
v
foothold choice
|
v
swing trajectory
|
v
body target + leg solve
|
v
physical movementMeasured gait and authored motion may be used as reference evidence, but the study will investigate which behaviors must be explicitly controlled and which can emerge from anatomy, contacts, gravity, momentum, and limited guidance.
Research Workflow
- Define one narrow question.
- Preserve the previous harness.
- Implement the smallest controlled experiment.
- Test pure math independently of the window.
- Use visual recordings when metrics cannot describe motion adequately.
- Preserve failures and superseded approaches.
- Promote shared architecture only after reuse is demonstrated.
This combines the preserved-phase approach of Blood Simulation with the shared-core rule used by Sprite Projection.
Coordinate Contract
+X = subject right +Y = subject forward +Z = up X cross Y = Z
The basis is right-handed and renderer-independent. Raylib receives a drawing-time conversion only. Camera state never changes locomotion state. Physical calculations use meters, seconds, kilograms when mass is introduced, and radians internally.
Reference Anatomy
LO-001 freezes one deterministic neutral research subject so early experiments do not move their own goalposts.
| Quantity | Reference |
|---|---|
| Standing height | 1.75 m nominal |
| Shoulder width | 0.42 m |
| Hip width | 0.19 m |
| Upper leg | 0.45 m |
| Lower leg | 0.45 m |
| Foot | 0.30 m x 0.105 m |
The logical body includes pelvis, spine, chest, neck, head, shoulders, elbows, wrists, hand tips, hips, knees, ankles, heels, toe bases, and toe tips. These dimensions are a controlled baseline, not a claim of one universal average human.
Joint Envelopes
Maximum clinical ROM is not normal gait ROM. Enabled axes therefore have a comfortable envelope inside a wider outer research guardrail.
| Axis | Comfortable | Outer |
|---|---|---|
| Hip flexion / extension | -12 to 105 deg | -22 to 135 deg |
| Knee flexion | 0 to 125 deg | -5 to 145 deg |
| Ankle plantar / dorsiflexion | -35 to 10 deg | -60 to 16 deg |
| Shoulder flexion / extension | -35 to 145 deg | -55 to 175 deg |
| Elbow flexion | 0 to 130 deg | -3 to 150 deg |
These are controller guardrails, not medical absolutes. Soucie et al. support several major sagittal ROM references and also show age and sex variation. Some Phase 0 frontal and transverse limits remain provisional. Joint coordinate descriptions will follow ISB recommendations where practical instead of inheriting renderer Euler angles.
Foot Contacts
ankle | +-- heel +-- forefoot / toe base +-- toe tip
The heel-to-forefoot interval and foot width define a first support patch. Later phases can distinguish heel contact, flat support, forefoot support, toe-off, and airborne swing without replacing the basic foot representation.
Y Bot Policy
An untextured Y Bot is suitable as a visual test subject, but Mixamo bone names, bind-pose orientation, units, and FBX axes are not allowed to define locomotion semantics.
Y Bot / another humanoid / Sprite Projection
|
v
pose adapter
|
v
NM-PM body contractLO-001 uses a deterministic native mannequin and requires no external asset. Model import can be added once the mathematical contract is stable enough to map onto.
LO-002 - Segment Mass Model
The Phase 1 reference uses fourteen body segments: head, trunk, paired upper arms, forearms, hands, thighs, shanks, and feet. Segment mass fractions and longitudinal COM ratios use the arithmetic mean of the female and male adjusted Zatsiorsky-Seluyanov tables reported by de Leva (1996). This avoids selecting one sex as the default reference subject while preserving a measured human-like distribution.
The rounded published mass fractions total 0.99995, so the implementation divides by the observed sum instead of assuming it is exactly one.
Center of Mass
C_segment = P + r(D - P) C_body = sum(m_i C_i) / sum(m_i)
Each segment COM is placed along its proximal-to-distal line. Whole-body COM is the mass-weighted average of all fourteen segment COMs. In the neutral reference pose it lies close to the sagittal midline and approximately 1.02 m above the ground.
Support Geometry
Support is explicitly classified as DOUBLE, LEFT, RIGHT, or NONE. Each active foot contributes its LO-001 heel-to-forefoot rectangular patch. The convex hull of all active contact corners becomes the support polygon.
The signed support margin is the shortest distance from a measured ground point to the support-polygon boundary. It is positive inside, negative outside, and unavailable with no active support.
XCoM Diagnostic
omega0 = sqrt(g / h) XCoM = x + v / omega0
LO-002 includes Hof's velocity-aware extrapolated COM as a diagnostic. Fixed velocity presets let the same static body demonstrate how momentum can move the predicted stability point outside the current support area even while the ordinary COM projection remains inside.
XCoM is not yet a stepping target or balance controller.
LO-003 - Static Standing Solver
Phase 2 receives a pelvis target, left and right ankle targets, and a preferred knee-bend direction. It returns a complete static body pose plus reach and joint-limit diagnostics. Upper-body joints translate with the pelvis while each leg is solved independently from fixed segment lengths.
The solver deliberately uses bounded presets rather than exposing dozens of tuning controls: neutral, low, wide, split stance, raised-and-forward left step, excessive pelvis height, and an impossible overreach case.
Shared Pelvis-Height Feasibility
Before solving the legs, each target defines a vertical pelvis interval compatible with the current horizontal hip-to-ankle separation. The upper bound comes from full leg extension. The lower bound is constrained by the LO-001 outer knee-flexion guardrail. The left and right intervals are intersected.
d_max = upper + lower pelvis_max_z = ankle_z + sqrt(d_max^2 - horizontal^2)
If the requested pelvis height lies outside the shared interval, only pelvis Z is clamped. The HIGH TEST preset exists to make this correction visible rather than hiding it inside IK.
Analytic Two-Link Leg IK
x = (a^2 - b^2 + d^2) / (2d) h = sqrt(a^2 - x^2)
The knee lies at distance x along the hip-to-ankle axis and h away from that axis. Body-forward (+Y) is projected onto the perpendicular knee plane to select one deterministic human-like bend branch. This prevents arbitrary knee flipping between mathematically valid solutions.
Approximate hip flexion/extension, hip abduction/adduction, knee flexion, and ankle plantar/dorsiflexion are checked against the comfortable and outer LO-001 envelopes.
Reach Failure Policy
An impossible target is not solved by stretching a limb. The requested marker remains visible, while the solved ankle clamps to the nearest legal chain length. The harness draws the difference between requested and solved positions. Segment lengths therefore remain invariant even in the deliberate OVERREACH TEST.
LO-004 - One-Step Transaction
Phase 3 connects two valid standing states with one explicit sequence: PRELOAD, SWING, LANDING, and COMPLETE. Either leg can be chosen as the swing leg. The opposite ankle remains fixed at its initial target for the full transaction.
DOUBLE SUPPORT
|
v
PRELOAD
|
v
liftoff
|
v
SINGLE SUPPORT + SWING
|
v
touchdown
|
v
LANDING
|
v
DOUBLE SUPPORT / COMPLETEThe default plan moves the swing ankle 0.28 m forward over 0.82 s, with liftoff at normalized phase 0.10 and touchdown at 0.90. The end pose is solved through LO-003 rather than copied from an authored gait frame.
Swing Trajectory
Horizontal travel uses quintic smoother-step interpolation so the swing target begins and ends with zero horizontal velocity:
s(u) = 6u^5 - 15u^4 + 10u^3
Vertical lift uses a separate zero-end-velocity profile:
z_lift(u) = h sin^2(pi u)
The retained default peak lift is 0.045 m. Feet remain flat during LO-004, so foot pitch and heel/toe rocker remain visible limitations rather than being hidden inside the trajectory function.
Support Stages
PRELOAD begins in double support. During SWING only the opposite planted foot contributes to the LO-002 support polygon. LANDING and COMPLETE restore double support.
The pelvis advances toward the midpoint of the completed stance. Its height can move inward from the LO-003 reach boundary, but COM and support margin never alter the pelvis target. A negative support margin remains a measurement.
Toe Clearance and Planted-Foot Slip
LO-004 promotes two motion quantities into explicit validation metrics.
Planted-foot slip is the distance between the solved support ankle and its starting position. The default plan is invalid if this exceeds numerical tolerance.
Toe clearance is measured directly from the LO-001 toe-tip marker to the flat ground plane. Since every valid step naturally begins and ends at zero clearance, the phase reports the minimum clearance over the central 20 to 80 percent of swing as well as the peak value.
Future Flight Boundary
LO-004 uses only DOUBLE and single-foot support, but it deliberately does not redefine locomotion to require a supporting foot. The LO-002 NONE state remains valid for future takeoff and flight experiments.
foot support
|
v
takeoff
|
v
NONE
|
v
flight
|
v
landingLikewise, Phase 3 remains foot-specific rather than prematurely introducing hand, wall, or ledge contacts. Later parkour and climbing experiments can generalize contact planning without rewriting this step transaction.
LO-005 - Alternating Event-Sequenced Steps
Phase 4 repeats the validated LO-004 transaction across alternating right and left swing legs. Cadence and successive footfall spacing remain fixed so repetition and handoff quality are the only new research variables.
RIGHT swing
|
COMPLETE
|
v
LEFT swing
|
COMPLETE
|
v
RIGHT swing
|
...The default harness runs six steps, with four- and eight-step variants available as bounded accumulation tests.
Persistent Stance State
Repeated gait cannot rebuild each step from the original neutral mannequin. LO-005 therefore carries left ankle, right ankle, and pelvis positions in world space from one completed step into the next.
left ankle right ankle pelvis
The fixed 0.28 m value describes spacing between successive footfalls. After the initial aligned step, the trailing foot travels about 0.56 m in world space to pass the planted foot and land 0.28 m ahead.
Handoff Continuity
Every adjacent step compares the complete solved pose at the previous COMPLETE state with the next PRELOAD state. The study records maximum joint-position delta and pelvis-position delta over all boundaries.
max_handoff_joint_delta max_handoff_pelvis_delta
Planted support ankle error is accumulated across the full sequence rather than checked only per isolated step. Knee bend direction is also verified so the analytic IK branch cannot silently flip at a handoff.
Repeated-Gait Pelvis Timing
The first LO-005 candidate reused LO-004's whole-step pelvis interpolation. Windows CI found the first outer-limit violation on step 2 at phase 0.1917: the trailing swing-side ankle reached 16.1883° dorsiflexion against the 16° LO-001 guardrail.
The swing foot had barely lifted at that point. The problem was forward timing: the pelvis advanced faster than the trailing foot early in the stride.
The retained Phase 4 policy keeps forward pelvis progression fixed through PRELOAD and then advances it using the same normalized swing-transfer interpolation between liftoff and touchdown.
That correction reduced the first violation to 16.0414°, but the flat trailing foot still crossed the guardrail. A dense numerical sweep showed that the remaining problem was horizontal transfer timing rather than clearance alone.
v = u + u(1-u) horizontal = smootherstep(v)
The retained transfer front-loads horizontal foot progression through this monotonic phase warp while the outer quintic still gives zero endpoint velocity. LO-005 uses 0.038 m repeated-gait clearance with the warped transfer; LO-004 keeps its valid 0.045 m isolated-step value.
Sequence Controller
The controller stores current step index, elapsed local step time, completed handoff count, and finished state. When a step completes, the controller advances the handoff, alternates swing side, and carries the completed stance forward. It stops exactly after the requested integer number of steps.
A normalized sequence phase is available for deterministic inspection and scrubbing, but step identity is preserved explicitly rather than reduced to one endlessly wrapping animation phase.
LO-006 - Velocity Profile
Phase 5 accepts desired forward walking speed as a continuous steady-state command. The currently validated range is 0.40 to 0.80 m/s. Values outside that interval clamp to the nearest tested endpoint; the range is a limitation of the present flat-foot model, not a biological walk/run boundary.
desired speed
|
+-- successive footfall spacing
+-- step duration
+-- cadence
+-- liftoff / touchdown timing
+-- coordination amplitudesStep duration is defined by step_length / desired_speed, so the steady-state pelvis advance of one successive-footfall interval per step closes the commanded speed exactly. Step length increases across the envelope while double-support share decreases.
v0.6.1 Reference-Motion Analysis
Visual review of v0.6.0 showed that the arms moved too far from the torso. The problem was structural: the LO-001 neutral wrists are about 1.52 shoulder-widths from the sagittal center, so rotating that already-wide pose preserved an unrealistic lateral offset.
Four supplied in-place FBX clips were analyzed: walk, slow run, medium run, and fast run. All use the same Mixamo skeleton and compatible bind transforms. The original FBX files are not distributed by NM-PM. Only derived measurements are retained in the reference/ directory.
| Reference clip | Cycle | Mean wrist lateral distance | Observed elbow flexion |
|---|---|---|---|
| walk | 1.033 s | 0.78 shoulder widths | about 15-58 deg |
| slow run | 0.733 s | 0.61 shoulder widths | about 62-118 deg |
| medium run | 0.567 s | 0.59 shoulder widths | broad, about 24-109 deg |
| fast run | 0.633 s | 0.72 shoulder widths | about 63-122 deg |
The walk clip also showed very strong contralateral leg/hand timing and pelvis/thorax rotation in approximately opposing directions. The run clips retain those relationships more loosely and often bend the elbows substantially more. Those running measurements are saved for future transition work, not forced into the present walking controller.
Reference analysis notes and derived measurements are stored with the study.
Pelvis and Thorax Coordination
LO-006 keeps small pelvic obliquity and a lateral shift toward the current support side. Those terms fade to zero at the support transitions. Pelvis yaw and thorax yaw are now separate targets with opposing signs rather than one upper-body residual rotation.
pelvis_yaw = -pelvis_amplitude * leg_signal
thorax_yaw = +thorax_amplitude * leg_signal
relative_torso_twist =
thorax_yaw - pelvis_yawPelvis rotation is part of the actual hip geometry. The reference hip offsets are rotated first and each leg is solved again against the unchanged LO-005 ankle targets, so whole-body motion cannot create foot skate.
The retained pelvis motion is deliberately smaller than the supplied walk reference because the flat-foot leg model reaches the existing 16° dorsiflexion guardrail. A component decomposition showed that lateral shift was essentially harmless and yaw was modest, while pelvic obliquity alone could cross the guardrail. v0.6.1 therefore retains 1.0-1.5° pelvis yaw and the lateral shift, but limits obliquity to 0.3-0.5°. Larger reference-sized roll should be revisited when heel/toe rocker and foot pitch are available.
Reference-Informed Upper-Limb Solve
v0.6.1 no longer rotates the complete neutral arm as a rigid chain. It creates a torso-relative wrist target and analytically solves shoulder, elbow, and wrist positions while preserving the unchanged LO-001 arm lengths.
contralateral leg state
|
v
persistent damped arm drive
|
+-- forward / backward target
+-- normalized wrist corridor
+-- desired elbow flexion
|
v
shoulder-to-wrist chain distance
|
v
two-link shoulder / elbow / wrist solveThe wrist target is normalized by current shoulder width. The walking controller uses targets between 0.72 and 0.78 shoulder-widths from the torso center, compared with about 1.52 shoulder-widths in the wide Phase 0 neutral pose.
Elbow flexion determines the shoulder-to-wrist chain distance:
d^2 = upper^2 + fore^2
+ 2 * upper * fore * cos(elbow_flexion)A mild torso-relative elbow pole chooses the bend plane. The hand tip then extends along the solved forearm direction. Upper-arm and forearm lengths remain invariant.
The runtime arm state stores a dimensionless drive and drive velocity. A damped second-order response follows the contralateral target without snapping or replaying FBX angles, leaving state available for later acceleration and walk/run transition experiments.
Coordination Comparison Modes
LEGS ONLY + PELVIS + PELVIS + TRUNK FULL BODY
All four modes share the same desired speed and exact footstep plan. They exist so pelvis, trunk, and arm additions can be inspected independently instead of letting upper-body motion hide a lower-body defect.
Rejected LO-006 Assumptions
The first LO-006 candidate reduced swing clearance at slower commanded speeds. Windows CI showed that this caused the cruise profile to fall below the preserved LO-005 minimum central toe-clearance invariant.
The invariant was not weakened. The retained Phase 5 controller keeps the validated 0.038 m repeated-gait flat-foot lift across the speed range while step spacing, cadence, and support timing remain speed-dependent. A second candidate retained that clearance but used a broader 0.40-1.00 m/s / 0.26-0.40 m spacing map. At 0.70 m/s, step 2 phase 0.13 reached 16.009° left-ankle dorsiflexion against the existing 16° outer guardrail. The retained flat-foot envelope is therefore 0.40-0.80 m/s with 0.26-0.28 m successive-footfall spacing. Earlier-liftoff timing reduced one intermediate violation to 16.0388°. A later 0.30 m fast-end candidate still reached 16.1128° dorsiflexion on step 2, and a 0.285 m retry still reached 16.0042°. The retained fast-end spacing is therefore 0.28 m, leaving numerical margin instead of widening anatomy.
Native Harness
The Phase 5 harness retains the grayscale NM-PM UI and exposes SLOW 0.40 m/s, WALK 0.60 m/s, FAST WALK 0.80 m/s, plus a continuous slider across the validated range. LEGS ONLY, + PELVIS, + PELVIS + TRUNK, and FULL BODY comparison modes remain available.
Playback retains deterministic finite sequences, sequence scrubbing, camera tracking, planned footfalls, current swing path, support polygon, and whole-body COM. v0.6.1 diagnostics add pelvis/thorax relative yaw, left/right arm drive, left/right elbow flexion, normalized wrist corridor, exact arm-length preservation, and reference-envelope status.
Validation
All earlier test suites remain active. The v0.6.1 Phase 5 suite contains thirty-two headline checks. In addition to speed, reach, support, foot-target, and joint-limit invariants, it verifies independent thorax scaling, opposing pelvis/thorax yaw, exact arm segment lengths, torso-relative wrist corridors, walking elbow-flexion envelopes, a wrist corridor narrower than the Phase 0 neutral pose, overlap with the supplied walk reference, persistent damped arm response, and a dense body-envelope sweep over the complete walking-speed range.
Post-LO-006 Flow Audit
LO-006 v0.6.1 passed its numerical validation and corrected the most obvious upper-body geometry problem from v0.6.0, but visual inspection still showed a highly regular, march-like gait. This is now treated as a research result rather than a request for more cosmetic tuning.
The Phase 3-5 lineage uses the step transaction as the fundamental unit of motion:
valid stance
|
v
planned swing
|
v
touchdown
|
v
COMPLETE
|
v
handoff to the next stepThis architecture is useful for proving reachability, planted-foot accuracy, support transitions, and deterministic continuity. It is weaker at producing the sense that the body already has momentum and is continuously moving through changing contacts.
Observed structural causes
- Step completion is too important. A left/right transaction boundary remains perceptually obvious even when the pose itself is continuous.
- The pelvis is primarily commanded. Root position is sampled from gait policy rather than carried through support changes as persistent position/velocity state.
- The stance foot is effectively flat. Heel strike, weight acceptance, heel rise, forefoot support, and toe-off are not yet part of the mechanics.
- Swing is one generic transfer. The current trajectory does not distinguish initiation, clearance, terminal extension, and contact preparation as separate functional jobs.
- Liftoff and touchdown are prescribed by the clock. Contact cannot yet correct the timing model.
- Whole-body coordination remains strongly driven by one leg-separation signal. v0.6.1 improved arm geometry but not the fundamental timing hierarchy.
- Validation emphasizes legality, not flow. Segment lengths, joint limits, support slip, toe clearance, and handoff continuity can all pass while velocity/acceleration progression still looks mechanical.
The audit is preserved in experiments/LO-006-FLOW-AUDIT.md.
Reference interpretation
Bruderlin and Calvert's KLAW work is the strongest architecture reference for this correction: desired locomotion is decomposed into state/phase timing and locomotion-specific dynamics rather than relying only on joint interpolation. Chung and Hahn place stance-foot constraints and pelvis/root trajectory near the center of a hierarchical controller. Boulic, Magnenat-Thalmann, and Thalmann provide an empirical parameterized level-walk model useful as a comparison benchmark. Fu's 2025 thesis is useful mainly for the idea of persistent coupled limb phases rather than one global gait clock.
Revised Runtime Event Flow
LO-007 now implements the persistent-state foundation of this event flow. Later phases still need articulated stance, physical handoff/impact, functional swing, and dynamic body transport. The target relationship remains continuous, and several events are expected to overlap.
1. MOVEMENT INTENT
desired direction / velocity
2. CONTINUOUS BODY TRANSPORT
root position + velocity + angular state already exist
3. SUPPORT EVALUATION
heel / flat / forefoot / airborne contacts
4. WEIGHT ACCEPTANCE
current support begins carrying the body
5. STANCE ROLLOVER
heel -> flat -> forefoot while the body passes over support
6. SWING READINESS
free-limb phase/contact state approaches release
7. TOE-OFF / RELEASE
departing foot stops contributing meaningful support
8. SWING INITIATION
knee flexion / shortening creates clearance
9. MID-SWING TRANSPORT
foot advances while root motion continues
10. TERMINAL SWING
knee extends; foot prepares orientation for contact
11. CONTACT PREDICTION
desired foothold is checked against body state and reach
12. HEEL STRIKE / TOUCHDOWN
actual contact event occurs
13. STATE CORRECTION + WEIGHT TRANSFER
contact updates continuing body/phase state
14. CONTINUE
no global gait resetThis is an event relationship, not a proposed fourteen-state animation clip. A stance foot may still be in forefoot support while the opposite foot enters contact preparation; limb phases and root motion continue through the overlap.
Persistent state target
root position root linear velocity root angular velocity left/right leg phase or readiness left/right arm phase or response state active contact set contact history support / flight state
Future gait phase should answer primarily when a contact or limb transition is preferred. Contact, anatomy, momentum, environment, and the pose solver should determine what the body actually does.
New flow metrics
Existing reach and contact invariants remain. Later phases should additionally measure root velocity continuity, acceleration/jerk, joint angular-velocity and angular-acceleration continuity, phase correction after contact, and simplified momentum/energy discontinuities where the chosen dynamic model exposes them.
LO-007 - Continuous Locomotion State
Phase 6 removes the finite repeated-step transaction as the runtime source of locomotion. A persistent ContinuousLocomotionState now carries simulation time, root position and velocity, root angular state, independent unwrapped left/right limb phases, persistent arm response, grounded/airborne contacts, planted world-space ankle anchors, contact history, support classification, solved pose, and continuity diagnostics.
persistent root state
|
+----------------------+
| |
v v
left/right phase contact state/history
| |
+----------+-----------+
v
release / touchdown
transition events
|
v
bounded timing correction
|
v
temporary swing + planted anchors
|
v
constrained LO-003 solve
|
v
LO-002 measurement
|
v
continueThe pure simulation advances at 120 Hz. The harness accumulates real frame time but locomotion state changes only on fixed ticks. Root forward position is integrated from persistent root velocity rather than sampled from a finite step phase. Left and right limb phases remain unwrapped across nominal cycle boundaries, so crossing an integer does not reconstruct limb identity.
Contact timing
Release and touchdown are still predicted from limb phase readiness on flat ground. They are not yet physical collision events. Their new role is architectural: a contact-transition event can add bounded timing correction and enter the contact-history ring buffer without reconstructing the locomotion controller. A deterministic disturbance probe offsets one limb phase and verifies that timing recovers without a global reset.
The accepted candidate reports zero root-velocity and root-acceleration jumps in the steady kinematic transport model, planted-foot slip at numerical precision, segment-length error at numerical precision, and exact deterministic replay for identical fixed-tick runs. Phase 6 contains twenty-nine self-tests, and Windows CI passes all seven preserved CTest suites from LO-001 through LO-007.
Root / pelvis boundary
The persistent root and the displayed pelvis are not yet identical. Root Y advances continuously from root velocity, but the flat-foot LO-003 solve still keeps pose-solver pelvis Y near the midpoint of the current ankle targets. This preserves the unchanged ankle dorsiflexion guardrail instead of widening anatomy to make the new architecture fit.
This limitation is now explicit. LO-007 proves that persistent locomotion state can survive support changes, but it does not yet prove dynamic body passage over the planted stance foot. LO-008 will promote heel, forefoot, and toe contact into actual support mechanics; LO-009 will then compare locomotion-specific stance/root transport models.
LO-008 - Articulated Stance Foot
Phase 7 adds a sagittal stance-foot rocker on top of the LO-007 continuous-state architecture. Each foot can be AIRBORNE, HEEL, FLAT, FOREFOOT, or TOE while retaining persistent root motion, limb timing, contact history, and arm-response state.
persistent LO-007 state
|
v
stance phase readiness
|
v
HEEL -> FLAT -> FOREFOOT -> TOE
|
v
active ground pivot
|
v
derive ankle from rotated foot geometry
|
v
LO-003 constrained leg solve
|
v
articulated heel / forefoot / toe markersThe rocker is not applied after solving the body. The active pivot and foot pitch determine the ankle target before the leg solver runs, so the articulated foot changes the kinematic constraint itself.
Support geometry
The LO-001 heel, toe-base, toe-tip, and foot-width measurements define the support geometry. Heel support uses a rear-foot region, flat support uses the full patch, forefoot support moves the patch forward and narrows it, and toe support narrows further toward the toe region. Airborne feet contribute no support patch. The current active regions are combined into the LO-002 support polygon.
Foot pitch is rate-limited to avoid abrupt rocker transitions. If the articulated request becomes anatomically invalid, the controller reduces root-follow and then reduces pitch toward flat rather than widening the LO-001 ankle, knee, or hip guardrails.
Flat versus articulated comparison
The Phase 7 harness can restart the same steady walking condition in LO-007 FLAT or LO-008 ARTICULATED mode. It displays active foot modes, pitch, ankle dorsiflexion, support polygon, root Y, displayed pelvis Y, and their forward mismatch. The comparison is intended to test whether articulated support can reduce the flat-foot transport restriction without sacrificing reachability or outer-limit validity.
Main-branch Windows CI builds all Phase 0 through Phase 7 executables and passes eight out of eight CTest suites. Phase 7 contains twenty-nine self-tests. A redundant support-polygon test typo was corrected before the v0.8.0 release trigger; runtime behavior was unchanged.
Current boundary
LO-008 is not yet a dynamic stance controller. Touchdown remains phase-predicted, the swing leg still uses temporary scaffolding, impact/weight transfer are deferred to LO-010, and the visible pelvis still uses conservative kinematic root-follow rather than a stance-dynamics model. LO-009 will compare the smallest useful dynamic stance/root-transport alternatives after visual QA of this checkpoint.
Biomechanics Basis for Later Phases
Gait timing is state-dependent
Walking contains stance, swing, and double-support structure, but speed changes cadence, stride, joint motion, and timing. Gait phase should coordinate events rather than directly scripting every joint.
Dynamic balance is not static COM centering
LO-002 now computes ordinary COM support and Hof's extrapolated COM side by side. Later foot-placement work can test whether velocity-aware state improves stepping without turning the metric into an invisible pelvis force.
Measured gait is comparison evidence
The Fukuchi public dataset provides healthy overground and treadmill kinematics and kinetics at different speeds. Later phases can compare generated pelvis, hip, knee, ankle, and temporal curves against measured human behavior without replaying the dataset as animation.
Segment mass is now explicit
The de Leva-based Phase 1 mass distribution gives later experiments a consistent body COM rather than averaging joints equally.
Architecture
projects/locomotion/
├── DOCUMENTATION.html
├── README.md
├── ARCHITECTURE.md
├── NEXT.md
├── RELEASES.md
├── CMakeLists.txt
├── build_windows.bat
├── experiments/
│ ├── INDEX.md
│ ├── LO-006-FLOW-AUDIT.md
│ ├── LO-007.md
│ └── LO-008.md
├── phases/
│ ├── phase0/ ... phase6/
│ └── phase7/
│ ├── main.cpp
│ ├── phase7_articulated_foot.hpp
│ └── test_phase7.cpp
└── reference/
├── README.md
├── ANALYSIS.md
└── LO006_FBX_REFERENCE.jsonPhase 7 contains the LO-007 persistent state and adds articulated support geometry before the constrained leg solve. The reference/ files remain measurement evidence only; the controller does not require FBX data at runtime.
LO-009 Dynamic Stance (historical)
LO-009 / Phase 8 compared three support-driven root models on top of LO-008: kinematic LO-008 baseline (A), rigid virtual-leg (B), and compliant telescoping stance (C). It is released as locomotion-v0.9.0 and remains a preserved harness. Despite corrected pivot velocity, rigid length constraints, and root authority, visual evaluation still read as march-like alternating steps.
LO-010 KLAW Published-Method Reconstruction
LO-010 / Phase 9 reconstructs the published KLAW (Keyframe-Less Animation of Walking) methodology of Bruderlin and Calvert (SIGGRAPH 1989) as an explicit external procedural baseline. The first locomotion-v0.10.0 pass was too approximate (canned per-step ICs, conveyor root, simplified Appendix A, sine Swing 1, generic stance IK, nearest-sample playback). The locomotion-v0.10.1 fidelity pass replaces those internals with Appendix A dynamics, inherited boundary state, quartic Swing 1 path P, Figure 6 virtual-leg / foot pivots, Swing 2 clearance retry, Swing 3 terminal BVP, determinants after stance before swing, and interpolated playback. The 1989 dynamic model remains the primary source; 1993 may clarify parameters only.
Hierarchy reconstructed in order: locomotion parameters → step symmetry / state-phase timings → walking state machine → stance/swing specialized dynamics → virtual-leg kinematics → gait determinants → upper body → pose. Control remains intentionally step-oriented (one step = double + single support).
Traceability for every major subsystem lives in reference/KLAW_RECONSTRUCTION.md. Ambiguous OCR equations and thesis-only collision algebra are labeled PUBLISHED / RECONSTRUCTED / ASSUMED / UNKNOWN.
KLAW Attribution
NM-PM does not claim authorship of KLAW. KLAW and its underlying methodology are credited to Armin Bruderlin and Thomas W. Calvert. LO-010 is an engineering reconstruction based on their published work. It is not claimed to be an exact original KLAW implementation.
Revised Roadmap
After LO-009, the study pivots from independently rediscovering KLAW-like mechanisms to reconstructing the published 1989 method first, then modifying it deliberately.
| ID | Question |
|---|---|
| LO-001 - LO-009 | Preserved historical lineage. Bottom-up anatomy, support, IK, step chains, continuous state, articulated foot, and dynamic stance experiments. Useful negative result: improvements can remain march-like. |
| LO-010 | Fidelity reconstruction: KLAW 1989 baseline. Paper-literal Phase 9 pipeline after correcting the too-approximate first pass; hierarchy, Appendix A, virtual leg, determinants ordering, and upper-body follow-through. |
| LO-011 | KLAW validation / personality. Parameter and attribute study against the reconstruction baseline. |
| LO-012 | Continuous-state KLAW. Remove step reset while preserving KLAW mechanics. |
| LO-013 | Contact-driven / event-driven KLAW. Modernized heel strike and support transfer. |
| LO-014 | Adaptive swing and foothold control. |
| LO-015 | Balance / disturbance / recovery. |
| LO-016 | Continuous walk-run transition. |
| LO-017+ | Terrain, stairs, turning, obstacles, body variation, and generalized contacts. |
Current Limitations
- Reference proportions are a controlled test subject, not a population model.
- The Phase 1 mass table uses a male/female arithmetic mean rather than demographic-specific parameters.
- Several frontal and transverse joint limits are provisional.
- The knee is not yet modeled with coupled translation and axial rotation.
- The foot support patch is planar and simplified.
- LO-008 release/touchdown remains predicted from limb phase readiness rather than detected from physical collision.
- The current analytic joint-angle diagnostics remain simplified.
- Root velocity is persistent and LO-008 permits conservative root-follow, but the displayed pelvis is still kinematically placed rather than transported by a dynamic stance model.
- Acceleration, deceleration, and stopping are intentionally deferred until continuous locomotion state and stance mechanics exist.
- The 0.40-0.80 m/s envelope is a current-model validation range, not a human normative boundary.
- Pelvis, thorax, wrist-corridor, and elbow targets are procedural controller heuristics constrained by broad reference envelopes rather than fitted subject-specific biomechanics.
- Pelvis yaw remains deliberately conservative while the stance model is still kinematic.
- LO-008 now articulates stance feet through heel/flat/forefoot/toe support, but touchdown impact, weight acceptance dynamics, and functional swing-foot control remain later work.
- The current swing path remains one generic transfer curve rather than functional swing subphases.
- LO-007 adds root velocity/acceleration and phase-continuity diagnostics, but jerk, stance angular acceleration, momentum, and impact continuity remain later work.
- No imported rig is connected yet.
- No physical actuation, terrain adaptation, jumping, or active balance controller exists yet.
References
- Soucie JM et al. Range of motion measurements: reference values and a database for comparison studies. Haemophilia. 2011. DOI
- Wu G et al. ISB recommendation on definitions of joint coordinate system, part I. J Biomech. 2002. DOI
- Wu G et al. ISB recommendation on definitions of joint coordinate systems, part II. J Biomech. 2005. DOI
- de Leva P. Adjustments to Zatsiorsky-Seluyanov's segment inertia parameters. J Biomech. 1996. DOI
- Hof AL et al. The condition for dynamic stability. J Biomech. 2005. DOI
- Fukuchi CA et al. A public dataset of overground and treadmill walking kinematics and kinetics in healthy individuals. PeerJ. 2018. Article / Dataset
- Fukuchi RK et al. Effects of walking speed on gait biomechanics in healthy participants: a systematic review and meta-analysis. 2019. PubMed
- Liang BW et al. Pelvic step: the contribution of horizontal pelvis rotation to step length in young healthy adults walking on a treadmill. Gait Posture. 2014. DOI
- Whitcome KK et al. Pelvic Rotation Effect on Human Stride Length. 2017. DOI
- Collins SH et al. Dynamic arm swinging in human walking. Proc R Soc B. 2009. DOI
- Bruderlin A, Calvert TW. Goal-Directed, Dynamic Animation of Human Walking. Computer Graphics / SIGGRAPH. 1989;23(3):233-242. DOI 10.1145/74333.74357 / PDF — primary LO-010 source
- Bruderlin A, Calvert T. Interactive Animation of Personalized Human Locomotion. Graphics Interface '93. PDF — secondary clarification only; not a replacement of 1989 dynamics
- Chung S-k, Hahn JK. Animation of Human Walking in Virtual Environments. Computer Animation 1999:4-15. DOI / Author-hosted PDF
- Boulic R, Magnenat-Thalmann N, Thalmann D. A Global Human Walking Model with Real-Time Kinematic Personification. The Visual Computer. 1990;6(6):344-358. DOI
- Fu Y. Exploration of a Hybrid Procedural Animation Framework. Master's thesis, Lund University. 2025. Repository PDF
- Wolfram Demonstrations Project. Human Walking Animation. Interactive implementation/reference for a parameterized walking model. Demonstration
Version History
| Milestone | Change |
|---|---|
| v0.1.0 | LO-001 static anatomy foundation, coordinate contract, joint envelopes, foot contacts, native harness, tests, and living documentation. |
| v0.2.0 | LO-002 segment mass and COM model, support polygons, signed margins, XCoM diagnostic, native Arial consistency fix, and documentation scrollbar alignment. |
| v0.3.0 | LO-003 analytic static standing solver, shared pelvis-height feasibility, deterministic knee branch, unreachable-target clamping, unequal-height preset, and sixteen new solver tests. |
| v0.4.0 | LO-004 one-step transaction, generated swing trajectory, explicit liftoff/touchdown stages, planted-foot slip metric, toe-clearance metric, left/right playback, and eighteen new step tests. |
| v0.5.0 | LO-005 alternating fixed gait, persistent stance state, full-pose handoff continuity, accumulated planted-foot drift measurement, synchronized repeated-gait pelvis timing, controller handoff state, and twenty-two new repeated-gait tests. |
| v0.6.0 | LO-006 steady desired-speed gait family, continuous stride/cadence/support timing, first pelvis/trunk coordination, rigid-chain damped arm swing, comparison modes, rejected clearance-scaling experiment, and twenty-six new tests. |
| v0.6.1 | Reference-informed LO-006 correction: derived walk/run motion envelopes, independent pelvis/thorax yaw, torso-relative wrist corridors, two-link upper-limb solving, persistent arm-drive state, exact arm-length checks, and thirty-two Phase 5 tests. |
| v0.7.0 | LO-007 continuous locomotion state: 120 Hz fixed-step runtime, persistent integrated root state, independent unwrapped limb timing, contact-transition history/correction, planted anchors, persistent arm response, indefinite locomotion, twenty-nine Phase 6 tests, and exact deterministic replay. |
| v0.8.0 | LO-008 articulated stance foot: heel/flat/forefoot/toe rocker constraints, articulated foot markers, active support patches, flat-versus-articulated root/pelvis comparison, twenty-nine Phase 7 tests, and eight preserved CTest suites. Released as a visual-QA checkpoint before LO-009 dynamic stance. |
| v0.9.0 | LO-009 dynamic stance / support-driven root flow: A/B/C comparison, corrected rocker pivot velocity, rigid virtual-leg constraint, authoritative root/pelvis synchronization, expanded diagnostics, fifty-nine Phase 8 tests. |
| v0.10.0 | LO-010 first KLAW reconstruction pass (preserved; later judged too approximate for visual fidelity). |
| v0.10.1 | LO-010 fidelity reconstruction pass: Appendix A dynamics, inherited ICs, no conveyor root, quartic Swing 1, Fig 6 virtual leg, historical versions/ packaging. |