SmplHumanoid¶
SmplHumanoid is a rigid articulated humanoid model loaded from SMPL-compatible MJCF XML variants.
Setup¶
SmplHumanoid downloads its XML assets from the public abcamiletto/body-models Hugging Face repository. To prefetch and save the hosted path:
# Download the SmplHumanoid MJCF XML assets.
body-models download smpl-humanoid
The hosted folder includes license/provenance notes for the XML variants.
API¶
body_models.robots.smpl_humanoid.numpy.SmplHumanoid
¶
SmplHumanoid(source='humenv')
Bases: RigidBodyModel
Rigid humanoid loaded from MJCF using the canonical 24-joint SMPL hierarchy.
| METHOD | DESCRIPTION |
|---|---|
joint_index |
Resolve a standard joint to this model's native joint index. |
unpack_pose |
Unpack a flattened pose |
pack_pose |
Pack |
to_qpos |
Build full MuJoCo |
| ATTRIBUTE | DESCRIPTION |
|---|---|
common_joints |
Common anatomical joints mapped to this model's native joint names.
TYPE:
|
num_actuated |
Number of actuated pose coordinates.
TYPE:
|
actuated_joint_slices |
Consecutive scalar coordinate slices keyed by actuated joint name.
TYPE:
|
Source code in src/body_models/robots/smpl_humanoid/numpy.py
23 24 25 26 27 | |
common_joints
property
¶
common_joints
Common anatomical joints mapped to this model's native joint names.
actuated_joint_slices
property
¶
actuated_joint_slices
Consecutive scalar coordinate slices keyed by actuated joint name.
joint_index
¶
joint_index(joint)
Resolve a standard joint to this model's native joint index.
Source code in src/body_models/base.py
190 191 192 193 194 195 196 197 198 | |
unpack_pose
¶
unpack_pose(pose)
Unpack a flattened pose [..., Q] into name -> [..., dof] arrays.
Source code in src/body_models/base.py
270 271 272 273 274 | |
pack_pose
¶
pack_pose(pose_by_joint)
Pack name -> [..., dof] arrays into a flattened pose [..., Q].
Source code in src/body_models/base.py
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 | |
to_qpos
¶
to_qpos(
body_pose,
global_translation=None,
*,
global_rotation=None,
clamp_to_limits=False,
)
Build full MuJoCo qpos as [root_xyz, root_wxyz, body_pose].
body_pose is the model's flattened scalar coordinate vector [..., Q].
The root prefix is converted from the model coordinate frame to MuJoCo's
coordinate frame.
Source code in src/body_models/base.py
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | |