Skip to content

Commit 77a6498

Browse files
nosewormooctipuskellyguo11
authored
Adds FORGE tasks for contact-rich manipulation with force sensing to IsaacLab (#2968)
# Description This MR adds new tasks which extend the `Factory` tasks to include: 1. Force sensing: Add observations for force experienced by the end-effector. 2. Excessive force penalty: Add an option to penalize the agent for excessive contact forces. 3. Dynamics randomization: Randomize controller gains, asset properties (friction, mass), and dead-zone. 4. Success prediction: Add an extra action that predicts task success. The new tasks are: `Isaac-Forge-PegInsert-Direct-v0`, `Isaac-Forge-GearMesh-Direct-v0`, and `Isaac-Forge-NutThread-Direct-v0` ## Type of change - New feature (non-breaking change which adds functionality) - 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 --------- Signed-off-by: Kelly Guo <[email protected]> Co-authored-by: Octi Zhang <[email protected]> Co-authored-by: Kelly Guo <[email protected]>
1 parent 5fb96c6 commit 77a6498

File tree

18 files changed

+1294
-270
lines changed

18 files changed

+1294
-270
lines changed

.github/workflows/license-exceptions.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,5 +360,10 @@
360360
"package": "referencing",
361361
"license": "UNKNOWN",
362362
"comment": "MIT"
363+
},
364+
{
365+
"package": "regex",
366+
"license": "UNKNOWN",
367+
"comment": "Apache 2.0"
363368
}
364369
]

docs/source/overview/environments.rst

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,44 @@ We provide environments for both disassembly and assembly.
245245
.. |assembly-link| replace:: `Isaac-AutoMate-Assembly-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/direct/automate/assembly_env_cfg.py>`__
246246
.. |disassembly-link| replace:: `Isaac-AutoMate-Disassembly-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/direct/automate/disassembly_env_cfg.py>`__
247247

248+
FORGE
249+
~~~~~~~~
250+
251+
FORGE environments extend Factory environments with:
252+
253+
* Force sensing: Add observations for force experienced by the end-effector.
254+
* Excessive force penalty: Add an option to penalize the agent for excessive contact forces.
255+
* Dynamics randomization: Randomize controller gains, asset properties (friction, mass), and dead-zone.
256+
* Success prediction: Add an extra action that predicts task success.
257+
258+
These tasks share the same task configurations and control options. You can switch between them by specifying the task name.
259+
260+
* |forge-peg-link|: Peg insertion with the Franka arm
261+
* |forge-gear-link|: Gear meshing with the Franka arm
262+
* |forge-nut-link|: Nut-Bolt fastening with the Franka arm
263+
264+
.. table::
265+
:widths: 33 37 30
266+
267+
+--------------------+-------------------------+-----------------------------------------------------------------------------+
268+
| World | Environment ID | Description |
269+
+====================+=========================+=============================================================================+
270+
| |forge-peg| | |forge-peg-link| | Insert peg into the socket with the Franka robot |
271+
+--------------------+-------------------------+-----------------------------------------------------------------------------+
272+
| |forge-gear| | |forge-gear-link| | Insert and mesh gear into the base with other gears, using the Franka robot |
273+
+--------------------+-------------------------+-----------------------------------------------------------------------------+
274+
| |forge-nut| | |forge-nut-link| | Thread the nut onto the first 2 threads of the bolt, using the Franka robot |
275+
+--------------------+-------------------------+-----------------------------------------------------------------------------+
276+
277+
.. |forge-peg| image:: ../_static/tasks/factory/peg_insert.jpg
278+
.. |forge-gear| image:: ../_static/tasks/factory/gear_mesh.jpg
279+
.. |forge-nut| image:: ../_static/tasks/factory/nut_thread.jpg
280+
281+
.. |forge-peg-link| replace:: `Isaac-Forge-PegInsert-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/direct/forge/forge_env_cfg.py>`__
282+
.. |forge-gear-link| replace:: `Isaac-Forge-GearMesh-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/direct/forge/forge_env_cfg.py>`__
283+
.. |forge-nut-link| replace:: `Isaac-Forge-NutThread-Direct-v0 <https://github.com/isaac-sim/IsaacLab/blob/main/source/isaaclab_tasks/isaaclab_tasks/direct/forge/forge_env_cfg.py>`__
284+
285+
248286
Locomotion
249287
~~~~~~~~~~
250288

