Skip to content

Commit c73357e

Browse files
committed
Added SH tiled camera envs.
1 parent 14cbeb6 commit c73357e

File tree

4 files changed

+500
-0
lines changed

4 files changed

+500
-0
lines changed

source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/direct/shadow_hand/__init__.py

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
from . import agents
1313
from .shadow_hand_env import ShadowHandEnv
14+
from .shadow_hand_camera_env import ShadowHandCameraEnv, ShadowHandRGBCameraEnvCfg, ShadowHandDepthCameraEnvCfg, ShadowHandRGBDCameraEnvCfg, ShadowHandRGBCameraAsymmetricEnvCfg, ShadowHandDepthCameraAsymmetricEnvCfg
1415
from .shadow_hand_env_cfg import ShadowHandEnvCfg, ShadowHandOpenAIEnvCfg
1516

1617
##
@@ -48,3 +49,56 @@
4849
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_lstm_cfg.yaml",
4950
},
5051
)
52+
53+
### Camera
54+
55+
gym.register(
56+
id="Isaac-Shadow-Hand-RGB-Camera-Direct-v0",
57+
entry_point="omni.isaac.lab_tasks.direct.shadow_hand:ShadowHandCameraEnv",
58+
disable_env_checker=True,
59+
kwargs={
60+
"env_cfg_entry_point": ShadowHandRGBCameraEnvCfg,
61+
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml",
62+
},
63+
)
64+
65+
gym.register(
66+
id="Isaac-Shadow-Hand-Depth-Camera-Direct-v0",
67+
entry_point="omni.isaac.lab_tasks.direct.shadow_hand:ShadowHandCameraEnv",
68+
disable_env_checker=True,
69+
kwargs={
70+
"env_cfg_entry_point": ShadowHandDepthCameraEnvCfg,
71+
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml",
72+
},
73+
)
74+
75+
gym.register(
76+
id="Isaac-Shadow-Hand-RGBD-Camera-Direct-v0",
77+
entry_point="omni.isaac.lab_tasks.direct.shadow_hand:ShadowHandCameraEnv",
78+
disable_env_checker=True,
79+
kwargs={
80+
"env_cfg_entry_point": ShadowHandRGBDCameraEnvCfg,
81+
"rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_cfg.yaml",
82+
},
83+
)
84+
85+
86+
# gym.register(
87+
# id="Isaac-Shadow-Hand-RGB-Camera-Asymmetric-Direct-v0",
88+
# entry_point="omni.isaac.lab_tasks.direct.shadow_hand:ShadowHandCameraEnv",
89+
# disable_env_checker=True,
90+
# kwargs={
91+
# "env_cfg_entry_point": ShadowHandRGBCameraAsymmetricEnvCfg,
92+
# "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_asym_cfg.yaml",
93+
# },
94+
# )
95+
96+
# gym.register(
97+
# id="Isaac-Shadow-Hand-Depth-Camera-Asymmetric-Direct-v0",
98+
# entry_point="omni.isaac.lab_tasks.direct.shadow_hand:ShadowHandCameraEnv",
99+
# disable_env_checker=True,
100+
# kwargs={
101+
# "env_cfg_entry_point": ShadowHandDepthCameraAsymmetricEnvCfg,
102+
# "rl_games_cfg_entry_point": f"{agents.__name__}:rl_games_ppo_camera_asym_cfg.yaml",
103+
# },
104+
# )
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
params:
2+
seed: 42
3+
4+
# environment wrapper clipping
5+
env:
6+
# added to the wrapper
7+
clip_observations: 5.0
8+
# can make custom wrapper?
9+
clip_actions: 1.0
10+
11+
algo:
12+
name: a2c_continuous
13+
14+
model:
15+
name: continuous_a2c_logstd
16+
17+
network:
18+
name: actor_critic
19+
separate: False
20+
21+
space:
22+
continuous:
23+
mu_activation: None
24+
sigma_activation: None
25+
mu_init:
26+
name: default
27+
sigma_init:
28+
name: const_initializer
29+
val: 0
30+
fixed_sigma: True
31+
cnn:
32+
type: conv2d
33+
activation: relu
34+
initializer:
35+
name: default
36+
regularizer:
37+
name: None
38+
convs:
39+
- filters: 32
40+
kernel_size: 8
41+
strides: 4
42+
padding: 0
43+
- filters: 64
44+
kernel_size: 4
45+
strides: 2
46+
padding: 0
47+
- filters: 64
48+
kernel_size: 3
49+
strides: 1
50+
padding: 0
51+
mlp:
52+
units: [512]
53+
activation: relu
54+
d2rl: False
55+
56+
initializer:
57+
name: default
58+
regularizer:
59+
name: None
60+
rnn:
61+
name: lstm
62+
units: 1024
63+
layers: 1
64+
before_mlp: True
65+
layer_norm: True
66+
67+
load_checkpoint: False # flag which sets whether to load the checkpoint
68+
load_path: '' # path to the checkpoint to load
69+
70+
config:
71+
name: shadow_hand_camera_lstm
72+
env_name: rlgpu
73+
device: 'cuda:0'
74+
device_name: 'cuda:0'
75+
multi_gpu: False
76+
ppo: True
77+
mixed_precision: False
78+
normalize_input: False
79+
normalize_value: True
80+
num_actors: -1 # configured from the script (based on num_envs)
81+
reward_shaper:
82+
scale_value: 0.01
83+
normalize_advantage: True
84+
gamma: 0.998
85+
tau: 0.95
86+
learning_rate: 1e-4
87+
lr_schedule: adaptive
88+
schedule_type: standard
89+
kl_threshold: 0.016
90+
score_to_win: 100000
91+
max_epochs: 10000
92+
save_best_after: 100
93+
save_frequency: 200
94+
print_stats: True
95+
grad_norm: 1.0
96+
entropy_coef: 0.0
97+
truncate_grads: True
98+
e_clip: 0.2
99+
horizon_length: 64
100+
minibatch_size: 4096
101+
mini_epochs: 4
102+
critic_coef: 4
103+
clip_value: True
104+
seq_length: 4
105+
bounds_loss_coef: 0.0001
106+
107+
central_value_config:
108+
minibatch_size: 4096
109+
mini_epochs: 4
110+
learning_rate: 1e-4
111+
kl_threshold: 0.016
112+
clip_value: True
113+
normalize_input: False
114+
truncate_grads: True
115+
116+
network:
117+
name: actor_critic
118+
central_value: True
119+
mlp:
120+
units: [512]
121+
activation: relu
122+
d2rl: False
123+
initializer:
124+
name: default
125+
regularizer:
126+
name: None
127+
rnn:
128+
name: lstm
129+
units: 1024
130+
layers: 1
131+
before_mlp: True
132+
layer_norm: True
133+
zero_rnn_on_done: False
134+
135+
player:
136+
deterministic: True
137+
games_num: 100000
138+
print_stats: True
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
params:
2+
seed: 42
3+
4+
# environment wrapper clipping
5+
env:
6+
# added to the wrapper
7+
clip_observations: 5.0
8+
# can make custom wrapper?
9+
clip_actions: 1.0
10+
11+
algo:
12+
name: a2c_continuous
13+
14+
model:
15+
name: continuous_a2c_logstd
16+
17+
# doesn't have this fine grained control but made it close
18+
network:
19+
name: resnet_actor_critic
20+
separate: False
21+
space:
22+
continuous:
23+
mu_activation: None
24+
sigma_activation: None
25+
26+
mu_init:
27+
name: default
28+
sigma_init:
29+
name: const_initializer
30+
val: 0
31+
fixed_sigma: True
32+
cnn:
33+
type: conv2d
34+
activation: relu
35+
initializer:
36+
name: default
37+
regularizer:
38+
name: None
39+
conv_depths: [16, 32, 32]
40+
41+
mlp:
42+
units: [512]
43+
activation: elu
44+
initializer:
45+
name: default
46+
47+
load_checkpoint: False # flag which sets whether to load the checkpoint
48+
load_path: '' # path to the checkpoint to load
49+
50+
config:
51+
name: shadow_hand_rgb
52+
env_name: rlgpu
53+
device: 'cuda:0'
54+
device_name: 'cuda:0'
55+
multi_gpu: False
56+
ppo: True
57+
mixed_precision: False
58+
normalize_input: False
59+
normalize_value: True
60+
num_actors: -1 # configured from the script (based on num_envs)
61+
reward_shaper:
62+
scale_value: 1.0
63+
normalize_advantage: True
64+
gamma: 0.99
65+
tau : 0.95
66+
learning_rate: 1e-4
67+
lr_schedule: adaptive
68+
schedule_type: standard
69+
kl_threshold: 0.016
70+
score_to_win: 100000
71+
max_epochs: 50000
72+
save_best_after: 100
73+
save_frequency: 200
74+
print_stats: True
75+
grad_norm: 1.0
76+
entropy_coef: 0.0
77+
truncate_grads: True
78+
e_clip: 0.2
79+
horizon_length: 64
80+
minibatch_size: 64 #32768
81+
mini_epochs: 4
82+
critic_coef: 2
83+
clip_value: True
84+
seq_length: 4
85+
bounds_loss_coef: 0.0001
86+
87+
player:
88+
deterministic: True
89+
games_num: 100000
90+
print_stats: True

0 commit comments

Comments
 (0)