Drive it in your browser: https://huggingface.co/spaces/tuanhqv123/tars-mini
A 216 mm tall, 4-servo robot in the style of TARS. The repo holds the printable CAD, a MuJoCo simulation built from the CAD, and the PPO policies trained in it.
results/tars_5_actions.gif (also as .mp4) shows the 5 actions in simulation:
Walk and turn play in real time. Lie-down and get-up play at 3× speed.
results/dance_sole47.gif: the 14 s dance (bob, sway, kicks, scissors, bow), scripted keyframes, no training.
| Part | Notes |
|---|---|
| 4× Waveshare ST3215 servo, 12 V version (SKU 22414) | 2 leg swing, 2 leg height (slide via crank) |
| Waveshare ESP32-S3-LCD-1.54 | brain, screen, mics, speaker |
| Waveshare Bus Servo Adapter (A) | servo bus on the board's UART pads (jumper on A, RX–RX / TX–TX, 1 Mbps) |
| 2× 18650 (2S, 7.4 V), 2S BMS, 5 V buck, switch, bought locally | the servos run straight from 2S; the board gets 5 V through its USB-C port |
PLA body, TPU soles 47 mm deep (= foot size), as in cad/out/stl |
default build. 90 mm deep soles are an option for the faster walk below |
Power check before building: Waveshare rates the Bus Servo Adapter (A) at 9–12.6 V input, and 2S gives 6.0–8.4 V. The ST3215 12 V servo itself is rated 6–12.6 V, so 2S is in range for the servos. Test the adapter on 2S with one servo first: it must read the servo position and move it. The policies are trained for 2S. On 3S without retraining, the 47 mm-sole walk fell 2/24 and the turn 4/48 (2S: 0/24 and 2/48).
| Action | Result | Model / script |
|---|---|---|
| Walk | 9.0 cm/s, 0/72 falls, servos above 90 % load ~1 % of the time | rl/models/accepted_walk6_vault12 |
| Turn right / left | 25.7 / 25.3 deg/s, 0/24 falls each | rl/models/accepted_turn3_sole90 (left = mirrored right policy, rl/mirror_turn_lib.py) |
| Lie down + stand up | 24/24, servo peak 35 % | sim/liedown_sole90.py (lean +60, ends on its back, screen up) |
| Get up after a fall | 48/48 (24 face-down, 24 on its back) | sim/cad_verify_sole90.py |
| Mic + speaker stream to a server | not built yet | – |
cad/out/stl)| Action | Result | Model / script |
|---|---|---|
| Walk (2 legs step in turn, body helps carry ~56 %) | 4.7 cm/s, 0/24 falls | rl/models/accepted_walk6_fw16, GIF results/walk_sole47.gif |
| Turn right / left | 2/48 falls (24 robots × 2 directions, 8 s each) | rl/models/accepted_turn3 (left = mirrored) |
| Dance (14 s: bob, sway, kicks, scissors, bow) | 48/48 finish standing, max tilt 20°, servo peak 75 % | rl/dance.py (scripted keyframes, no training), GIF results/dance_sole47.gif |
| Lie down + stand up, get up after a fall | 48/48 each | rl/tricks.py |
Longer steps without retraining (rl/stride_scale_test.py, leg commands ×1.2 / ×1.4 / ×1.6): the legs swing 41 / 48 / 55° instead of 34°, but the walk gets slower (4.5 / 4.3 / 4.2 cm/s) and leans more on the body (63–69 %), with 1, 0 and 2 falls in 24 runs.
Soles: the CAD files in cad/out/stl have 47 mm soles, which match the 47 mm results. The 90 mm results need deeper soles: change foot_pad() in cad/tars_cad.py first.
The walk tops out at about 10 cm/s with this body. All the following were tried, and none beat about 10 cm/s:
rl/models/experimental_walk6_3s (3S battery) did 9.9 cm/s with 1 fall in 72 runs, so it was not accepted.
uv venv && uv pip install mujoco stable-baselines3 gymnasium imageio pillow cadquery
cd rl
# training-time settings are read from env vars at import
SYM=0 GAIT_MODE=vault GAIT_T=1.2 GAIT_AS=0.45 GAIT_AH=0.008 WALK_TARGET=0.08 PAD_D=0.090 REAL_SLEW=1 \
python render_walk_turn_sole90.py # walk + turn segment -> results/seg_walk_turn.gif
cd ../sim && python render_liedown_sole90.py && python render_fall_sole90.py && python combine_5_actions.py
rl/train.py, rl/finetune.py.rl/gate2.py. It evaluates every checkpoint and stops training on a pass.cad/ CadQuery source (tars_cad.py), STL/STEP exports, fit sweep and printability checks
sim/ MuJoCo model (model.py, sizes and masses from the CAD), scripted motions, renders
rl/ Gym env (tars_env.py), PPO training, gates, diagnostics, models/, tars_control.py (steerable controller)
space_web/ the browser Space: MuJoCo WASM + JS port of the controller, with port/behaviour checks
results/ GIFs, MP4s, JSON results