protomotions.robot_configs module#

Robot configuration classes defining morphology and control parameters.

Base Configuration#

class protomotions.robot_configs.base.RobotConfig(
asset,
common_naming_to_robot_body_names=<factory>,
default_root_height=1,
semantic_forward_axis_xy=None,
default_dof_pos=None,
contact_bodies=None,
trackable_bodies_subset='all',
non_termination_contact_bodies='all',
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name=None,
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)[source]#

Bases: object

Configuration for robot morphology and control parameters.

Defines all robot-specific parameters including asset files, body names, control settings, and physical properties. Each robot (SMPL, G1, etc.) should subclass this and provide robot-specific values.

Key configuration areas:

  • Asset: Robot mesh/URDF files and physical properties

  • Body Names: Named body parts for tracking and observations

  • Control: PD gains, action scales, and control modes

  • Kinematic Info: Joint structure extracted from MJCF/URDF

  • Simulator Params: Simulator-specific overrides

Example:

config = RobotConfig(
    semantic_forward_axis_xy=(1.0, 0.0),
    asset=RobotAssetConfig(asset_file_name="robot.xml"),
    control=ControlConfig(control_type=ControlType.BUILT_IN_PD)
)
asset: RobotAssetConfig#
common_naming_to_robot_body_names: Dict[str, List[str]]#
default_root_height: float = 1#
semantic_forward_axis_xy: Tuple[float, float] | None = None#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_dof_pos: List[float] | MockTensor | Dict[str, float] | None = None#
contact_bodies: List[str] | str | None = None#
trackable_bodies_subset: List[str] | str = 'all'#
non_termination_contact_bodies: List[str] | str = 'all'#
init_state: InitState | None = None#
reset_noise: RobotNoiseConfig | None = None#
mimic_small_marker_bodies: List[str] | None = None#
anchor_body_name: str | None = None#
contact_pairs_multiplier: int = 16#
control: ControlConfig#
kinematic_info: KinematicInfo#
number_of_actions: int#
anchor_body_index: int#
simulation_params: SimulatorParams#
__post_init__()[source]#

Compute derived fields after initialization.

update_fields(**kwargs)[source]#

Update robot config fields and reprocess derived fields.

This is useful when you need to modify fields after initialization without manually calling __post_init__.

Parameters:

**kwargs – Fields to update on the robot config

__init__(
asset,
common_naming_to_robot_body_names=<factory>,
default_root_height=1,
semantic_forward_axis_xy=None,
default_dof_pos=None,
contact_bodies=None,
trackable_bodies_subset='all',
non_termination_contact_bodies='all',
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name=None,
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)#

SMPL Humanoid#

class protomotions.robot_configs.smpl.SmplRobotConfig(asset: protomotions.robot_configs.base.RobotAssetConfig = <factory>, common_naming_to_robot_body_names: Dict[str, str] = <factory>, default_root_height: float = 0.95, semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0), default_dof_pos: Union[List[float], MockTensor, Dict[str, float], NoneType] = None, contact_bodies: Union[List[str], str, NoneType] = None, trackable_bodies_subset: List[str] = <factory>, non_termination_contact_bodies: List[str] = <factory>, init_state: Optional[protomotions.robot_configs.base.InitState] = None, reset_noise: Optional[protomotions.simulator.base_simulator.config.RobotNoiseConfig] = None, mimic_small_marker_bodies: Optional[List[str]] = None, anchor_body_name: Optional[str] = None, contact_pairs_multiplier: int = 16, control: protomotions.robot_configs.base.ControlConfig = <factory>, simulation_params: protomotions.robot_configs.base.SimulatorParams = <factory>)[source]#

Bases: RobotConfig

semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0)#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_root_height: float = 0.95#
simulation_params: SimulatorParams#
__init__(
asset=<factory>,
common_naming_to_robot_body_names=<factory>,
default_root_height=0.95,
semantic_forward_axis_xy=(1.0,
0.0),
default_dof_pos=None,
contact_bodies=None,
trackable_bodies_subset=<factory>,
non_termination_contact_bodies=<factory>,
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name=None,
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)#

SMPL-X Humanoid#

class protomotions.robot_configs.smplx.SMPLXRobotConfig(asset: protomotions.robot_configs.base.RobotAssetConfig = <factory>, common_naming_to_robot_body_names: Dict[str, List[str]] = <factory>, default_root_height: float = 0.95, semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0), default_dof_pos: Union[List[float], MockTensor, Dict[str, float], NoneType] = None, contact_bodies: List[str] = <factory>, trackable_bodies_subset: Union[List[str], str] = 'all', non_termination_contact_bodies: List[str] = <factory>, init_state: Optional[protomotions.robot_configs.base.InitState] = None, reset_noise: Optional[protomotions.simulator.base_simulator.config.RobotNoiseConfig] = None, mimic_small_marker_bodies: List[str] = <factory>, anchor_body_name: Optional[str] = None, contact_pairs_multiplier: int = 20, control: protomotions.robot_configs.base.ControlConfig = <factory>, simulation_params: protomotions.robot_configs.base.SimulatorParams = <factory>)[source]#

Bases: RobotConfig

semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0)#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_root_height: float = 0.95#
contact_pairs_multiplier: int = 20#
simulation_params: SimulatorParams#
__init__(
asset=<factory>,
common_naming_to_robot_body_names=<factory>,
default_root_height=0.95,
semantic_forward_axis_xy=(1.0,
0.0),
default_dof_pos=None,
contact_bodies=<factory>,
trackable_bodies_subset='all',
non_termination_contact_bodies=<factory>,
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=<factory>,
anchor_body_name=None,
contact_pairs_multiplier=20,
control=<factory>,
simulation_params=<factory>,
)#

