mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-24 02:06:15 +00:00
format config
This commit is contained in:
@@ -15,6 +15,9 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
|
from typing import Any
|
||||||
|
|
||||||
|
from lerobot.cameras import CameraConfig
|
||||||
|
|
||||||
from ..config import RobotConfig
|
from ..config import RobotConfig
|
||||||
|
|
||||||
@@ -25,85 +28,27 @@ class UnitreeG1Config(RobotConfig):
|
|||||||
# id: str = "unitree_g1"
|
# id: str = "unitree_g1"
|
||||||
simulation_mode: bool = False
|
simulation_mode: bool = False
|
||||||
|
|
||||||
kp: list = field(
|
kp: list = field(default_factory=lambda: [
|
||||||
default_factory=lambda: [
|
150, 150, 150, 300, 40, 40, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll
|
||||||
150,
|
150, 150, 150, 300, 40, 40, # Right leg pitch, roll, yaw, knee, ankle pitch, ankle roll
|
||||||
150,
|
250, 250, 250, # Waist yaw, roll, pitch
|
||||||
150,
|
80, 80, 80, 80, # Left shoulder pitch, roll, yaw, elbow (kp_low)
|
||||||
300,
|
40, 40, 40, # Left wrist roll, pitch, yaw (kp_wrist)
|
||||||
40,
|
80, 80, 80, 80, # Right shoulder pitch, roll, yaw, elbow (kp_low)
|
||||||
40, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll
|
40, 40, 40, # Right wrist roll, pitch, yaw (kp_wrist)
|
||||||
150,
|
80, 80, 80, 80, 80, 80, # Other
|
||||||
150,
|
])
|
||||||
150,
|
|
||||||
300,
|
kd: list = field(default_factory=lambda: [
|
||||||
40,
|
2, 2, 2, 4, 2, 2, # Left leg pitch, roll, yaw, knee, ankle pitch, ankle roll
|
||||||
40, # Right 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
|
||||||
250,
|
5, 5, 5, # Waist yaw, roll, pitch
|
||||||
250,
|
3, 3, 3, 3, # Left shoulder pitch, roll, yaw, elbow (kd_low)
|
||||||
250, # Waist yaw, roll, pitch
|
1.5, 1.5, 1.5, # Left wrist roll, pitch, yaw (kd_wrist)
|
||||||
80,
|
3, 3, 3, 3, # Right shoulder pitch, roll, yaw, elbow (kd_low)
|
||||||
80,
|
1.5, 1.5, 1.5, # Right wrist roll, pitch, yaw (kd_wrist)
|
||||||
80,
|
3, 3, 3, 3, 3, 3, # Other
|
||||||
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
|
arm_velocity_limit = 100.0
|
||||||
control_dt = 1.0 / 250.0
|
control_dt = 1.0 / 250.0
|
||||||
@@ -113,3 +58,4 @@ class UnitreeG1Config(RobotConfig):
|
|||||||
default_leg_angles: list = field(
|
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]
|
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