update environment type in Go2RLGymCommand; enable debug vis on play; update gitignore.

This commit is contained in:
wertyuilife
2026-06-10 14:25:29 +08:00
parent c7a80005c1
commit f78f791275
3 changed files with 5 additions and 3 deletions

1
.gitignore vendored
View File

@@ -85,3 +85,4 @@ __pycache__/
logs/
**/logs/
outputs/
.omx/

View File

@@ -112,6 +112,7 @@ def fix_commands(env_cfg: ManagerBasedRLEnvCfg | DirectRLEnvCfg | DirectMARLEnvC
ang_vel_z=(fixed_ang_z, fixed_ang_z),
heading=None,
),
debug_vis=True,
)
env_cfg.commands.base_velocity = fixed_cfg

View File

@@ -26,7 +26,7 @@ from __future__ import annotations # For forward reference of type hints
from typing import TYPE_CHECKING, Sequence
if TYPE_CHECKING: # Avoid circular import for type checking
from robot_lab.tasks.go2.env.go2_env import ActionDelayGo2Env
from robot_lab.tasks.go2.env.go2_env import Go2Env
from itertools import product
@@ -44,9 +44,9 @@ from robot_lab.tasks.go2.mdp.utils import is_robot_on_terrain, sample_disjoint_i
class Go2RLGymCommand(CommandTerm):
cfg: Go2RLGymCommandCfg
_env: ActionDelayGo2Env
_env: Go2Env
def __init__(self, cfg: Go2RLGymCommandCfg, env: ActionDelayGo2Env):
def __init__(self, cfg: Go2RLGymCommandCfg, env: Go2Env):
"""Reference: https://github.com/wty-yy/go2_rl_gym/blob/master/legged_gym/envs/base/legged_robot.py
LeggedRobot._resample_command() and LeggedRobot._post_physics_step_callback()
"""