Source code for protomotions.robot_configs.amp
# SPDX-FileCopyrightText: Copyright (c) 2025 The ProtoMotions Developers
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from protomotions.robot_configs.base import (
RobotConfig,
RobotAssetConfig,
ControlConfig,
ControlType,
SimulatorParams,
)
from protomotions.simulator.isaacgym.config import IsaacGymSimParams
from protomotions.simulator.isaaclab.config import IsaacLabSimParams
from protomotions.simulator.genesis.config import GenesisSimParams
from protomotions.simulator.newton.config import NewtonSimParams
from typing import List, Dict
from dataclasses import dataclass, field
[docs]
@dataclass
class AMPRobotConfig(RobotConfig):
common_naming_to_robot_body_names: Dict[str, List[str]] = field(
default_factory=lambda: {
"all_right_foot_bodies": ["right_foot"],
"all_left_foot_bodies": ["left_foot"],
"all_left_hand_bodies": ["left_hand"],
"all_right_hand_bodies": ["right_hand"],
"head_body_name": ["head"],
"torso_body_name": ["torso"],
}
)
trackable_bodies_subset: List[str] = field(
default_factory=lambda: [
"torso",
"head",
"left_foot",
"right_foot",
"left_hand",
"right_hand",
]
)
default_root_height: float = 0.8
asset: RobotAssetConfig = field(
default_factory=lambda: RobotAssetConfig(
asset_file_name="mjcf/amp_humanoid.xml",
usd_asset_file_name="usd/amp_humanoid.usda",
usd_bodies_root_prim_path="/World/envs/env_.*/Robot/bodies/",
)
)
control: ControlConfig = field(
default_factory=lambda: ControlConfig(control_type=ControlType.BUILT_IN_PD)
)
simulation_params: SimulatorParams = field(
default_factory=lambda: SimulatorParams(
isaacgym=IsaacGymSimParams(
fps=60,
decimation=2,
substeps=2,
),
isaaclab=IsaacLabSimParams(
fps=120,
decimation=4,
),
genesis=GenesisSimParams(
fps=60,
decimation=2,
substeps=2,
),
newton=NewtonSimParams(
fps=120,
decimation=4,
),
)
)