2. Add New Robot#

We are all excited about humanoid, now lets add a humanoid robot to MetaSim.

Common Usage#

python get_started/2_add_new_robot.py  --sim <simulator>

you can also render in the headless mode by adding --headless flag. By using this, there will be no window popping up and the rendering will also be faster.

By running the above command, you will add a new robot to MetaSim and it will automatically record a video.

Examples#

IsaacSim#

python get_started/2_add_new_robot.py  --sim isaacsim

Isaac Gym#

python get_started/2_add_new_robot.py  --sim isaacgym

Mujoco#

# For mac users, replace python with mjpython.
python get_started/2_add_new_robot.py  --sim mujoco --headless

Note that we find the non-headless mode of Mujoco is not stable. So we recommend using the headless mode.

Genesis#

python get_started/2_add_new_robot.py  --sim genesis

Note that we find the headless mode of Genesis is not stable. So we recommend using the non-headless mode.

Sapien#

python get_started/2_add_new_robot.py  --sim sapien3

Pybullet#

python get_started/2_add_new_robot.py  --sim pybullet

You will get the following videos:

Isaac Lab

Isaac Gym

MuJoCo

Genesis

SAPIEN

PyBullet

Code Highlights#

Robot Configuration: Create a custom RobotCfg with essential components:

robot = RobotCfg(
    name="new_robot_h1",
    num_joints=26,
    usd_path="roboverse_data/robots/h1/usd/h1.usd",
    mjcf_path="roboverse_data/robots/h1/mjcf/h1.xml", 
    urdf_path="roboverse_data/robots/h1/urdf/h1.urdf",
    actuators={
        "left_hip_yaw": BaseActuatorCfg(stiffness=200, damping=5),
        "left_knee": BaseActuatorCfg(stiffness=300, damping=6),
        # ... more joints
    },
    joint_limits={
        "left_hip_yaw": (-0.43, 0.43),
        "left_knee": (-0.26, 2.05),
        # ... more limits
    },
    control_type={
        "left_hip_yaw": "position",
        "left_knee": "position",
        # ... more control modes
    }
)

Key Components:

  • Asset paths: USD/MJCF/URDF files for different simulators

  • Actuators: Per-joint stiffness, damping, and torque limits

  • Joint limits: Min/max ranges for each joint

  • Control types: Position, velocity, or effort control per joint

For detailed RobotCfg configuration options, see the Robot Configuration section in the concept documentation.