From f78f79127503b9cfef082706c974686f7f5173da Mon Sep 17 00:00:00 2001 From: wertyuilife Date: Wed, 10 Jun 2026 14:25:29 +0800 Subject: [PATCH] update environment type in Go2RLGymCommand; enable debug vis on play; update gitignore. --- .gitignore | 1 + scripts/rsl_rl/play.py | 1 + source/robot_lab/robot_lab/tasks/go2/mdp/commands.py | 6 +++--- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 61ab52a..d8b21e7 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ __pycache__/ logs/ **/logs/ outputs/ +.omx/ \ No newline at end of file diff --git a/scripts/rsl_rl/play.py b/scripts/rsl_rl/play.py index 47a2f19..a3293ee 100644 --- a/scripts/rsl_rl/play.py +++ b/scripts/rsl_rl/play.py @@ -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 diff --git a/source/robot_lab/robot_lab/tasks/go2/mdp/commands.py b/source/robot_lab/robot_lab/tasks/go2/mdp/commands.py index 90cc646..37c63d6 100644 --- a/source/robot_lab/robot_lab/tasks/go2/mdp/commands.py +++ b/source/robot_lab/robot_lab/tasks/go2/mdp/commands.py @@ -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() """