Skip to content

Installation Success but Environment Loading Error with SKRL #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
XinyuSong123 opened this issue Dec 5, 2024 · 1 comment
Open

Comments

@XinyuSong123
Copy link

XinyuSong123 commented Dec 5, 2024

Hi! I successfully installed this template and verified the installation using:
python scripts/rsl_rl/train.py --task=Template-Isaac-Velocity-Rough-Anymal-D-v0

However, when trying to use SKRL to test Template-Isaac-Velocity-Rough-Anymal-D-v0 with the following code:

# load and wrap the Isaac Lab environment
# env = load_isaaclab_env(task_name="Template-Isaac-Velocity-Rough-Anymal-D-v0")
env = load_isaaclab_env(task_name="Template-Isaac-Velocity-Rough-Anymal-D-v0")
env = wrap_env(env)

I encountered this error:

gymnasium.error.NameNotFound: Environment `Template-Isaac-Velocity-Rough-Anymal-D` doesn't exist. Did you mean: `Isaac-Velocity-Rough-Anymal-D`?

Could you please provide instructions for correctly setting up the template with SKRL? Thank you!!!

@virgilio96upm
Copy link

Hi, to use the SKRL library in the anymal_d example you need to follow these steps:

  1. Copy the /skrl folder available in IsaacLab (https://github.com/isaac-sim/IsaacLab/tree/c4bec8fe01c2fd83a0a25da184494b37b3e3eb61/scripts/reinforcement_learning/skrl) to the /scripts folder in your extension template and modify both train.py and play.py files by substituing the tasks from IsaacLab to your example template extension tasks here: https://github.com/isaac-sim/IsaacLab/blob/c4bec8fe01c2fd83a0a25da184494b37b3e3eb61/scripts/reinforcement_learning/skrl/train.py#L100 (substitute this to import ext_template.tasks # noqa: F401)
  2. In your anymal_d/agents directory copy the skrl configuration file for the rough terrain task (example from IsaacLab: https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/anymal_d/agents/skrl_rough_ppo_cfg.yaml)
  3. In the anymal_d directory check the __innit__.py file where the tasks are registered and add the entrypoint to your skrl config file as shown here: https://github.com/isaac-sim/IsaacLab/blob/c4bec8fe01c2fd83a0a25da184494b37b3e3eb61/source/isaaclab_tasks/isaaclab_tasks/manager_based/locomotion/velocity/config/anymal_d/__init__.py#L43
  4. test if this work by running in your terminal python scripts/skrl/train.py --task=Template-Isaac-Velocity-Rough-Anymal-D-v0

Let me know if it works for you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants