-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds Factory contact-rich manipulation tasks to IsaacLab (#1520)
# Description This MR adds new tasks for contact-rich manipulation based on the Factory line of work. Tasks include peg insertion, gear meshing, and nut threading. ## Type of change - New feature (non-breaking change which adds functionality) - This change requires a documentation update ## Screenshots <img src="https://github.com/user-attachments/assets/c8c32592-8972-4b1e-be7c-51b0313393bf" alt="peg_insertion" height="200"/> <img src="https://github.com/user-attachments/assets/437baf31-f9cb-4a27-94ac-5f21e2309089" alt="gear_meshing" height="200"/> <img src="https://github.com/user-attachments/assets/bccdf71b-cd5f-45f7-b4ca-71616885ef48" alt="nut_threading" height="200"/> ## 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 --------- Signed-off-by: Kelly Guo <[email protected]> Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Iretiayo Akinola <[email protected]> Co-authored-by: Kelly Guo <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
- Loading branch information
1 parent
fc6042f
commit 3c55db4
Showing
16 changed files
with
1,963 additions
and
3 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
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.