Implementation:Haosulab ManiSkill UnitreeG1UpperBody
| Knowledge Sources | |
|---|---|
| Domains | Robotics, Simulation, Humanoid_Control |
| Last Updated | 2026-02-15 08:00 GMT |
Overview
Concrete tool for simulating the Unitree G1 humanoid robot upper body (with fixed legs) in ManiSkill environments.
Description
The UnitreeG1UpperBody class models the Unitree G1 humanoid with control limited to the torso rotation and both arms. The legs are fixed (fix_root_link=True). It has 25 active DOF: 1 torso joint, 4 shoulder joints per arm (pitch, roll, yaw), 2 elbow joints per arm (pitch, roll), and 7 finger joints per hand (zero, one, two, three, four, five, six). Custom collision groups are set to disable finger-to-finger, palm, and torso collisions for simulation stability. The file also defines two variants: UnitreeG1UpperBodyWithHeadCamera (adds a head-mounted camera) and UnitreeG1UpperBodyRightArm (controls only the right arm, with passive joints for the rest).
uid: unitree_g1_simplified_upper_body
URDF path: {PACKAGE_ASSET_DIR}/robots/g1_humanoid/g1_simplified_upper_body.urdf
Supported control modes: pd_joint_delta_pos, pd_joint_pos
Usage
Use UnitreeG1UpperBody for bimanual manipulation tasks requiring both arms and dexterous fingers. The fixed legs simplify the task to upper-body manipulation only. The right-arm-only variant is useful for single-arm grasping tasks. The head camera variant supports visual manipulation tasks.
Code Reference
Source Location
- Repository: Haosulab_ManiSkill
- File: mani_skill/agents/robots/unitree_g1/g1_upper_body.py
Signature
@register_agent()
class UnitreeG1UpperBody(BaseAgent):
uid = "unitree_g1_simplified_upper_body"
urdf_path = f"{PACKAGE_ASSET_DIR}/robots/g1_humanoid/g1_simplified_upper_body.urdf"
fix_root_link = True
load_multiple_collisions = False
body_joints = ["torso_joint", "left_shoulder_pitch_joint", ...] # 25 joints
body_stiffness = 1e3
body_damping = 1e2
body_force_limit = 100
keyframes = dict(standing=Keyframe(pose=sapien.Pose(p=[0, 0, 0.755]), qpos=np.array([0.0]*25)))
@register_agent()
class UnitreeG1UpperBodyWithHeadCamera(UnitreeG1UpperBody):
uid = "unitree_g1_simplified_upper_body_with_head_camera"
@register_agent()
class UnitreeG1UpperBodyRightArm(UnitreeG1UpperBody):
uid = "unitree_g1_simplified_upper_body_right_arm"
Import
from mani_skill.agents.robots.unitree_g1.g1_upper_body import UnitreeG1UpperBody
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (inherited from BaseAgent) |
Outputs
| Name | Type | Description |
|---|---|---|
| robot agent | UnitreeG1UpperBody | Configured upper-body humanoid with torso, dual-arm, and finger controllers |
Usage Examples
Creating Environment with Robot
import gymnasium as gym
import mani_skill.envs
env = gym.make("PickCube-v1", robot_uids="unitree_g1_simplified_upper_body")
obs, info = env.reset()