-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Gear assembly sim to real #4044
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
Open
ashwinvkNV
wants to merge
19
commits into
isaac-sim:main
Choose a base branch
from
ashwinvkNV:ashwinvk/deploy_gear_assembly
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
2fa2cc0
Initial commit for gear assembly sim to real
ashwinvkNV a01d7f6
remove redundant joint_pos and joint_vel get
ashwinvkNV fa00654
add all ros parameters and more comments to explain
ashwinvkNV 1b4c05e
Merge branch 'isaac-sim:main' into ashwinvk/deploy_gear_assembly
ashwinvkNV cc64f6a
add troubleshotting and higher env training
ashwinvkNV d5e8e43
fixes for comments
ashwinvkNV 5318fe3
use class variables
ashwinvkNV 33212ce
precompute gear randomization indices
ashwinvkNV 4461af3
reduce friction values
ashwinvkNV 5058375
Merge branch 'isaac-sim:main' into ashwinvk/deploy_gear_assembly
ashwinvkNV 035130c
move rsl_rl config to seperate PR
ashwinvkNV 1aa4c96
Merge branch 'main' into ashwinvk/deploy_gear_assembly
ashwinvkNV 08ed4fb
Use the default usd for the 2f 85 gripper
ashwinvkNV 03767bf
Merge branch 'ashwinvk/deploy_gear_assembly' of github.com:ashwinvkNV…
ashwinvkNV 30ce9fe
move to aws assets and remove commented
ashwinvkNV e4ec700
Merge branch 'main' into ashwinvk/deploy_gear_assembly
ashwinvkNV afd8e96
remove tf_combine usage and unnecessary inheritance
ashwinvkNV 2202d76
Merge branch 'ashwinvk/deploy_gear_assembly' of github.com:ashwinvkNV…
ashwinvkNV cf5696a
add comment for positive w and change stand name
ashwinvkNV 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
3 changes: 3 additions & 0 deletions
3
docs/source/_static/policy_deployment/02_gear_assembly/gear_assembly_sim_real.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+1010 KB
...rce/_static/policy_deployment/02_gear_assembly/sim_real_gear_assembly_train.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
604 changes: 604 additions & 0 deletions
604
docs/source/policy_deployment/02_gear_assembly/gear_assembly_policy.rst
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
6 changes: 6 additions & 0 deletions
6
...isaaclab_tasks/isaaclab_tasks/manager_based/manipulation/deploy/gear_assembly/__init__.py
This file contains hidden or 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,6 @@ | ||
| # Copyright (c) 2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Assemble 3 gears into a base.""" |
9 changes: 9 additions & 0 deletions
9
...b_tasks/isaaclab_tasks/manager_based/manipulation/deploy/gear_assembly/config/__init__.py
This file contains hidden or 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,9 @@ | ||
| # Copyright (c) 2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| """Configurations for arm-based gear assembly environments.""" | ||
|
|
||
| # We leave this file empty since we don't want to expose any configs in this package directly. | ||
| # We still need this file to import the "config" module in the parent package. |
75 changes: 75 additions & 0 deletions
75
.../isaaclab_tasks/manager_based/manipulation/deploy/gear_assembly/config/ur_10e/__init__.py
This file contains hidden or 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,75 @@ | ||
| # Copyright (c) 2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| import gymnasium as gym | ||
|
|
||
| from . import agents | ||
|
|
||
| ## | ||
| # Register Gym environments. | ||
| ## | ||
|
|
||
|
|
||
| # UR10e with 2F-140 gripper | ||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F140-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F140GearAssemblyEnvCfg", | ||
| "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg", | ||
| }, | ||
| ) | ||
|
|
||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F140-Play-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F140GearAssemblyEnvCfg_PLAY", | ||
| }, | ||
| ) | ||
|
|
||
| # UR10e with 2F-85 gripper | ||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F85-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F85GearAssemblyEnvCfg", | ||
| "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg", | ||
| }, | ||
| ) | ||
|
|
||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F85-Play-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.joint_pos_env_cfg:UR10e2F85GearAssemblyEnvCfg_PLAY", | ||
| }, | ||
| ) | ||
|
|
||
| # UR10e with 2F-140 gripper - ROS Inference | ||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F140-ROS-Inference-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.ros_inference_env_cfg:UR10e2F140GearAssemblyROSInferenceEnvCfg", | ||
| "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg", | ||
| }, | ||
| ) | ||
|
|
||
| # UR10e with 2F-85 gripper - ROS Inference | ||
| gym.register( | ||
| id="Isaac-Deploy-GearAssembly-UR10e-2F85-ROS-Inference-v0", | ||
| entry_point="isaaclab.envs:ManagerBasedRLEnv", | ||
| disable_env_checker=True, | ||
| kwargs={ | ||
| "env_cfg_entry_point": f"{__name__}.ros_inference_env_cfg:UR10e2F85GearAssemblyROSInferenceEnvCfg", | ||
| "rsl_rl_cfg_entry_point": f"{agents.__name__}.rsl_rl_ppo_cfg:UR10GearAssemblyRNNPPORunnerCfg", | ||
| }, | ||
| ) |
4 changes: 4 additions & 0 deletions
4
...ab_tasks/manager_based/manipulation/deploy/gear_assembly/config/ur_10e/agents/__init__.py
This file contains hidden or 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) 2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause |
49 changes: 49 additions & 0 deletions
49
...ks/manager_based/manipulation/deploy/gear_assembly/config/ur_10e/agents/rsl_rl_ppo_cfg.py
This file contains hidden or 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,49 @@ | ||
| # Copyright (c) 2022-2025, The Isaac Lab Project Developers (https://github.com/isaac-sim/IsaacLab/blob/main/CONTRIBUTORS.md). | ||
| # All rights reserved. | ||
| # | ||
| # SPDX-License-Identifier: BSD-3-Clause | ||
|
|
||
| from isaaclab.utils import configclass | ||
|
|
||
| from isaaclab_rl.rsl_rl import RslRlOnPolicyRunnerCfg, RslRlPpoActorCriticRecurrentCfg, RslRlPpoAlgorithmCfg | ||
|
|
||
|
|
||
| @configclass | ||
| class UR10GearAssemblyRNNPPORunnerCfg(RslRlOnPolicyRunnerCfg): | ||
| num_steps_per_env = 512 | ||
| max_iterations = 1500 | ||
| save_interval = 50 | ||
| experiment_name = "gear_assembly_ur10e" | ||
| clip_actions = 1.0 | ||
| resume = False | ||
| obs_groups = { | ||
| "policy": ["policy"], | ||
| "critic": ["critic"], | ||
| } | ||
| policy = RslRlPpoActorCriticRecurrentCfg( | ||
| state_dependent_std=True, | ||
| init_noise_std=1.0, | ||
| actor_obs_normalization=True, | ||
| critic_obs_normalization=True, | ||
| actor_hidden_dims=[256, 128, 64], | ||
| critic_hidden_dims=[256, 128, 64], | ||
| noise_std_type="log", | ||
| activation="elu", | ||
| rnn_type="lstm", | ||
| rnn_hidden_dim=256, | ||
| rnn_num_layers=2, | ||
| ) | ||
| algorithm = RslRlPpoAlgorithmCfg( | ||
| value_loss_coef=1.0, | ||
| use_clipped_value_loss=True, | ||
| clip_param=0.2, | ||
| entropy_coef=0.0, | ||
| num_learning_epochs=8, | ||
| num_mini_batches=16, | ||
| learning_rate=5.0e-4, | ||
| schedule="adaptive", | ||
| gamma=0.99, | ||
| lam=0.95, | ||
| desired_kl=0.008, | ||
| max_grad_norm=1.0, | ||
| ) |
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.
having the asset in the air is a bit odd, can we add a desk to it?
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.
The base is a fixed asset whose pose is randomzied in the all 6 degrees of freedom. I think adding a table would cause collision issues or visual penetration. And it might make the user think we're actually simulating the base->table physics interactions.
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.
Do you think I should I should add a note in the docs about this?
Uh oh!
There was an error while loading. Please reload this page.
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.
I think it is possible to turn off the collision in the table, there is also fancier operation is to filter table collision with asset collision. But Ill not worry too much about this fancier version.
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.
We randomize the base’s full 6-DoF pose during training. Adding a table would require resetting its pose with an offset to avoid visual collisions. The drawbacks are:
The advantage is that it will prevent the appearance of a floating asset.
Do you still think I should add the table and the additional table pose reset code in the event term along with the base reset?
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.
I don't think you need to reset table? is resetting table necessary? If it resetting table is required then I agree with you that complexity might be high
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.
you can set table to a height that is always below gear base asset