5shekel 0e1d247d05 follow
2026-02-18 17:32:51 +02:00
2026-02-18 17:32:51 +02:00
2026-02-17 14:01:35 +02:00
2026-02-17 14:10:37 +02:00
2026-02-17 14:10:37 +02:00
2026-02-17 14:10:37 +02:00
2026-02-17 14:10:37 +02:00

Walker Linkage Web Simulator

2D + 3D browser simulator of the walker linkage from linkage.svg, implemented with HTML Canvas for the top pane and Three.js for the lower pane.

Features

  • One-side linkage solve from fixed bar lengths and crank angle.
  • Duplicated opposite side with 180° phase offset.
  • Color mapping aligned with the drawing:
    • pivots = yellow
    • crank = green
    • links = black
    • body = red
  • Play/pause, reset, speed slider, angle scrubber.
  • Live length controls in centimeters (cm):
    • body (AB) with A/B preserved as body endpoints
    • crank (OC)
    • leg (CG) with automatic coupling to CF
    • tendon (BE) with automatic coupling to AD
    • defaults normalized to a 45 cm leg baseline while preserving original mechanism ratios
    • mirrored automatically to far side (180° phase side)
  • Presets save/load for named dimension setups (persisted in browser local storage).
  • Foot trajectory traces for both sides.
  • Optional linkage annotation overlay (joint and link labels).
  • Optional real-time 3D viewport with orbit camera and camera reset.
  • Diagnostics panel with closure error and fallback counters.

File layout

Run

Any static server is enough.

No build step is required. Three.js is loaded via ESM URL imports.

Example with Python:

python3 -m http.server 8676

Then open:

http://localhost:8676/

MuJoCo rigid-body track

A Python + MuJoCo scaffold is available in sim/mujoco for rigid-body walking experiments.

Quick start:

cd sim/mujoco
uv sync
uv run walker-run --seconds 10

Use uv run walker-run --viewer --seconds 30 for interactive visualization. See sim/mujoco/README.md for details.

To compare physics traces in the browser app, export JSON via uv run walker-export-web --frame body --seconds 15 --out ../../artifacts/mujoco_trace.json from sim/mujoco, then load it in the "MuJoCo Trace Overlay" panel.

Model notes

  • v1 is pure kinematic visualization.
  • No collision/ground dynamics and no body translation.
  • Side B is driven by theta + pi.
  • Lower branch of each circle-circle intersection is selected to maintain leg-down posture.
Description
No description provided
Readme 7.6 MiB
Languages
JavaScript 57.3%
Python 31.1%
CSS 5.1%
Shell 4.3%
HTML 2.2%