Source code for protomotions.robot_configs.soma23

# SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

from protomotions.robot_configs.base import (
    RobotConfig,
    RobotAssetConfig,
    ControlConfig,
    ControlType,
    SimulatorParams,
)
from protomotions.simulator.isaacgym.config import IsaacGymSimParams
from protomotions.simulator.isaaclab.config import (
    IsaacLabPhysXParams,
    IsaacLabSimParams,
)
from protomotions.simulator.mujoco.config import MujocoSimParams
from protomotions.components.pose_lib import ControlInfo
from typing import List, Dict, Tuple
from dataclasses import dataclass, field


[docs] @dataclass class Soma23RobotConfig(RobotConfig): """ 23-body humanoid derived from SOMASkeleton30. Drops seven unactuated leaf end-effectors:: Jaw, LeftEye, RightEye, LeftHandThumbEnd, LeftHandMiddleEnd, RightHandThumbEnd, RightHandMiddleEnd Remaining 23 bodies (22 joints × 3-DOF hinge = 66 DOFs):: Hips (root), Spine1, Spine2, Chest, Neck1, Neck2, Head, RightShoulder, RightArm, RightForeArm, RightHand, LeftShoulder, LeftArm, LeftForeArm, LeftHand, RightLeg, RightShin, RightFoot, RightToeBase, LeftLeg, LeftShin, LeftFoot, LeftToeBase See mjcf/soma23_humanoid.xml for definition. """ semantic_forward_axis_xy: Tuple[float, float] = (0.0, -1.0) common_naming_to_robot_body_names: Dict[str, List[str]] = field( default_factory=lambda: { "all_left_foot_bodies": ["LeftFoot", "LeftToeBase"], "all_right_foot_bodies": ["RightFoot", "RightToeBase"], "all_left_hand_bodies": ["LeftHand"], "all_right_hand_bodies": ["RightHand"], "head_body_name": ["Head"], "torso_body_name": ["Chest"], } ) trackable_bodies_subset: List[str] = field( default_factory=lambda: [ "Hips", "Head", "LeftFoot", "RightFoot", "LeftHand", "RightHand", ] ) default_root_height: float = 0.95 asset: RobotAssetConfig = field( default_factory=lambda: RobotAssetConfig( asset_file_name="mjcf/soma23_humanoid.xml", max_linear_velocity=1000.0, max_angular_velocity=1000.0, angular_damping=0.0, linear_damping=0.0, ) ) control: ControlConfig = field( default_factory=lambda: ControlConfig( control_type=ControlType.BUILT_IN_PD, override_control_info={ "(Spine|Chest|Neck|Head).*": ControlInfo( effort_limit=300, velocity_limit=100 ), ".*(Shoulder|Arm|Hand)_.*": ControlInfo( effort_limit=150, velocity_limit=100 ), ".*(Leg|Shin|Foot|ToeBase)_.*": ControlInfo( effort_limit=300, velocity_limit=100 ), }, ) ) control_hz: int = 30 # Each passed block replaces (not merges with) the humanoid template for its # backend, so fields it omits are class defaults, not the humanoid tuning; # newton falls back to the humanoid default (120 fps). implicitfast treats # the PD damping implicitly (Euler only does that for joint damping), which # keeps stiff gains on light links stable. simulation_params: SimulatorParams = field( default_factory=lambda: SimulatorParams.humanoid( 30, isaacgym=IsaacGymSimParams(fps=60), isaaclab=IsaacLabSimParams( fps=120, physx=IsaacLabPhysXParams( num_position_iterations=4, num_velocity_iterations=4, max_depenetration_velocity=1, ), ), mujoco=MujocoSimParams(fps=960, integrator="implicitfast"), ) )