Skip to content

About

MuJoCo validation framework for a 500 mm, 23-joint humanoid prototype, covering TS20/HTDW actuator modeling, contact-aware motion tests, torque and power telemetry, calibration workflows, and nominal mechanical installation checks.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

TS20 Humanoid MuJoCo Validation

MuJoCo-based validation tools for a 500 mm, 23-joint humanoid prototype. The project combines a parametric MJCF model, whole-body contact-aware motion tests, actuator torque and power telemetry, calibration workflows, and nominal motor-envelope checks.

The model is intended for early mechanical and actuator sizing. It lets you test the proposed geometry and mass assumptions before committing to a complete CAD assembly.

What is included

  • ts20_humanoid_v2.xml — the current MJCF model with 23 actuated joints, ground contact, sensors, and actuator limits.
  • run_tests.py — runs standing, repeated squat, single-leg support, and slow walking experiments. It records joint angle, speed, torque, mechanical power, foot contact, tracking error, saturation, and overload time.
  • results/index.html — a local summary of the latest passing rated-torque runs, with links to per-run interactive reports.
  • calibration.py — imports measured body mass, center of mass, and inertia, and fits candidate single-axis inertia/friction parameters from bench data.
  • installation_check.py — screens nominal Ø20 × 35 mm actuator envelopes against the idealized model at the available keyframes.
  • render_replay.py — renders a saved simulation state from a recorded run.
  • upgrade_model.py — regenerates the current v2 model and actuator configuration from the original prototype model.
  • Start_Tests.cmd / launcher.py — Windows launcher for the test menu.
  • test_validation.py — focused checks for actuator limits, motion sequencing, calibration validation, and envelope screening.

Current model

The humanoid is approximately 500 mm tall and uses the following initial geometry:

Parameter Value
Ground to ankle 40 mm
Ankle to knee 135 mm
Knee to hip 120 mm
Hip to waist 35 mm
Waist to shoulder 70 mm
Shoulder to neck 15 mm
Neck to head top 85 mm
Hip spacing 80 mm
Shoulder spacing 145 mm
Foot length × width 100 × 55 mm

The current configured mass is approximately 4.44 kg. It includes a 2.0 kg torso configuration and six HTDW-5036DNE lower-limb actuator replacements. Other link masses remain first-pass estimates and should be replaced with measured or CAD-derived values before making hardware decisions.

The digital skeleton uses idealized, coincident joint centers at several multi-axis joints. Self-collision is disabled while the geometry is being refined. The model therefore supports dynamics and control experiments, but it is not yet a manufacturing-ready assembly.

Actuator assumptions

The model records the supplied actuator data as output-side limits:

Actuator Rated torque Peak or locked-rotor value Reference speed
TS20-50 0.7 Nm 2 Nm for 300 ms 31.4 rad/s no-load
TS20-100 1.5 Nm 4 Nm for 300 ms 15.7 rad/s no-load
HTDW-5036-02-DNE 6 Nm 21 Nm locked-rotor value 75 RPM no-load

The six high-load lower-limb joints use the HTDW module in the current configuration: left/right hip roll, knee, and ankle pitch. The catalog does not define a safe motion peak duration for its locked-rotor value, so the model caps motion torque at the 6 Nm rated value and does not treat 21 Nm as a usable transient limit.

The TS20 MIT-style control law is represented as:

[ \tau = K_p(\theta_{des}-\theta) + K_d(\omega_{des}-\omega) + \tau_{des} ]

The supplied actuator documents do not provide a loaded torque-speed map, efficiency, thermal recovery model, motor constants, or control delay. Mechanical power in the reports is output torque multiplied by output angular velocity; it is not battery input power.

Run the tests on Windows

Double-click Start_Tests.cmd and choose an experiment. The launcher supports:

  1. Standing
  2. Repeated squat
  3. Single-leg support
  4. Slow walking
  5. All tests without opening a viewer
  6. Motor-envelope installation screening
  7. Calibration templates

The test instructions are available in 使用说明.md. To run a test directly from PowerShell:

$robotPython = 'C:\Users\Foots\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe'
& $robotPython -X utf8 run_tests.py --motion squat --viewer
& $robotPython -X utf8 run_tests.py --motion walk --policy peak-budget

Each run creates a directory under results/ containing:

  • report.html — interactive torque, speed, power, and tracking plots;
  • timeseries.csv — recorded samples;
  • joint_statistics.csv — peak torque, RMS torque, peak speed, peak mechanical power, overload time, and saturation time;
  • summary.json — pass/fail evidence and model/controller hashes;
  • replay.npz — saved simulation states;
  • snapshots and model/configuration copies for traceability.

The latest summary is results/index.html.

Calibration and installation checks

calibration.py --templates creates input templates for measured body properties and bench measurements. A measured model is only generated when the supplied values pass numerical and physical checks. A bench fit is reported as a candidate fit and remains marked uncalibrated until it is independently validated.

installation_check.py uses nominal actuator cylinders to find obvious envelope conflicts in the idealized keyframes. The current report intentionally does not claim that the robot is mechanically installable: the repository contains one actuator part file, not a complete robot assembly with brackets, bearings, fasteners, cable routing, and manufacturing tolerances.

Validation status

The included rated-torque simulations currently complete the standing, repeated-squat, single-leg-support, and slow-walking scenarios under the configured estimated mechanics. These are simulation results only. They do not establish that the selected actuators can meet a real torque-speed curve, thermal duty cycle, structural load, or mechanical packaging requirement.

Before using the results for hardware selection:

  1. Replace estimated link properties with measured or CAD-derived mass, center of mass, and inertia.
  2. Import real actuator mounting locations and axis offsets.
  3. Provide loaded torque-speed, efficiency, temperature, and duty-cycle data.
  4. Validate the controller and torque sensors on a single-axis bench.
  5. Re-run the motion tests with the complete assembly and measured parameters.

Source data

The TS20 limits are transcribed from KK-servo-datasheet-v0.1.pdf. HTDW-5036DNE values are transcribed from the supplied product-catalog material. The original shared design discussion is linked in the project history; the repository does not treat either source as a substitute for manufacturer validation or hardware measurements.

About

MuJoCo validation framework for a 500 mm, 23-joint humanoid prototype, covering TS20/HTDW actuator modeling, contact-aware motion tests, torque and power telemetry, calibration workflows, and nominal mechanical installation checks.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages