humanoidlerobotlerobot-humanoidhuggingfacebipedal3d-printingrobstridemjlabsim2realopen-sourcehumanoid

LeRobot Humanoid $2500: Build Bipedal 3D-In Từ Zero

Hướng dẫn build LeRobot Humanoid $2500 từ HuggingFace — bipedal robot 3D-in full open-source: BOM, sim MJLab, training RL và deploy real-world cho beginner.

Nguyễn Anh Tuấn27 tháng 5, 202612 phút đọc
LeRobot Humanoid $2500: Build Bipedal 3D-In Từ Zero

Ngày 21/05/2026, HuggingFace tung ra LeRobot Humanoid — một bipedal robot full open-source, in 3D phần lớn, chi phí tổng cộng chỉ ~$2,500 USD. Toàn bộ stack được mở: hardware (BOM, STL, wiring), runtime control, identification pipeline, training environments (MJLab) và policy zoo. Đây là "Raspberry Pi moment" của humanoid robotics — lần đầu một researcher hoặc university lab ở Việt Nam có thể build robot hai chân thật, train policy bằng RL và deploy real-world chỉ với chi phí bằng một chiếc laptop trung cấp.

Bài này sẽ hướng dẫn từng bước: từ đặt hàng motor Robstride, in 3D 75 part PLA+, ráp 12-DOF lower body, cài MJLab simulator, train walking policy bằng PPO, đến deploy sim2real lên robot thật. Tất cả viết cho người mới — không cần background humanoid hay reinforcement learning chuyên sâu.

LeRobot Humanoid concept

1. Vì sao LeRobot Humanoid quan trọng?

Trước LeRobot Humanoid, muốn nghịch bipedal humanoid thật bạn có hai con đường:

  • Mua robot thương mại: Unitree G1 ($16,000+), Booster T1 ($35,000+), Fourier GR-1 ($150,000+), Tesla Optimus (chưa bán) — quá đắt cho 99% labs ở Việt Nam.
  • Build robot từ scratch: Berkeley Humanoid Lite ($5,000+) cần shop xưởng CNC, hoặc tự thiết kế mechanism — tốn nhiều tháng và rủi ro thiết kế sai.

LeRobot Humanoid khác biệt ở chỗ toàn bộ workflow được khép kín và validate:

  1. Hardware: 75 file STL in 3D + BOM cụ thể với mã hàng Robstride, Norelem — không tự design lại.
  2. Design tool: Có sẵn simplified robot representation để bạn evaluate motor sizing trước khi đặt hàng.
  3. Runtime: Cùng một interface chạy được trong sim (MJLab) và trên robot thật — không phải viết hai code path khác nhau.
  4. Identification: Pipeline tự động fit MuJoCo parameter từ log robot thật → đóng sim2real gap.
  5. Training zoo: MJLab environments + policy template — chỉ cần python train.py là chạy được.

Toàn bộ project sống trong GitHub org Virgileboat, license Apache 2.0, đã có 40+ community contributors. Đây không phải là một paper rồi bỏ — đây là một living platform đang được dùng để publish research thực sự.

2. Tổng quan kiến trúc & BOM

LeRobot Humanoid bipedal hiện tại gồm 12 motor active chia ở phần thân dưới và hip, với upper body đơn giản (torso passive). Cụ thể BOM:

2.1. Motor Robstride (~$1,880)

Motor Số lượng Vị trí Đặc điểm
Robstride O0 2 Torso connection Mini, ~$125/cái
Robstride O2 2 Hip Z-axis Yaw, ~$145/cái
Robstride O3 4 Thigh (hip pitch/roll, knee) Mid-power, ~$225/cái
Robstride O5 4 Shin & ankle High-power, ~$110/cái

Toàn bộ motor giao tiếp qua CAN FD bus, dùng adapter SAVVYCANFD 2CH. Đây là điểm khác biệt lớn so với Berkeley Humanoid Lite (dùng Dynamixel) hay SO-100 (dùng Feetech) — Robstride cho torque cao hơn nhưng setup CAN bus phức tạp hơn UART servo. Đọc thêm Berkeley Humanoid Lite build guide để so sánh.

2.2. Phần in 3D (~$56)

  • 75 STL parts trong lerobot-humanoid-hardware/stl/
  • Vật liệu khuyến nghị: PLA+ ~3.5 kg filament
  • Máy in tối thiểu: 220x220x250mm (Ender 3 V2, Prusa Mini đều OK)
  • Subassembly: torso, hip_x, hip_z, thigh, knee_mechanism, shin, ankle_mechanism, ankle, foot

Lưu ý quan trọng: một số part chịu lực cao (thigh, knee) nên in ở 80% infill, 5 perimeters. Phần shell ngoài có thể 20% infill bình thường.

2.3. Electronics (~$200)

  • Raspberry Pi 5 (8GB): controller chính, chạy LeRobot runtime
  • BNO055 hoặc BNO085: IMU 9-DOF, đo orientation cho balance
  • SAVVYCANFD 2CH: CAN FD adapter, kết nối Pi với motor
  • Power cables 2.5mm + communication cables (color-coded)
  • Battery LiPo 6S 5000mAh hoặc PSU bench 24V/15A để test bench

2.4. Cơ khí phụ (~$200)

  • Bearings: 35x72x17 (×4), 15x21x4 (×14), 5x16x5 (×8)
  • Spherical joints Norelem 27628-01-05 (×8) — cho ankle mechanism
  • Shoulder screws ISO7379 + bộ M2-M5 đầy đủ chiều dài

Total: ~$2,635 USD (giá tháng 4/2026, không gồm shipping về VN).

Chi phí thực tế ở Việt Nam: Cộng thêm ~$300-500 cho shipping + thuế (motor Robstride đặt từ China), filament PLA+ local mua thoải mái, Raspberry Pi 5 8GB ở VN ~3.5 triệu. Tổng budget thực tế: 70-75 triệu VND.

3. Phase 1 — Đặt hàng & in 3D (1-2 tuần)

3.1. Đặt motor

Robstride có thể đặt trực tiếp qua openelab.io (đã có set chuyên cho LeRobot Humanoid, ~$1,880 đã gồm cable + adapter). Đây là cách nhanh nhất, ship 2-3 tuần về VN.

Pitfall: Đừng đặt nhầm phiên bản O3 v1.0 — yêu cầu O3 v2.0 có firmware mới hỗ trợ CAN FD ở 2Mbps.

3.2. In STL

Clone repo và bắt đầu in song song:

git clone https://github.com/Virgileboat/lerobot-humanoid-hardware.git
cd lerobot-humanoid-hardware/stl

Mỗi STL có file metadata .json ghi rõ infill %, perimeters, support. Mở bằng PrusaSlicer hoặc Cura, import preset, slice rồi in. Với 1 máy in tốc độ 200mm/s, in hết 75 part mất khoảng 8-10 ngày in liên tục — nếu có 2 máy in song song thì 4-5 ngày.

3.3. Test motor trước khi assembly

Đây là bước CRITICAL mọi người hay skip. Sau khi nhận motor, test từng cái trên bench trước khi lắp:

# Cài robstride-can python lib
pip install robstride

# Test ping motor ID 1
python -m robstride ping --id 1 --interface can0

# Spin 1 vòng
python -m robstride spin --id 1 --speed 30 --time 2

Nếu motor không phản hồi hoặc kêu lạ → liên hệ vendor đổi ngay, đừng đợi lắp xong mới test.

3D printed humanoid parts

4. Phase 2 — Assembly (3-5 ngày)

Repo lerobot-humanoid-hardware/assembly/ có tài liệu PDF + ảnh step-by-step cho từng subassembly. Quy trình lắp ráp recommended:

1. Foot + ankle_mechanism (2 chân, ngày 1)
2. Shin + ankle (2 chân, ngày 2)
3. Knee_mechanism + thigh (2 chân, ngày 3)
4. Hip_z + hip_x (2 chân, ngày 3 chiều)
5. Torso + ráp 2 chân vào (ngày 4)
6. Wiring + CAN bus + power (ngày 4-5)

Tips quan trọng từ community:

  • Bearing fitment: Bearings ép vào part PLA — nếu lỏng, dùng super glue mỏng vào outer race. KHÔNG dùng hammer mạnh — sẽ vỡ part PLA.
  • Cable routing: Để dư cable 15-20cm tại mỗi khớp để có space cho motion. Dây CAN bus nên dùng twisted pair giảm noise.
  • CAN bus termination: Đặt resistor 120 ohm ở đầu và cuối chain — không có là motor disconnect ngẫu nhiên.
  • Safety: Lắp E-stop button dây cứng cắt nguồn motor (không qua software) ngay từ đầu.

Sau khi ráp xong, đừng vội cấp nguồn 24V. Test từng motor qua CAN với power 12V trước, đảm bảo ID đúng, motion smooth, không kẹt cơ học.

5. Phase 3 — Cài software stack

5.1. Cài LeRobot core

Trên laptop dev (Ubuntu 22.04 hoặc 24.04):

# Python 3.11
conda create -n lerobot python=3.11 -y
conda activate lerobot

# Clone & install
git clone https://github.com/huggingface/lerobot.git
cd lerobot
pip install -e ".[all]"

