Skip to content
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 16 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Guidelines for modifications:
* Giulio Romualdi
* Haoran Zhou
* HoJin Jeon
* Iretiayo Akinola
* Jan Kerner
* Jean Tampon
* Jia Lin Yuan
Expand All @@ -62,6 +63,7 @@ Guidelines for modifications:
* Lorenz Wellhausen
* Masoud Moghani
* Michael Gussert
* Michael Noseworthy
* Muhong Guo
* Nuralem Abizov
* Oyindamola Omotuyi
Expand Down Expand Up @@ -90,3 +92,4 @@ Guidelines for modifications:
* Gavriel State
* Hammad Mazhar
* Marco Hutter
* Yashraj Narang
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.
33 changes: 33 additions & 0 deletions docs/source/overview/environments.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,39 @@ for the reach environment:
.. |cube-shadow-lstm-link| replace:: `Isaac-Repose-Cube-Shadow-OpenAI-LSTM-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/shadow_hand/shadow_hand_env_cfg.py>`__
.. |cube-shadow-vis-link| replace:: `Isaac-Repose-Cube-Shadow-Vision-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/shadow_hand/shadow_hand_vision_env.py>`__

Contact-rich Manipulation
~~~~~~~~~~~~

Environments based on contact-rich manipulation tasks such as peg insertion, gear meshing and nut-bolt fastening.

These tasks share the same task configurations and control options. You can switch between them by specifying the task name.
For example:

* |factory-peg-link|: Peg insertion with the Franka arm
* |factory-gear-link|: Gear meshing with the Franka arm
* |factory-nut-link|: Nut-Bolt fastening with the Franka arm

.. table::
:widths: 33 37 30

+--------------------+-------------------------+-----------------------------------------------------------------------------+
| World | Environment ID | Description |
+====================+=========================+=============================================================================+
| |factory-peg| | |factory-peg-link| | Insert peg into the socket with the Franka robot |
+--------------------+-------------------------+-----------------------------------------------------------------------------+
| |factory-gear| | |factory-gear-link| | Insert and mesh gear into the base with other gears, using the Franka robot |
+--------------------+-------------------------+-----------------------------------------------------------------------------+
| |factory-nut| | |factory-nut-link| | Thread the nut onto the first 2 threads of the bolt, using the Franka robot |
+--------------------+-------------------------+-----------------------------------------------------------------------------+

.. |factory-peg| image:: ../_static/tasks/factory/peg_insertion.png
noseworm marked this conversation as resolved.
Show resolved Hide resolved
.. |factory-gear| image:: ../_static/tasks/factory/gear_meshing.png
.. |factory-nut| image:: ../_static/tasks/factory/nut_bolt_fastening.png

.. |factory-peg-link| replace:: `Factory-PegInsert-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/factory_env_cfg.py>`__
.. |factory-gear-link| replace:: `Factory-GearMesh-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/factory_env_cfg.py>`__
.. |factory-nut-link| replace:: `Factory-NutThread-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/factory/factory_env_cfg.py>`__

Locomotion
~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

# Note: Semantic Versioning is used: https://semver.org/
version = "0.10.14"
version = "0.10.15"

# Description
title = "Isaac Lab Environments"
Expand Down
10 changes: 10 additions & 0 deletions source/extensions/omni.isaac.lab_tasks/docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
Changelog
---------

0.10.15 (2024-12-09)
~~~~~~~~~~~~~~~~~~~~

Added
^^^^^

* Added ``Factory-Direct-v0`` environment as a direct RL env that
implements contact-rich manipulation tasks including peg insertion,
gear meshing, and nut threading.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

0.10.14 (2024-12-03)
~~~~~~~~~~~~~~~~~~~~

Expand Down
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="Factory-PegInsert-Direct-v0",
noseworm marked this conversation as resolved.
Show resolved Hide resolved
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="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="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",
},
)
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
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
Loading
Loading