← Projects
HEXAPOD — Inverse Kinematics and Gait Simulator
Product demo
Problem
Hexapod gait and leg IK are usually explained with equations and a video, or hidden inside a robotics library. Neither lets you feel what changing duty factor or step height actually does to a walking robot.
Business Impact
A working reference implementation of legged-robot IK and gait sequencing that runs in a tab. Useful for anyone building an actual hexapod, and a far better teaching artifact than a diagram because the parameters are live.
System Approach
- Analytic 3-DOF leg IK — atan2 for coxa yaw, law of cosines for the femur-tibia planar two-link
- Six legs solved per frame at 60 fps with no solver iteration
- Gait engine as phase offsets plus per-leg duty factor — tripod, ripple, wave
- Stance feet move backward in the body frame at exactly body velocity, eliminating foot slip
- Swing trajectory as smoothstep forward return with sinusoidal lift
- IK-to-FK round-trip self-check in the test suite
- Live sliders for speed, stride, step height, body height, and stance width
Key Decisions & Trade-offs
- Write the IK and gait math from scratch rather than pull a robotics library — the math is the project
- Analytic IK over an iterative solver so six legs at 60 fps is trivial rather than tight
- No foot slip as a hard constraint; it is the difference between a simulation and an animation
- Browser over a native sim so the thing can simply be linked
- UI and concept credit to Dilum Sanjaya's simulator, with the IK, gait math, and implementation written independently
Current Status
Public and open source at github.com/rohitguta2432/hexapod-simulator. All three gaits, the full parameter set, and the IK-to-FK verification test working. Runs with npm install and npm run dev.
Roadmap
- Body pose control — translate and rotate the chassis over planted feet
- Uneven terrain with per-leg ground adaptation
- Export a gait to servo angle sequences for real hardware
What I'd Improve Next
- Turning gaits, not just straight-line locomotion
- A plot of per-leg phase so the duty factor is visible as well as felt
Explore More
- avatar-sync — Real-Time Face and Hand Tracking in One HTML File — Face and hand tracking demos come wrapped in a build step, a server, and usually an API key — which puts a wall in front of anyone who just wants to see what the models actually output before building on them.
- TableTalk — Scan, Order, Eat: QR Ordering for Dine-In — Dine-in ordering still means flagging a waiter, squinting at a laminated menu with no photos, and repeating your order across the noise.
- Shoebox — Bill Photo to GST Ledger, Offline — Small shops in India keep supplier bills in a pile until the accountant asks.
- BridgeTrace — Find Where a USDC Transfer Stopped — A USDC transfer between chains can stop at three points: the source burn, Circle's attestation, or the destination receive transaction.
- All 47 projects — the full catalogue, with live links and repos.