Reference đầy đủ workflow LeRobot xem ở LeRobot ecosystem guideVLA + LeRobot framework intro.

5.2. Cài LeRobot Humanoid stack

# Runtime — chạy real robot & sim
git clone https://github.com/Virgileboat/lerobot-humanoid-runtime.git
cd lerobot-humanoid-runtime && pip install -e .

# Model — URDF/MJCF assets
git clone https://github.com/Virgileboat/lerobot-humanoid-model.git
cd lerobot-humanoid-model && pip install -e .

# Identification — sim2real param fitting
git clone https://github.com/Virgileboat/lerobot-humanoid-identification.git

# Training zoo — RL environments
git clone https://github.com/Virgileboat/lerobot-legged-zoo.git
cd lerobot-legged-zoo && pip install -e .

5.3. Verify simulation chạy

# Chạy demo standing policy có sẵn
python -m lerobot_humanoid_runtime.demos.stand_sim \
  --model lerobot-humanoid-v1 \
  --simulator mjlab \
  --headless false

Nếu mở ra cửa sổ MuJoCo và robot đứng vững → bạn đã setup đúng. Nếu robot ngã ngay → có thể model URDF chưa load đúng inertia.

6. Phase 4 — Train walking policy (1-3 ngày)

LeRobot Humanoid dùng MJLab (built on MuJoCo XLA) làm parallel simulator — tương đương Isaac Lab nhưng nhẹ hơn, không cần GPU NVIDIA mạnh.

6.1. Walking policy với PPO

cd lerobot-legged-zoo

# Train PPO walking task — 4096 envs parallel
python train.py \
  --task lerobot_humanoid_walk \
  --algo ppo \
  --num_envs 4096 \
  --total_timesteps 50_000_000 \
  --save_dir ./runs/walk_v1

Với GPU RTX 4090 hoặc A100, train 50M timesteps mất ~6-8 giờ. Với RTX 3060 12GB, giảm xuống --num_envs 1024 và train qua đêm là OK.

Reward design (đã tune sẵn trong env):

  • Forward velocity tracking (chính)
  • Upright orientation penalty
  • Joint torque penalty (smoothness)
  • Foot contact symmetry (gait quality)
  • Termination on fall (z < 0.5m)

Đọc sâu hơn về reward shaping cho humanoid: RL Humanoid series — Reward designBooster Gym ICRA 2026 sim2real.

6.2. Curriculum learning

LeRobot Humanoid recommend curriculum 3 stage:

  1. Standing (5M steps) — học giữ thăng bằng tại chỗ
  2. Walking forward slow (15M steps) — vel = 0.3 m/s
  3. Walking + turning + perturbation (30M steps) — vel = 0.5 m/s + random push

Curriculum giảm 60% thời gian train so với train end-to-end và policy stable hơn nhiều khi deploy real.

7. Phase 5 — Sim2Real với identification pipeline

Đây là phần nhiều humanoid project bỏ qua nhưng LeRobot Humanoid làm rất bài bản.

7.1. Thu log từ robot thật

# Robot chạy passive với gravity comp, ghi state
python -m lerobot_humanoid_runtime.log_passive \
  --duration 60 \
  --output ./logs/passive_run.parquet

Trong khi log, push nhẹ robot bằng tay tạo motion ngẫu nhiên.

7.2. Fit MuJoCo params

cd lerobot-humanoid-identification

# CMA-ES optimize damping, friction, motor delay
python identify.py \
  --real_log ./logs/passive_run.parquet \
  --mjcf ../lerobot-humanoid-model/mjcf/biped.xml \
  --output ./fitted_params.yaml \
  --iters 500

Pipeline dùng MJWarp replay action thật vào sim, optimize damping/friction/motor_delay sao cho state error tối thiểu giữa sim và real. Output là YAML mới được merge vào MJCF.

7.3. Re-train với params fitted

Train lại walking policy với MJCF đã fit — đây gọi là system identification + domain randomization combine. Kết quả từ paper LeRobot: policy stable hơn 3-5x khi deploy real.

Đọc sâu sim2real: Sim2Real cho dexterous humanoid.

8. Phase 6 — Deploy real & first walk

8.1. Pre-flight checklist

  • E-stop button hoạt động (test cắt nguồn)
  • Robot treo qua gantry hoặc rope lần đầu (an toàn)
  • Low-gain mode test — gain ~10% bình thường, robot lắc nhẹ là OK
  • IMU calibration (đặt phẳng, chạy runtime.calibrate_imu)
  • Joint zero — đứng pose mặc định, set zero offset

8.2. Deploy policy

python -m lerobot_humanoid_runtime.deploy \
  --policy ./runs/walk_v1/best.pt \
  --interface real \
  --command_freq 50 \
  --gain_scale 0.3   # bắt đầu LOW

Nếu robot bắt đầu đi mượt → tăng --gain_scale lên 0.5, rồi 0.8, rồi 1.0. KHÔNG bao giờ nhảy thẳng 1.0 lần đầu — motor có thể quá tải hoặc oscillate.

8.3. Tuning thực tế

Khi deploy thật, thường gặp:

  • Robot lắc tại chỗ: Tăng damping trong fitted_params, train lại.
  • Đi tốc độ chậm: Tăng reward forward_vel trong env, train lại.
  • Một chân đặt nặng hơn: Check IMU bias, hoặc joint offset có thể bị shift.

Với robot mới ráp lần đầu, chấp nhận robot đi loạng choạng 2-3 ngày đầu — đây là phần "fun" của humanoid robotics. Trải nghiệm này không phải research lab nào cũng có cơ hội.

9. Kết quả & roadmap

Theo HuggingFace blog post chính thức (21/05/2026):

  • Standing policy validated trên hardware thật
  • Walking policy chạy được vận tốc 0.3-0.5 m/s
  • ✅ Repo có 147 stars, 11 forks sau 1 tuần release
  • 🔄 Sắp release: upper body arm (giai đoạn 2), policy cho terrain rough
  • 🔄 Community contribute: VLA integration (manipulation + locomotion combined)

So sánh nhanh với các bipedal robot khác cùng giá:

Robot Giá DOF Open-source? Sim2real pipeline
LeRobot Humanoid $2,500 12 Full ✅ Identification + zoo
Berkeley Humanoid Lite $5,000 22 CAD + RL code ⚠️ Partial
Booster T1 $35,000 23 SDK only ✅ Booster Gym
Unitree G1 $16,000 23+ SDK + Mujoco model ⚠️ Limited

LeRobot Humanoid không phải robot mạnh nhất, nhưng rẻ nhất + open nhất + có pipeline đầy đủ nhất cho người mới học humanoid. Đây là điểm khác biệt cốt lõi.

10. Pitfalls & lời khuyên cho beginner VN

  1. Đừng skip motor testing — Một motor lỗi sẽ làm hỏng cả buổi assembly nếu phát hiện ở giữa chain.
  2. In 3D đủ infill cho part chịu lực — Knee và thigh PHẢI 80% infill, không cắt giảm.
  3. CAN bus termination resistor — Quên là motor random disconnect, debug đau khổ.
  4. Train trên cloud nếu local yếu — RunPod RTX 4090 ~$0.5/hour, train 1 policy hết ~$5.
  5. Bắt đầu với standing policy có sẵn — Đừng cố train walking từ scratch ngày đầu. Verify hardware làm việc với checkpoint công khai trước.
  6. Document mọi thay đổi — Nếu bạn modify STL, fork repo và push lên GitHub. Community LeRobot rất active, có thể nhận PR back.

11. Bài viết liên quan


Nguồn:

NT

Nguyễn Anh Tuấn

Robotics & AI Engineer. Building VnRobo — sharing knowledge about robot learning, VLA models, and automation.

Khám phá VnRobo

Bài viết liên quan

NEWTutorial
GalaxeaVLA G0 Plus: Deploy Pick Up Anything 30 phút
galaxeag0-plusvlapick-up-anythingdockerzero-shothuggingfacerobot-manipulation

GalaxeaVLA G0 Plus: Deploy Pick Up Anything 30 phút

Hướng dẫn deploy GalaxeaVLA G0 Plus — VLA zero-shot Pick Up Anything bằng Docker trong 30 phút, code + checkpoint open-source trên HuggingFace.

22/5/202611 phút đọc
NEWTutorial
X-VLA ICLR 2026: Soft-Prompted VLA 0.9B cho beginner LeRobot
x-vlavlaiclr-2026soft-promptlerobotcross-embodimentflow-matchingliberomanipulation

X-VLA ICLR 2026: Soft-Prompted VLA 0.9B cho beginner LeRobot

Hướng dẫn X-VLA — flow-matching VLA 0.9B đạt SOTA trên 6 sim + 3 robot thật, native LeRobot, code open-source HuggingFace.

20/5/202611 phút đọc
Tutorial
Multitask DiT Policy LeRobot v0.5: 1 model nhiều task
lerobotmultitask-ditdiffusion-policycliptext-conditioningso-100so-101huggingfacemanipulationflow-matching

Multitask DiT Policy LeRobot v0.5: 1 model nhiều task

Hướng dẫn Multitask DiT Policy của LeRobot v0.5: train 1 policy cho nhiều task với CLIP text-conditioning, code open-source HuggingFace, deploy SO-100/SO-101.

18/5/202610 phút đọc