K2 Biped
K2 is an open-source, 3D-printed 12-DOF biped whose learned locomotion policy runs on a Seeed XIAO ESP32-S3 microcontroller.
- Other
- Open source
- Works with AI
- 3D model (URDF)
- 3D printable
Suggested by Robotheca, created by @kapalikkhanal (opens in a new tab), from github.com/kapalikkhanal/K2 (opens in a new tab). Pinned to commit 090b6fe (opens in a new tab).
- Hardware license
- MIT (opens in a new tab)
- Software license
- MIT (opens in a new tab)
- Commercial use
- Allowed
This repository contains executable files that Robotheca doesn't check. Only run them if you trust the creator.
Which files (1 script)
Photo and 3D model

3D preview converted from github.com/kapalikkhanal/K2 at 090b6fe, under MIT. View the original files from GitHub (95 KB) (opens in a new tab)
83 mesh files named in the URDF are not in the repository, so those parts are not shown.
- Degrees of freedom
- 12
- Height
- 0.426 m
- Weight
- 1.4 kg
What it can do
Written by Robotheca from the project's documents.
- Walks a 12-DOF biped: hold, march in place, forward and backward walking, lateral stepping and turning, from one learned policy.
- Runs a 55,088-parameter policy at 50 Hz directly on a Seeed XIAO ESP32-S3, with no Linux computer or GPU on board.
- Controlled from a phone web page over Wi-Fi (K2-Robot network), from an Xbox controller over BLE, or from the keyboard and joystick scripts on a Raspberry Pi 5.
- Recovers from transient servo feedback loss by holding and resuming; torque is cut when tilt exceeds 24 degrees.
- Reported timing: inference 6.34 ms and total work 11.98 ms per 20 ms tick; no missed deadlines in 23,408 logged ticks (author's measurements).
Works with AI
Found by Robotheca in the project's files at commit 090b6fe, its robot.yaml and Robotheca's notes on its documents. Never guessed; Robotheca doesn't run the code.
Ships a trained model: last_policy.onnx
In the project files: policies/last_policy.onnxUses a machine-learning library: ONNX
In the project files: k2_rl/export_onnx.py
Bill of materials
9 parts9 of 9 parts shown
| # | Component | Quantity | Est. price | Supplier |
|---|---|---|---|---|
| Bill of materials | ||||
| 1 | Feetech STS3215 serial-bus servo | 12 19.90 | $238.80 total≈ €213 | – |
| 2 | Seeed XIAO ESP32-S3 Sense | 1 13.99 | $13.99 total≈ €12 | – |
| 3 | LSM6DS3 IMU breakout | 1 4.99 | $4.99 total≈ €4 | – |
| 4 | Serial-bus servo interface | 1 10.50 | $10.50 total≈ €9 | – |
| 5 | DC/DC converter | 1 7.50 | $7.50 total≈ €7 | – |
| 6 | Battery | 1 12.66 | $12.66 total≈ €11 | – |
| 7 | Wiring | – 4.20 | $4.20 total≈ €4 | – |
| 8 | Switch and connectors | 1 7.88 | $7.88 total≈ €7 | – |
| 9 | Printed material (approx.) | – 20.00 | $20 total≈ €18 | – |
≈ € amounts use the ECB reference rate of 22 Oct 2026, for comparison only.
Parts total: $320.52. Read from README.md at the pinned commit.
Build guide
The guide appears here as you scroll.
Guide by @kapalikkhanal (README.md), under MIT.
More guides
Wiring and electronics
Notes written by Robotheca from the project's documents.
Main parts
- Seeed XIAO ESP32-S3 Sense microcontroller (240 MHz Xtensa LX7).
- 12 Feetech STS3215 serial-bus position servos on one 1 Mbaud half-duplex bus.
- Waveshare-style serial-bus servo driver interface board, set to TTL mode.
- LSM6DS3 IMU breakout over I2C, detected at address 0x6A or 0x6B.
- DC/DC converter and battery for power, with a switch and connectors.
- Optional Raspberry Pi 5 as an alternative controller.
Connections
- LSM6DS3 SDA connects to XIAO D4 (GPIO5); LSM6DS3 SCL connects to XIAO D5 (GPIO6).
- Servo driver RX connects to XIAO D6 (GPIO43, ESP TX); servo driver TX connects to XIAO D7 (GPIO44, ESP RX).
- All boards share a common ground.
- The servo driver must be set to TTL rather than USB mode.
- On the Raspberry Pi 5 the servo bus is used through /dev/ttyAMA0, with I2C and serial enabled in raspi-config.
Cables and connectors
From the parts list.
- Wiring
- Switch and connectors × 1 7.88