Unitree H1 (Version 2)#

class protomotions.robot_configs.h1_2.H1_2RobotConfig(asset: protomotions.robot_configs.base.RobotAssetConfig = <factory>, common_naming_to_robot_body_names: Dict[str, List[str]] = <factory>, default_root_height: float = 1.03, semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0), default_dof_pos: Union[List[float], MockTensor, Dict[str, float], NoneType] = None, contact_bodies: Union[List[str], str, NoneType] = None, trackable_bodies_subset: List[str] = <factory>, non_termination_contact_bodies: Union[List[str], str] = 'all', init_state: Optional[protomotions.robot_configs.base.InitState] = None, reset_noise: Optional[protomotions.simulator.base_simulator.config.RobotNoiseConfig] = None, mimic_small_marker_bodies: Optional[List[str]] = None, anchor_body_name: Optional[str] = None, contact_pairs_multiplier: int = 16, control: protomotions.robot_configs.base.ControlConfig = <factory>, simulation_params: protomotions.robot_configs.base.SimulatorParams = <factory>)[source]#

Bases: RobotConfig

semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0)#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_root_height: float = 1.03#
simulation_params: SimulatorParams#
__init__(
asset=<factory>,
common_naming_to_robot_body_names=<factory>,
default_root_height=1.03,
semantic_forward_axis_xy=(1.0,
0.0),
default_dof_pos=None,
contact_bodies=None,
trackable_bodies_subset=<factory>,
non_termination_contact_bodies='all',
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name=None,
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)#

Unitree G1#

class protomotions.robot_configs.g1.G1RobotConfig(asset: protomotions.robot_configs.base.RobotAssetConfig = <factory>, common_naming_to_robot_body_names: Dict[str, List[str]] = <factory>, default_root_height: float = 0.8, semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0), default_dof_pos: Dict[str, float] = <factory>, contact_bodies: Union[List[str], str, NoneType] = None, trackable_bodies_subset: List[str] = <factory>, non_termination_contact_bodies: Union[List[str], str] = 'all', init_state: Optional[protomotions.robot_configs.base.InitState] = None, reset_noise: Optional[protomotions.simulator.base_simulator.config.RobotNoiseConfig] = None, mimic_small_marker_bodies: Optional[List[str]] = None, anchor_body_name: str = 'torso_link', contact_pairs_multiplier: int = 16, control: protomotions.robot_configs.base.ControlConfig = <factory>, simulation_params: protomotions.robot_configs.base.SimulatorParams = <factory>)[source]#

Bases: RobotConfig

semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0)#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_root_height: float = 0.8#
anchor_body_name: str = 'torso_link'#
simulation_params: SimulatorParams#
__init__(
asset=<factory>,
common_naming_to_robot_body_names=<factory>,
default_root_height=0.8,
semantic_forward_axis_xy=(1.0,
0.0),
default_dof_pos=<factory>,
contact_bodies=None,
trackable_bodies_subset=<factory>,
non_termination_contact_bodies='all',
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name='torso_link',
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)#

AMP Humanoid#

class protomotions.robot_configs.amp.AMPRobotConfig(asset: protomotions.robot_configs.base.RobotAssetConfig = <factory>, common_naming_to_robot_body_names: Dict[str, List[str]] = <factory>, default_root_height: float = 0.8, semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0), default_dof_pos: Union[List[float], MockTensor, Dict[str, float], NoneType] = None, contact_bodies: Union[List[str], str, NoneType] = None, trackable_bodies_subset: List[str] = <factory>, non_termination_contact_bodies: Union[List[str], str] = 'all', init_state: Optional[protomotions.robot_configs.base.InitState] = None, reset_noise: Optional[protomotions.simulator.base_simulator.config.RobotNoiseConfig] = None, mimic_small_marker_bodies: Optional[List[str]] = None, anchor_body_name: Optional[str] = None, contact_pairs_multiplier: int = 16, control: protomotions.robot_configs.base.ControlConfig = <factory>, simulation_params: protomotions.robot_configs.base.SimulatorParams = <factory>)[source]#

Bases: RobotConfig

semantic_forward_axis_xy: Tuple[float, float] = (1.0, 0.0)#

Robot-local xy axis that points in the anatomical facing direction.

This is intentionally 2D, not 3D. ProtoMotions assumes Z-up humanoid assets, so heading should only choose the horizontal anatomical forward direction. Keeping the field in xy avoids using a forward vector with a vertical component that would require re-orienting the robot to stand upright before heading logic can be applied.

Fresh robot configs must declare this explicitly. Legacy pickled configs that predate the field are handled at runtime by helper fallbacks so old checkpoints keep loading with their original +X convention. To identify the axis for a new robot, run python scripts/identify_robot_facing_axis.py --robots <robot-name> --view.

default_root_height: float = 0.8#
simulation_params: SimulatorParams#
__init__(
asset=<factory>,
common_naming_to_robot_body_names=<factory>,
default_root_height=0.8,
semantic_forward_axis_xy=(1.0,
0.0),
default_dof_pos=None,
contact_bodies=None,
trackable_bodies_subset=<factory>,
non_termination_contact_bodies='all',
init_state=None,
reset_noise=None,
mimic_small_marker_bodies=None,
anchor_body_name=None,
contact_pairs_multiplier=16,
control=<factory>,
simulation_params=<factory>,
)#