@@ -743,6 +781,18 @@ inferencing, including reading from an already trained checkpoint and disabling
743781
-
744782
- Direct
745783
-
784+
* - Isaac-Forge-GearMesh-Direct-v0
785+
-
786+
- Direct
787+
- **rl_games** (PPO)
788+
* - Isaac-Forge-NutThread-Direct-v0
789+
-
790+
- Direct
791+
- **rl_games** (PPO)
792+
* - Isaac-Forge-PegInsert-Direct-v0
793+
-
794+
- Direct
795+
- **rl_games** (PPO)
746796
* - Isaac-Franka-Cabinet-Direct-v0
747797
-
748798
- Direct

source/isaaclab_tasks/config/extension.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
# Note: Semantic Versioning is used: https://semver.org/
4-
version = "0.10.36"
4+
version = "0.10.37"
55

66
# Description
77
title = "Isaac Lab Environments"

source/isaaclab_tasks/docs/CHANGELOG.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,18 @@
11
Changelog
22
---------
33

4+
0.10.37 (2025-07-16)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Added
8+
^^^^^
9+
10+
* Added ``Isaac-Forge-PegInsert-Direct-v0``, ``Isaac-Forge-GearMesh-Direct-v0``,
11+
and ``Isaac-Forge-NutThread-Direct-v0`` environments as direct RL envs. These
12+
environments extend ``Isaac-Factory-*-v0`` with force sensing, an excessive force
13+
penalty, dynamics randomization, and success prediction.
14+
15+
416
0.10.36 (2025-06-26)
517
~~~~~~~~~~~~~~~~~~~~
618

source/isaaclab_tasks/isaaclab_tasks/direct/factory/factory_control.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ def compute_dof_torque(
3131
task_prop_gains,
3232
task_deriv_gains,
3333
device,
34+
dead_zone_thresholds=None,
3435
):
3536
"""Compute Franka DOF torque to move fingertips towards target pose."""
3637
# References:
@@ -61,6 +62,15 @@ def compute_dof_torque(
6162
)
6263
task_wrench += task_wrench_motion
6364

65+
# Offset task_wrench motion by random amount to simulate unreliability at low forces.
66+
# Check if absolute value is less than specified amount. If so, 0 out, otherwise, subtract.
67+
if dead_zone_thresholds is not None:
68+
task_wrench = torch.where(
69+
task_wrench.abs() < dead_zone_thresholds,
70+
torch.zeros_like(task_wrench),
71+
task_wrench.sign() * (task_wrench.abs() - dead_zone_thresholds),
72+
)
73+
6474
# Set tau = J^T * tau, i.e., map tau into joint space as desired
6575
jacobian_T = torch.transpose(jacobian, dim0=1, dim1=2)
6676
dof_torque[:, 0:7] = (jacobian_T @ task_wrench.unsqueeze(-1)).squeeze(-1)
@@ -135,7 +145,7 @@ def get_pose_error(
135145
return pos_error, axis_angle_error
136146

137147

138-
def _get_delta_dof_pos(delta_pose, ik_method, jacobian, device):
148+
def get_delta_dof_pos(delta_pose, ik_method, jacobian, device):
139149
"""Get delta Franka DOF position from delta pose using specified IK method."""
140150
# References:
141151
# 1) https://www.cs.cmu.edu/~15464-s13/lectures/lecture6/iksurvey.pdf

0 commit comments

Comments
 (0)