Add Go1 evaluation and keyboard control
This commit is contained in:
4
robogauge/tasks/robots/go1/__init__.py
Normal file
4
robogauge/tasks/robots/go1/__init__.py
Normal 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
|
||||
13
robogauge/tasks/robots/go1/go1.py
Normal file
13
robogauge/tasks/robots/go1/go1.py
Normal 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
|
||||
38
robogauge/tasks/robots/go1/go1_config.py
Normal file
38
robogauge/tasks/robots/go1/go1_config.py
Normal 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]
|
||||
8
robogauge/tasks/robots/go1/go1_moe.py
Normal file
8
robogauge/tasks/robots/go1/go1_moe.py
Normal 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
|
||||
12
robogauge/tasks/robots/go1/go1_moe_config.py
Normal file
12
robogauge/tasks/robots/go1/go1_moe_config.py
Normal 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'
|
||||
Reference in New Issue
Block a user