skelarm
A lightweight, physics-based dynamics simulator for a configurable planar robot
arm. skelarm treats the robot as a "skeleton" of N links and focuses on
kinematics and dynamics — there is no collision detection or detailed shape
rendering. The supported model is a horizontal, gravity-free plane: it
models a planar arm lying flat.
What it does, in one pass: define a robot in TOML, pose it interactively (FK/IK), simulate its dynamics under torque control, run controlled tasks (reaching, curve tracing, trajectory tracking, MPC) from a single scenario file, and record every run to a self-contained log that replays, plots, exports to video, and — for headless runs — re-simulates reproducibly.
Where to go
- Getting Started — install and drive your first robot in five minutes.
- User Guides — task-oriented walkthroughs: configure a robot, pose and inspect it, simulate dynamics, run controlled scenarios, record and replay, teach trajectories, joint limits, and the tool & CLI reference.
- Developer Guides — use and extend the library from Python: API quick start, define a task, define a controller, architecture, and development & testing.
- Theory Reference — the mathematics behind the implementation, from forward kinematics to reaching control.
- API Reference — per-module API docs generated from the source (the Architecture overview lives under Developer Guides).
Capabilities at a glance
- Configurable robot — arbitrary planar chains from TOML: lengths, masses, inertias, centers of mass, joint limits, optional base offset.
- Kinematics — recursive FK for positions/velocities/accelerations, endpoint Jacobian, and numerical IK (Sugihara-style Levenberg-Marquardt and friends).
- Dynamics — Recursive Newton-Euler inverse dynamics, mass-matrix forward
dynamics, fixed-step semi-implicit Euler and adaptive
solve_ivpintegration. - Control — trajectory-tracking laws, human-like reaching controllers, and joint-space MPC, all configured from one scenario TOML and extensible at runtime.
- Recording & replay — self-contained
*.sklog.npzlogs with an analysis player, headless.mp4/.gifexport, and reproducible headless re-simulation. - Quality — fully typed, tested with
pytest+hypothesisproperty tests, linted withruff.