-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
2fa2cc0
a01d7f6
fa00654
1b4c05e
cc64f6a
d5e8e43
5318fe3
33212ce
4461af3
5058375
035130c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,6 +31,9 @@ class RslRlPpoActorCriticCfg: | |
| noise_std_type: Literal["scalar", "log"] = "scalar" | ||
| """The type of noise standard deviation for the policy. Default is scalar.""" | ||
|
|
||
| state_dependent_std: bool = False | ||
|
||
| """Whether to use state-dependent standard deviation for the policy. Default is False.""" | ||
|
|
||
| actor_obs_normalization: bool = MISSING | ||
| """Whether to normalize the observation for the actor network.""" | ||
|
|
||
|
|
||
| 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.""" |
| 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. |
| 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", | ||
| }, | ||
| ) |
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| # 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): | ||
| seed = 7858 | ||
ashwinvkNV marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| num_steps_per_env = 512 | ||
| max_iterations = 1500 | ||
| save_interval = 50 | ||
| experiment_name = "gear_assembly_ur10e" | ||
| clip_actions = 1.0 | ||
| resume = False | ||
| value_normalization = False | ||
ashwinvkNV marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| 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, | ||
| ) | ||
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.
please capture a high quality image with robot base. : )))
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.
done. Does this one work?