mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-03 16:17:15 +00:00
format config
This commit is contained in:
@@ -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]
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user