Thanh Le / bench notes
ROBOTICS · ROBOT HUB · IN PROGRESS

Humanoid (17-servo biped)

My thesis robot, brought back as a model: my own C++ kinematics library, MuJoCo physics, an online walker with IMU feedback

#robotics#kinematics#simulation#servo
Last change2026-11-22: hub page with three STAR write-ups

Humanoid (17-servo biped)

Same sideways push in MuJoCo: open loop falls, IMU feedback stays up

This is the small biped from my undergraduate thesis: 17 hobby servos, a gait planned completely offline in MATLAB, sent as ASCII position commands over a 9600 baud UART to a microcontroller that played the frames back. It never read anything back from a servo. The original build, with the video of the real thing, is still on its own page: where it started.

In September 2026 I ported the code to Python and C++ and asked a simple question: does the inverse kinematics actually hit its targets? It didn’t. Every frame of the walk was off by 166 mm (median), and the 42 unit tests passed anyway because they only checked array shapes. That started a month of evenings on the model.

What works now is all in simulation, and I want to be clear about that. The leg IK runs on my own C++ kinematics library and reaches every gait target to 1 µm. The robot lives in MuJoCo with the servos I actually own (DYNAMIXEL MX-28 for the legs, AX-12A for the arms), held inside their torque and speed limits. A walker running at 50 Hz keeps it upright with IMU feedback, and it can wave, squat, dance, kick and do a very small jump. The masses are my guesses (about 1.3 kg in plastic), not weighed parts.

The stories

#StoryResultStatus
1 Humanoid Robot: my thesis project
A small humanoid on SG90 servos: SolidWorks model, DH table, inverse kinematics, then the real thing
17 SG90s walking on the floor from angles I computed myself, played back over 9600-baud serial Done
2 Leg IK that misses by 166 mm, and the two sign errors behind it
Swapping the old NumPy solver for my C++ kinematics library, then finding the bug wasn't in the IK at all
600 of 600 gait targets within 1 µm (was 166 mm median), the whole walk solved in 0.28 s instead of 38.6 s Done
3 Walking in MuJoCo: two feet in one place, and the one feedback that paid
An online LIPM walker at 50 Hz, a simulation bug that faked every torque number, and capture steps that made things worse
In MuJoCo, IMU feedback lifts the push margin from 1075 to 1338 mN·s (+24 %); steps up to 40 mm walk, 50 mm falls Done
4 Arms, a dance and a 2 mm jump
Two 3-joint AX-12A arms, five whole-body motions on the same balance, and servo speed limits that keep the jump honest
In MuJoCo wave, squat, dance and kick stay up (tilt ≤ 2°); the jump is 0.08 s in the air with the CoM 2.1 mm up Done

Still open

None of this has touched a real servo yet. I have a ten-phase plan for the hardware (read one servo, set IDs and baud rates, hold a pose, then walk) and the bench scripts for the first phases, but they’ve only run against a fake port. There’s no IMU on the robot either, so the feedback that pays off in the sim is still hypothetical. Smaller gaps: the pelvis can’t bow, the arms have no collision, and the masses and servo stiffness need measuring on a bench before I trust any margin to better than ±100 mN·s.