Skip to content

Commit fff02e6

Browse files
Adds example for gear assembly sim-to-real with UR10e (#4044)
https://github.com/user-attachments/assets/a04cfa6c-3c06-4cb6-8e81-500857c98cb2 # Description This PR introduces a new **Gear Assembly manipulation task** for sim-to-real training with the UR10e robot arm. This environment enables training policies for precise gear insertion tasks using reinforcement learning, with comprehensive sim-to-real transfer capabilities. ## Summary of Changes ### New Features - **Gear Assembly Environment**: Complete environment implementation for gear insertion tasks - Environment configuration (`gear_assembly_env_cfg.py`) - UR10e-specific joint position control configuration (`joint_pos_env_cfg.py`) - RSL-RL PPO training configuration (`rsl_rl_ppo_cfg.py`) - **MDP Components**: Task-specific observation, reward, termination, and event functions - `mdp/events.py`: Randomization and reset events for robust training - `mdp/observations.py`: State observation functions - `mdp/rewards.py`: Reward shaping for gear insertion - `mdp/terminations.py`: Episode termination conditions - **Noise Models**: Enhanced noise simulation for domain randomization - Added configurable noise models (`noise_model.py`, `noise_cfg.py`) - Integration with observation and action spaces for realistic sim-to-real transfer ### Documentation - **Sim-to-Real Training Walkthrough**: Complete guide for training and deploying the gear assembly task - Step-by-step training instructions - Real robot deployment guidelines - Visual assets (GIFs and screenshots) ### Core Enhancements - **Training Script**: Enhanced `train.py` with additional logging and configuration options - **UR10e Robot Configuration**: Updated `universal_robots.py` with gear assembly specific parameters - **Reward System**: Extended core reward functions in `isaaclab/envs/mdp/rewards.py` - **RL Configuration**: Updated RSL-RL integration (`rl_cfg.py`, `setup.py`) ## Type of change - [x] New feature (non-breaking change which adds functionality) - [x] Documentation update ## Checklist - [x] I have read and understood the [contribution guidelines](https://isaac-sim.github.io/IsaacLab/main/source/refs/contributing.html) - [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 - [ ] I have updated the changelog and the corresponding version in the extension's `config/extension.toml` file - [ ] I have added my name to the `CONTRIBUTORS.md` or my name already exists there ## Usage Example ```bash # Train the gear assembly task python scripts/reinforcement_learning/rsl_rl/train.py \ --task Isaac-Deploy-GearAssembly-UR10e-2F140-ROS-Inference-v0 \ --num_envs 256 \ --headless # Run inference with trained policy python scripts/reinforcement_learning/rsl_rl/play.py \ --task Isaac-Deploy-GearAssembly-UR10e-2F140-ROS-Inference-v0 \ --num_envs 1 \ --checkpoint <checkpoint_path> ``` --------- Signed-off-by: Ashwin Varghese Kuruttukulam <123109010+ashwinvkNV@users.noreply.github.com> Co-authored-by: Mayank Mittal <12863862+Mayankm96@users.noreply.github.com>
1 parent 20f7707 commit fff02e6

File tree

21 files changed

+3582
-193
lines changed

21 files changed

+3582
-193
lines changed
Binary file not shown.
122 KB
Loading

docs/source/policy_deployment/02_gear_assembly/gear_assembly_policy.rst

Lines changed: 605 additions & 0 deletions
Large diffs are not rendered by default.

docs/source/policy_deployment/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ Below, you’ll find detailed examples of various policies for training and depl
1010

1111
00_hover/hover_policy
1212
01_io_descriptors/io_descriptors_101
13+
02_gear_assembly/gear_assembly_policy

source/isaaclab_assets/isaaclab_assets/robots/universal_robots.py

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
1111
* :obj:`UR10_CFG`: The UR10 arm without a gripper.
1212
* :obj:`UR10E_ROBOTIQ_GRIPPER_CFG`: The UR10E arm with Robotiq_2f_140 gripper.
13+
* :obj:`UR10e_ROBOTIQ_2F_85_CFG`: The UR10E arm with Robotiq 2F-85 gripper.
1314
1415
Reference: https://github.com/ros-industrial/universal_robot
1516
"""
@@ -167,4 +168,44 @@
167168
armature=0.0,
168169
)
169170

171+
172+
UR10e_ROBOTIQ_2F_85_CFG = UR10e_CFG.copy()
170173
"""Configuration of UR-10E arm with Robotiq_2f_140 gripper."""
174+
UR10e_ROBOTIQ_2F_85_CFG.spawn.variants = {"Gripper": "Robotiq_2f_85"}
175+
UR10e_ROBOTIQ_2F_85_CFG.spawn.rigid_props.disable_gravity = True
176+
UR10e_ROBOTIQ_2F_85_CFG.init_state.joint_pos["finger_joint"] = 0.0
177+
UR10e_ROBOTIQ_2F_85_CFG.init_state.joint_pos[".*_inner_finger_joint"] = 0.0
178+
UR10e_ROBOTIQ_2F_85_CFG.init_state.joint_pos[".*_inner_finger_knuckle_joint"] = 0.0
179+
UR10e_ROBOTIQ_2F_85_CFG.init_state.joint_pos[".*_outer_.*_joint"] = 0.0
180+
# the major actuator joint for gripper
181+
UR10e_ROBOTIQ_2F_85_CFG.actuators["gripper_drive"] = ImplicitActuatorCfg(
182+
joint_names_expr=["finger_joint"], # "right_outer_knuckle_joint" is its mimic joint
183+
effort_limit_sim=10.0,
184+
velocity_limit_sim=1.0,
185+
stiffness=11.25,
186+
damping=0.1,
187+
friction=0.0,
188+
armature=0.0,
189+
)
190+
# enable the gripper to grasp in a parallel manner
191+
UR10e_ROBOTIQ_2F_85_CFG.actuators["gripper_finger"] = ImplicitActuatorCfg(
192+
joint_names_expr=[".*_inner_finger_joint"],
193+
effort_limit_sim=1.0,
194+
velocity_limit_sim=1.0,
195+
stiffness=0.2,
196+
damping=0.001,
197+
friction=0.0,
198+
armature=0.0,
199+
)
200+
# set PD to zero for passive joints in close-loop gripper
201+
UR10e_ROBOTIQ_2F_85_CFG.actuators["gripper_passive"] = ImplicitActuatorCfg(
202+
joint_names_expr=[".*_inner_finger_knuckle_joint", "right_outer_knuckle_joint"],
203+
effort_limit_sim=1.0,
204+
velocity_limit_sim=1.0,
205+
stiffness=0.0,
206+
damping=0.0,
207+
friction=0.0,
208+
armature=0.0,
209+
)
210+
211+
"""Configuration of UR-10E arm with Robotiq 2F-85 gripper."""

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.11.10"
4+
version = "0.11.12"
55

66
# Description
77
title = "Isaac Lab Environments"

source/isaaclab_tasks/docs/CHANGELOG.rst

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

4+
0.11.12 (2025-12-16)
5+
~~~~~~~~~~~~~~~~~~~~
6+
7+
Added
8+
^^^^^
9+
10+
* Added ``Isaac-Deploy-GearAssembly`` environments.
11+
12+
413
0.11.11 (2025-12-16)
514
~~~~~~~~~~~~~~~~~~~~
615

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+
# All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
"""Assemble 3 gears into a base."""
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2025-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+
# All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
"""Configurations for arm-based gear assembly environments."""
7+
8+
# We leave this file empty since we don't want to expose any configs in this package directly.
9+
# We still need this file to import the "config" module in the parent package.
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright (c) 2025-2026, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md).
2+
# All rights reserved.
3+
#
4+
# SPDX-License-Identifier: BSD-3-Clause
5+
6+
import gymnasium as gym
7+
8+
from . import agents
9+
10+
##
11+
# Register Gym environments.
12+
##
13+
14+
15+
# UR10e with 2F-140 gripper
16+
gym.register(
17+
id="Isaac-Deploy-GearAssembly-UR10e-2F140-v0",
18+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
19+
disable_env_checker=True,
20+
kwargs={
21+
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F140GearAssemblyEnvCfg",
22+
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg",
23+
},
24+
)
25+
26+
gym.register(
27+
id="Isaac-Deploy-GearAssembly-UR10e-2F140-Play-v0",
28+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
29+
disable_env_checker=True,
30+
kwargs={
31+
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F140GearAssemblyEnvCfg_PLAY",
32+
},
33+
)
34+
35+
# UR10e with 2F-85 gripper
36+
gym.register(
37+
id="Isaac-Deploy-GearAssembly-UR10e-2F85-v0",
38+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
39+
disable_env_checker=True,
40+
kwargs={
41+
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F85GearAssemblyEnvCfg",
42+
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg",
43+
},
44+
)
45+
46+
gym.register(
47+
id="Isaac-Deploy-GearAssembly-UR10e-2F85-Play-v0",
48+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
49+
disable_env_checker=True,
50+
kwargs={
51+
"env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F85GearAssemblyEnvCfg_PLAY",
52+
},
53+
)
54+
55+
# UR10e with 2F-140 gripper - ROS Inference
56+
gym.register(
57+
id="Isaac-Deploy-GearAssembly-UR10e-2F140-ROS-Inference-v0",
58+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
59+
disable_env_checker=True,
60+
kwargs={
61+
"env_cfg_entry_point": f"{__name__}.ros_inference_env_cfg:UR10e2F140GearAssemblyROSInferenceEnvCfg",
62+
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg",
63+
},
64+
)
65+
66+
# UR10e with 2F-85 gripper - ROS Inference
67+
gym.register(
68+
id="Isaac-Deploy-GearAssembly-UR10e-2F85-ROS-Inference-v0",
69+
entry_point="isaaclab.envs:ManagerBasedRLEnv",
70+
disable_env_checker=True,
71+
kwargs={
72+
"env_cfg_entry_point": f"{__name__}.ros_inference_env_cfg:UR10e2F85GearAssemblyROSInferenceEnvCfg",
73+
"rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg",
74+
},
75+
)

0 commit comments

Comments
 (0)