-
Notifications
You must be signed in to change notification settings - Fork 857
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates cartpole environment to new framework (#241)
# Description This MR provides the Cartpole environment reimplemented with the new RLTaskEnv. Replaces #177 ## Type of change - Bug fix (non-breaking change which fixes an issue) ## Screenshot Training results with SB-3 (orange), RSL-RL (purple) and RL-Games (black) ![sb3](https://github.com/isaac-orbit/orbit/assets/12863862/c4b7a50e-099a-4391-8142-e2924e633429) ![rslr-l](https://github.com/isaac-orbit/orbit/assets/12863862/aa223a46-d4a8-454a-b26d-b6359e173bbc) ![rlg](https://github.com/isaac-orbit/orbit/assets/12863862/2f20d837-40af-4fa2-ac58-7f520c4a3517) ## Checklist - [x] I have run the [`pre-commit` checks](https://pre-commit.com/) with `./orbit.sh --format` - [ ] 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 - [ ] 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
- Loading branch information
Showing
18 changed files
with
390 additions
and
354 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...ensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/classic/cartpole/agents/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2022-2023, The ORBIT Project Developers. | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
from . import rsl_rl_ppo_cfg # noqa: F401, F403 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 8 additions & 18 deletions
26
...ns/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/classic/cartpole/agents/sb3_ppo_cfg.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,20 @@ | ||
# Reference: https://github.com/DLR-RM/rl-baselines3-zoo/blob/master/hyperparams/ppo.yml#L32 | ||
seed: 42 | ||
|
||
# 512×500×16 | ||
n_timesteps: !!float 2e6 | ||
n_timesteps: !!float 1e6 | ||
policy: 'MlpPolicy' | ||
n_steps: 16 | ||
batch_size: 8192 | ||
batch_size: 4096 | ||
gae_lambda: 0.95 | ||
gamma: 0.99 | ||
n_epochs: 8 | ||
ent_coef: 0.0 | ||
n_epochs: 20 | ||
ent_coef: 0.01 | ||
learning_rate: !!float 3e-4 | ||
clip_range: 0.2 | ||
clip_range: !!float 0.2 | ||
policy_kwargs: "dict( | ||
log_std_init=-2, | ||
ortho_init=False, | ||
activation_fn=nn.ELU, | ||
net_arch=[32, 32] | ||
net_arch=[32, 32], | ||
squash_output=False, | ||
)" | ||
|
||
|
||
target_kl: 0.008 | ||
vf_coef: 1.0 | ||
max_grad_norm: 1.0 | ||
|
||
# Uses VecNormalize class to normalize obs | ||
normalize_input: True | ||
# Uses VecNormalize class to normalize rew | ||
normalize_value: True | ||
clip_obs: 5 |
64 changes: 0 additions & 64 deletions
64
...tensions/omni.isaac.orbit_tasks/omni/isaac/orbit_tasks/classic/cartpole/cartpole_cfg.yaml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.