Add Go1 evaluation and keyboard control

This commit is contained in:
youyuan.chen
2026-07-24 12:00:53 +08:00
parent c1b347c89f
commit 35a1d278e8
21 changed files with 443 additions and 1 deletions

View File

@@ -5,3 +5,4 @@ from .go2.go2_lab_config import Go2LabConfig, Go2LabTerrainConfig
from .go2.go2 import Go2
from .go2.go2_moe_config import Go2MoEConfig, Go2MoETerrainConfig
from .go2.go2_moe import Go2MoE
from .go1 import Go1Config, Go1TerrainConfig, Go1, Go1MoEConfig, Go1MoETerrainConfig, Go1MoE

View File

@@ -0,0 +1,4 @@
from .go1_config import Go1Config, Go1TerrainConfig
from .go1 import Go1
from .go1_moe_config import Go1MoEConfig, Go1MoETerrainConfig
from .go1_moe import Go1MoE

View File

@@ -0,0 +1,13 @@
# -*- coding: utf-8 -*-
"""Go1 policy adapter.
The trained policy and the Go1 MuJoCo asset both use FR, FL, RR, RL joint
groups. Isaac Gym exposed the training asset as FL, FR, RL, RR, but Go1Robot
permuted its observations and actions during training.
"""
from robogauge.tasks.robots.go2.go2 import Go2
class Go1(Go2):
pass

View File

@@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
"""Go1 configuration for the RoboGauge MuJoCo evaluator."""
from robogauge.tasks.robots.go2.go2_config import Go2Config
class Go1Config(Go2Config):
robot_name = 'go1'
robot_class = 'Go1'
class assets(Go2Config.assets):
robot_xml = "{ROBOGAUGE_ROOT_DIR}/resources/robots/go1/go1.xml"
foot_geom_names = ['FR', 'FL', 'RR', 'RL']
class control(Go2Config.control):
model_path = "{ROBOGAUGE_ROOT_DIR}/resources/models/go1/policy.pt"
control_dt = 0.02
p_gains = [28.0] * 12
d_gains = [0.7] * 12
# Both this MuJoCo model and the trained policy use FR, FL, RR, RL.
# Go1Robot permuted Isaac Gym's FL, FR, RL, RR asset state into this
# order during training, so applying that permutation again here
# would swap every left/right leg pair.
default_dof_pos = [
-0.1, 0.8, -1.5,
0.1, 0.8, -1.5,
-0.1, 1.0, -1.5,
0.1, 1.0, -1.5,
]
mj2model_dof_indices = list(range(12))
class Go1TerrainConfig(Go1Config):
class commands(Go1Config.commands):
lin_vel_x = [-1.0, 1.0]
lin_vel_y = [-1.0, 1.0]
ang_vel_yaw = [-1.5, 1.5]

View File

@@ -0,0 +1,8 @@
# -*- coding: utf-8 -*-
"""MoE Go1 policy adapter."""
from robogauge.tasks.robots.go2.go2_moe import Go2MoE
class Go1MoE(Go2MoE):
pass

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
"""MoE policy configuration for the trained Go1 checkpoint."""
from robogauge.tasks.robots.go1.go1_config import Go1Config, Go1TerrainConfig
class Go1MoEConfig(Go1Config):
robot_class = 'Go1MoE'
class Go1MoETerrainConfig(Go1TerrainConfig, Go1MoEConfig):
robot_class = 'Go1MoE'