Commit ac7fafd9 authored by Toni-SM's avatar Toni-SM Committed by David Hoeller

Removes the rsl_rl agent configs from multi-agent tasks (#116)

# Description

This PR removes the `rsl_rl` agent configs from multi-agent tasks so
avoid the following known issue:

```
Error executing job with overrides: []
Traceback (most recent call last):
  File "/home/horde/IsaacLab-Internal/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/hydra.py", line 91, in hydra_main
    func(env_cfg, agent_cfg, *args, **kwargs)
  File "/home/horde/IsaacLab-Internal/source/standalone/workflows/rsl_rl/train.py", line 117, in main
    runner = OnPolicyRunner(env, agent_cfg.to_dict(), log_dir=log_dir, device=agent_cfg.device)
  File "/home/horde/miniconda/envs/isaaclab/lib/python3.10/site-packages/rsl_rl/runners/on_policy_runner.py", line 29, in __init__
    obs, extras = self.env.get_observations()
  File "/home/horde/IsaacLab-Internal/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/wrappers/rsl_rl/vecenv_wrapper.py", line 145, in get_observations
    obs_dict = self.unwrapped._get_observations()
  File "/home/horde/IsaacLab-Internal/source/extensions/omni.isaac.lab/omni/isaac/lab/envs/direct_rl_env.py", line 580, in _get_observations
    raise NotImplementedError(f"Please implement the '_get_observations' method for {self.__class__.__name__}.")
NotImplementedError: Please implement the '_get_observations' method for Env.
```

## Type of change

- Bug fix (non-breaking change which fixes an issue)
- This change requires a documentation update

## Checklist

- [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with
`./isaaclab.sh --format`
- [x] I have made corresponding changes to the documentation
- [x] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] I have updated the changelog and the corresponding version in the
extension's `config/extension.toml` file
- [x] I have added my name to the `CONTRIBUTORS.md` or my name already
exists there
parent 901c0e22
......@@ -296,7 +296,7 @@ Comprehensive List of Environments
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Velocity-Rough-Anymal-C-Direct-v0 | | Direct | rsl_rl, rl_games, skrl |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Cart-Double-Pendulum-Direct-v0 | | Direct | rsl_rl, rl_games, skrl |
| Isaac-Cart-Double-Pendulum-Direct-v0 | | Direct | rl_games, skrl |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Cartpole-Direct-v0 | | Direct | rsl_rl, rl_games, skrl, sb3 |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
......@@ -316,7 +316,7 @@ Comprehensive List of Environments
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Quadcopter-Direct-v0 | | Direct | rsl_rl, rl_games, skrl |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Shadow-Hand-Over-Direct-v0 | | Direct | rsl_rl, rl_games, skrl |
| Isaac-Shadow-Hand-Over-Direct-v0 | | Direct | rl_games, skrl |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
| Isaac-Humanoid-v0 | | Manager Based | rsl_rl, rl_games, skrl, sb3 |
+------------------------------------------------+--------------------------------------------+---------------+-----------------------------+
......
[package]
# Note: Semantic Versioning is used: https://semver.org/
version = "0.10.2"
version = "0.10.3"
# Description
title = "Isaac Lab Environments"
......
......@@ -23,7 +23,6 @@ gym.register(
kwargs={
"env_cfg_entry_point": CartDoublePendulumEnvCfg,
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:CartDoublePendulumPPORunnerCfg",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml",
"skrl_ippo_cfg_entry_point": f"{agents.__name__}:skrl_ippo_cfg.yaml",
"skrl_mappo_cfg_entry_point": f"{agents.__name__}:skrl_mappo_cfg.yaml",
......
# Copyright (c) 2022-2024, The Isaac Lab Project Developers.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
from omni.isaac.lab.utils import configclass
from omni.isaac.lab_tasks.utils.wrappers.rsl_rl import (
RslRlOnPolicyRunnerCfg,
RslRlPpoActorCriticCfg,
RslRlPpoAlgorithmCfg,
)
@configclass
class CartDoublePendulumPPORunnerCfg(RslRlOnPolicyRunnerCfg):
num_steps_per_env = 16
max_iterations = 150
save_interval = 50
experiment_name = "cart_double_pendulum_direct"
empirical_normalization = False
policy = RslRlPpoActorCriticCfg(
init_noise_std=1.0,
actor_hidden_dims=[32, 32],
critic_hidden_dims=[32, 32],
activation="elu",
)
algorithm = RslRlPpoAlgorithmCfg(
value_loss_coef=1.0,
use_clipped_value_loss=True,
clip_param=0.2,
entropy_coef=0.005,
num_learning_epochs=5,
num_mini_batches=4,
learning_rate=1.0e-3,
schedule="adaptive",
gamma=0.99,
lam=0.95,
desired_kl=0.01,
max_grad_norm=1.0,
)
......@@ -24,7 +24,6 @@ gym.register(
kwargs={
"env_cfg_entry_point": ShadowHandOverEnvCfg,
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml",
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:ShadowHandPPORunnerCfg",
"skrl_cfg_entry_point": f"{agents.__name__}:skrl_ppo_cfg.yaml",
"skrl_ippo_cfg_entry_point": f"{agents.__name__}:skrl_ippo_cfg.yaml",
"skrl_mappo_cfg_entry_point": f"{agents.__name__}:skrl_mappo_cfg.yaml",
......
# Copyright (c) 2022-2024, The Isaac Lab Project Developers.
# All rights reserved.
#
# SPDX-License-Identifier: BSD-3-Clause
from omni.isaac.lab.utils import configclass
from omni.isaac.lab_tasks.utils.wrappers.rsl_rl import (
RslRlOnPolicyRunnerCfg,
RslRlPpoActorCriticCfg,
RslRlPpoAlgorithmCfg,
)
@configclass
class ShadowHandPPORunnerCfg(RslRlOnPolicyRunnerCfg):
num_steps_per_env = 16
max_iterations = 10000
save_interval = 250
experiment_name = "shadow_hand_over"
empirical_normalization = True
policy = RslRlPpoActorCriticCfg(
init_noise_std=1.0,
actor_hidden_dims=[512, 512, 256, 128],
critic_hidden_dims=[512, 512, 256, 128],
activation="elu",
)
algorithm = RslRlPpoAlgorithmCfg(
value_loss_coef=1.0,
use_clipped_value_loss=True,
clip_param=0.2,
entropy_coef=0.005,
num_learning_epochs=5,
num_mini_batches=4,
learning_rate=5.0e-4,
schedule="adaptive",
gamma=0.99,
lam=0.95,
desired_kl=0.016,
max_grad_norm=1.0,
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment