diff --git a/src/lerobot/robots/unitree_g1/config_unitree_g1.py b/src/lerobot/robots/unitree_g1/config_unitree_g1.py index 62130cf1d..088838519 100644 --- a/src/lerobot/robots/unitree_g1/config_unitree_g1.py +++ b/src/lerobot/robots/unitree_g1/config_unitree_g1.py @@ -15,6 +15,9 @@ # limitations under the License. from dataclasses import dataclass, field +from typing import Any + +from lerobot.cameras import CameraConfig from ..config import RobotConfig @@ -25,85 +28,27 @@ class UnitreeG1Config(RobotConfig): # id: str = "unitree_g1" simulation_mode: bool = False - kp: list = field( - default_factory=lambda: [ - 150, - 150, - 150, - 300, - 40, - 40, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll - 150, - 150, - 150, - 300, - 40, - 40, # Right leg pitch, roll, yaw, knee, ankle pitch, ankle roll - 250, - 250, - 250, # Waist yaw, roll, pitch - 80, - 80, - 80, - 80, # Left shoulder pitch, roll, yaw, elbow (kp_low) - 40, - 40, - 40, # Left wrist roll, pitch, yaw (kp_wrist) - 80, - 80, - 80, - 80, # Right shoulder pitch, roll, yaw, elbow (kp_low) - 40, - 40, - 40, # Right wrist roll, pitch, yaw (kp_wrist) - 80, - 80, - 80, - 80, - 80, - 80, # Other - ] - ) - - kd: list = field( - default_factory=lambda: [ - 2, - 2, - 2, - 4, - 2, - 2, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll - 2, - 2, - 2, - 4, - 2, - 2, # Right leg pitch, roll, yaw, knee, ankle pitch, ankle roll - 5, - 5, - 5, # Waist yaw, roll, pitch - 3, - 3, - 3, - 3, # Left shoulder pitch, roll, yaw, elbow (kd_low) - 1.5, - 1.5, - 1.5, # Left wrist roll, pitch, yaw (kd_wrist) - 3, - 3, - 3, - 3, # Right shoulder pitch, roll, yaw, elbow (kd_low) - 1.5, - 1.5, - 1.5, # Right wrist roll, pitch, yaw (kd_wrist) - 3, - 3, - 3, - 3, - 3, - 3, # Other - ] - ) + kp: list = field(default_factory=lambda: [ + 150, 150, 150, 300, 40, 40, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll + 150, 150, 150, 300, 40, 40, # Right leg pitch, roll, yaw, knee, ankle pitch, ankle roll + 250, 250, 250, # Waist yaw, roll, pitch + 80, 80, 80, 80, # Left shoulder pitch, roll, yaw, elbow (kp_low) + 40, 40, 40, # Left wrist roll, pitch, yaw (kp_wrist) + 80, 80, 80, 80, # Right shoulder pitch, roll, yaw, elbow (kp_low) + 40, 40, 40, # Right wrist roll, pitch, yaw (kp_wrist) + 80, 80, 80, 80, 80, 80, # Other + ]) + + kd: list = field(default_factory=lambda: [ + 2, 2, 2, 4, 2, 2, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll + 2, 2, 2, 4, 2, 2, # Right leg pitch, roll, yaw, knee, ankle pitch, ankle roll + 5, 5, 5, # Waist yaw, roll, pitch + 3, 3, 3, 3, # Left shoulder pitch, roll, yaw, elbow (kd_low) + 1.5, 1.5, 1.5, # Left wrist roll, pitch, yaw (kd_wrist) + 3, 3, 3, 3, # Right shoulder pitch, roll, yaw, elbow (kd_low) + 1.5, 1.5, 1.5, # Right wrist roll, pitch, yaw (kd_wrist) + 3, 3, 3, 3, 3, 3, # Other + ]) arm_velocity_limit = 100.0 control_dt = 1.0 / 250.0 @@ -113,3 +58,4 @@ class UnitreeG1Config(RobotConfig): default_leg_angles: list = field( default_factory=lambda: [-0.1, 0.0, 0.0, 0.3, -0.2, 0.0, -0.1, 0.0, 0.0, 0.3, -0.2, 0.0] ) +