-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Adds Factory contact-rich manipulation tasks to IsaacLab #1520
Merged
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3e6537d
Initial factory commit
noseworm e33bea0
Use table already in omniverse
noseworm b40062f
Change assets to articulations
noseworm fe76be3
adding contact-rich environments (from Factory) to documentation
iakinola23 a287a99
Run pre-commit formatting
noseworm f500931
Update docs and changelog
noseworm 79f5544
Add contributors for Factory envs
noseworm 2aa8aa5
Fix indentation of player config
noseworm e81909a
Register each contact-rich task using a separate configclass
noseworm 3fdd2de
Update ASSET_DIR for Factory assets
noseworm 66c912a
Update from code review
noseworm f01fa94
Update comprehensive environment list
noseworm 09b0902
Merge branch 'main' into factory
kellyguo11 59cdba1
Update extension.toml
kellyguo11 a2bc641
Update per_test_timeouts.py
kellyguo11 ce0f385
Update per_test_timeouts.py
kellyguo11 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
44 changes: 44 additions & 0 deletions
44
source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/__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,44 @@ | ||
# Copyright (c) 2022-2024, The Isaac Lab Project Developers. | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause | ||
|
||
import gymnasium as gym | ||
|
||
from . import agents | ||
from .factory_env import FactoryEnv | ||
from .factory_env_cfg import FactoryTaskGearMeshCfg, FactoryTaskNutThreadCfg, FactoryTaskPegInsertCfg | ||
|
||
## | ||
# Register Gym environments. | ||
## | ||
|
||
gym.register( | ||
id="Isaac-Factory-PegInsert-Direct-v0", | ||
entry_point="omni.isaac.lab_tasks.direct.factory:FactoryEnv", | ||
disable_env_checker=True, | ||
kwargs={ | ||
"env_cfg_entry_point": FactoryTaskPegInsertCfg, | ||
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", | ||
}, | ||
) | ||
|
||
gym.register( | ||
id="Isaac-Factory-GearMesh-Direct-v0", | ||
entry_point="omni.isaac.lab_tasks.direct.factory:FactoryEnv", | ||
disable_env_checker=True, | ||
kwargs={ | ||
"env_cfg_entry_point": FactoryTaskGearMeshCfg, | ||
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", | ||
}, | ||
) | ||
|
||
gym.register( | ||
id="Isaac-Factory-NutThread-Direct-v0", | ||
entry_point="omni.isaac.lab_tasks.direct.factory:FactoryEnv", | ||
disable_env_checker=True, | ||
kwargs={ | ||
"env_cfg_entry_point": FactoryTaskNutThreadCfg, | ||
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_cfg.yaml", | ||
}, | ||
) |
4 changes: 4 additions & 0 deletions
4
...ce/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/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,4 @@ | ||
# Copyright (c) 2022-2024, The Isaac Lab Project Developers. | ||
# All rights reserved. | ||
# | ||
# SPDX-License-Identifier: BSD-3-Clause |
118 changes: 118 additions & 0 deletions
118
...ons/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/agents/rl_games_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 |
---|---|---|
@@ -0,0 +1,118 @@ | ||
params: | ||
seed: 0 | ||
algo: | ||
name: a2c_continuous | ||
|
||
env: | ||
clip_actions: 1.0 | ||
|
||
model: | ||
name: continuous_a2c_logstd | ||
|
||
network: | ||
name: actor_critic | ||
separate: False | ||
|
||
space: | ||
continuous: | ||
mu_activation: None | ||
sigma_activation: None | ||
mu_init: | ||
name: default | ||
sigma_init: | ||
name: const_initializer | ||
val: 0 | ||
fixed_sigma: False | ||
mlp: | ||
units: [512, 128, 64] | ||
activation: elu | ||
d2rl: False | ||
|
||
initializer: | ||
name: default | ||
regularizer: | ||
name: None | ||
|
||
rnn: | ||
name: lstm | ||
units: 1024 | ||
layers: 2 | ||
before_mlp: True | ||
concat_input: True | ||
layer_norm: True | ||
|
||
load_checkpoint: False | ||
load_path: "" | ||
|
||
config: | ||
name: Factory | ||
device: cuda:0 | ||
full_experiment_name: test | ||
env_name: rlgpu | ||
multi_gpu: False | ||
ppo: True | ||
mixed_precision: True | ||
normalize_input: True | ||
normalize_value: True | ||
value_bootstrap: True | ||
num_actors: 128 | ||
reward_shaper: | ||
scale_value: 1.0 | ||
normalize_advantage: True | ||
gamma: 0.995 | ||
tau: 0.95 | ||
learning_rate: 1.0e-4 | ||
lr_schedule: adaptive | ||
schedule_type: standard | ||
kl_threshold: 0.008 | ||
score_to_win: 20000 | ||
max_epochs: 200 | ||
save_best_after: 10 | ||
save_frequency: 100 | ||
print_stats: True | ||
grad_norm: 1.0 | ||
entropy_coef: 0.0 # 0.0001 # 0.0 | ||
truncate_grads: True | ||
e_clip: 0.2 | ||
horizon_length: 128 | ||
minibatch_size: 512 # batch size = num_envs * horizon_length; minibatch_size = batch_size / num_minibatches | ||
mini_epochs: 4 | ||
critic_coef: 2 | ||
clip_value: True | ||
seq_length: 128 | ||
bounds_loss_coef: 0.0001 | ||
|
||
central_value_config: | ||
minibatch_size: 512 | ||
mini_epochs: 4 | ||
learning_rate: 1e-4 | ||
lr_schedule: adaptive | ||
kl_threshold: 0.008 | ||
clip_value: True | ||
normalize_input: True | ||
truncate_grads: True | ||
|
||
network: | ||
name: actor_critic | ||
central_value: True | ||
|
||
mlp: | ||
units: [512, 128, 64] | ||
activation: elu | ||
d2rl: False | ||
|
||
initializer: | ||
name: default | ||
regularizer: | ||
name: None | ||
|
||
rnn: | ||
name: lstm | ||
units: 1024 | ||
layers: 2 | ||
before_mlp: True | ||
concat_input: True | ||
layer_norm: True | ||
|
||
player: | ||
deterministic: False |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.