From ee8963cf4c974e97aed005bf138e14eec438684b Mon Sep 17 00:00:00 2001 From: syfffffjj Date: Tue, 20 Oct 2026 16:01:15 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20get=5Fpublished=5Fp?= =?UTF-8?q?retrained=5Fcheckpoint=20=E7=9A=84import=E6=96=B9=E5=BC=8F?= =?UTF-8?q?=EF=BC=8C=E5=85=BC=E5=AE=B9Isaaclab=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/reinforcement_learning/rsl_rl/play.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/reinforcement_learning/rsl_rl/play.py b/scripts/reinforcement_learning/rsl_rl/play.py index 7270610..3e387c3 100644 --- a/scripts/reinforcement_learning/rsl_rl/play.py +++ b/scripts/reinforcement_learning/rsl_rl/play.py @@ -27,7 +27,6 @@ from isaaclab.app import AppLauncher # local imports sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) import cli_args -from rl_utils import camera_follow # add argparse arguments parser = argparse.ArgumentParser(description="Train an RL agent with RSL-RL.") @@ -91,7 +90,11 @@ from isaaclab.envs import ( from isaaclab.managers import ObservationTermCfg as ObsTerm from isaaclab.utils.assets import retrieve_file_path from isaaclab.utils.dict import print_dict -from isaaclab.utils.pretrained_checkpoint import get_published_pretrained_checkpoint +try: + from isaaclab.utils.pretrained_checkpoint import get_published_pretrained_checkpoint +except ModuleNotFoundError: + # Isaac Lab 2.3.x and earlier keep this helper under isaaclab_rl. + from isaaclab_rl.utils.pretrained_checkpoint import get_published_pretrained_checkpoint from isaaclab_rl.rsl_rl import RslRlOnPolicyRunnerCfg, RslRlVecEnvWrapper, export_policy_as_jit, export_policy_as_onnx from isaaclab_tasks.utils import get_checkpoint_path from isaaclab_tasks.utils.hydra import hydra_task_config @@ -99,6 +102,8 @@ from isaaclab_tasks.utils.hydra import hydra_task_config import rl_training import rl_training.tasks # noqa: F401 +from rl_utils import camera_follow + print(f"[INFO] Using rl_training package from: {rl_training.__file__}")