Skip to content

Commit d7df768

Browse files
committed
Squashed 'modules/atom01_train/robolab/' changes from 142f798..732b710
732b710 Merge pull request #5 from Tony-Gitt/master 0d1d6e2 fix beyondmimic git-subtree-dir: modules/atom01_train/robolab git-subtree-split: 732b710f294926b8dd057057a6c3d86634c51e3f
1 parent a907f03 commit d7df768

File tree

2 files changed

+38
-55
lines changed

2 files changed

+38
-55
lines changed

robolab/tasks/manager_based/beyondmimic/atom01_beyondmimic_env_cfg.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,16 @@
3838
from isaaclab.utils import configclass
3939
from robolab import ROBOLAB_ROOT_DIR
4040

41+
s_body_name=[
42+
'left_thigh_yaw_link',
43+
'right_thigh_yaw_link',
44+
'left_knee_link',
45+
'right_knee_link',
46+
'left_elbow_yaw_link',
47+
'right_elbow_yaw_link',
48+
'left_ankle_pitch_link',
49+
'right_ankle_pitch_link',
50+
]
4151

4252
@configclass
4353
class Atom01BeyondMimicEnvCfg(BeyondMimicEnvCfg):
@@ -78,4 +88,15 @@ def __post_init__(self):
7888
self.observations.policy.motion_anchor_pos_b = None
7989
self.observations.policy.base_lin_vel = None
8090

91+
self.events.randomize_com_positions.params["asset_cfg"].body_names="torso_link"
92+
self.rewards.motion_special_body_pos.params["body_names"]=s_body_name
93+
self.rewards.undesired_contacts.params["sensor_cfg"].body_names=[
94+
r"^(?!left_ankle_roll_link$)(?!right_ankle_roll_link$).+$"
95+
]
96+
self.rewards.feet_slide.params["sensor_cfg"].body_names=".*_ankle_roll_link"
97+
self.rewards.feet_slide.params["asset_cfg"].body_names=".*_ankle_roll_link"
98+
self.rewards.feet_orientation_l2.params["sensor_cfg"].body_names=".*_ankle_roll_link"
99+
self.rewards.feet_orientation_l2.params["asset_cfg"].body_names=".*_ankle_roll_link"
100+
# self.terminations.ee_body_pos.params["body_names"]=None
101+
81102
self.episode_length_s = 20.0

robolab/tasks/manager_based/beyondmimic/beyondmimic_env_cfg.py

Lines changed: 17 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -67,39 +67,15 @@
6767
"pitch": (-0.52, 0.52),
6868
"yaw": (-0.78, 0.78),
6969
}
70+
POSE_RANGE = {
71+
"x": (-0.05, 0.05),
72+
"y": (-0.05, 0.05),
73+
"z": (-0.01, 0.01),
74+
"roll": (-0.1, 0.1),
75+
"pitch": (-0.1, 0.1),
76+
"yaw": (-0.2, 0.2),
77+
}
7078

71-
ori_body_names=[
72-
'left_thigh_yaw_link',
73-
'right_thigh_yaw_link',
74-
'torso_link',
75-
'left_thigh_roll_link',
76-
'right_thigh_roll_link',
77-
'left_arm_pitch_link',
78-
'right_arm_pitch_link',
79-
'left_thigh_pitch_link',
80-
'right_thigh_pitch_link',
81-
'left_arm_roll_link',
82-
'right_arm_roll_link',
83-
'left_knee_link',
84-
'right_knee_link',
85-
'left_arm_yaw_link',
86-
'right_arm_yaw_link',
87-
'left_elbow_pitch_link',
88-
'right_elbow_pitch_link',
89-
'left_elbow_yaw_link',
90-
'right_elbow_yaw_link'
91-
]
92-
93-
s_body_name=[
94-
'left_thigh_yaw_link',
95-
'right_thigh_yaw_link',
96-
'left_knee_link',
97-
'right_knee_link',
98-
'left_elbow_yaw_link',
99-
'right_elbow_yaw_link',
100-
'left_ankle_pitch_link',
101-
'right_ankle_pitch_link',
102-
]
10379

10480
@configclass
10581
class MySceneCfg(InteractiveSceneCfg):
@@ -150,14 +126,7 @@ class CommandsCfg:
150126
asset_name="robot",
151127
resampling_time_range=(1.0e9, 1.0e9),
152128
debug_vis=True,
153-
pose_range={
154-
"x": (-0.05, 0.05),
155-
"y": (-0.05, 0.05),
156-
"z": (-0.01, 0.01),
157-
"roll": (-0.1, 0.1),
158-
"pitch": (-0.1, 0.1),
159-
"yaw": (-0.2, 0.2),
160-
},
129+
pose_range=POSE_RANGE,
161130
velocity_range=VELOCITY_RANGE,
162131
joint_position_range=(-0.1, 0.1),
163132
)
@@ -254,7 +223,7 @@ class EventCfg:
254223
func=mdp.randomize_rigid_body_com,
255224
mode="startup",
256225
params={
257-
"asset_cfg": SceneEntityCfg("robot", body_names="torso_link"),
226+
"asset_cfg": SceneEntityCfg("robot", body_names=MISSING),
258227
"com_range": {"x": (-0.025, 0.025), "y": (-0.05, 0.05), "z": (-0.05, 0.05)},
259228
},
260229
)
@@ -316,7 +285,7 @@ class RewardsCfg:
316285
motion_special_body_pos = RewTerm(
317286
func=mdp.motion_special_body_postion_error_exp,
318287
weight=0.0,
319-
params={"command_name":"motion","std":0.1,"body_names":s_body_name},
288+
params={"command_name":"motion","std":0.1,"body_names":MISSING},
320289
)
321290

322291
# Others
@@ -326,9 +295,7 @@ class RewardsCfg:
326295
params={
327296
"sensor_cfg": SceneEntityCfg(
328297
"contact_forces",
329-
body_names=[
330-
r"^(?!left_ankle_roll_link$)(?!right_ankle_roll_link$).+$"
331-
],
298+
body_names=MISSING,
332299
),
333300
"threshold": 1.0,
334301
},
@@ -337,16 +304,16 @@ class RewardsCfg:
337304
func=mdp.feet_slide,
338305
weight=-0.5,
339306
params={
340-
"sensor_cfg": SceneEntityCfg("contact_forces", body_names=".*_ankle_roll_link"),
341-
"asset_cfg": SceneEntityCfg("robot", body_names=".*_ankle_roll_link"),
307+
"sensor_cfg": SceneEntityCfg("contact_forces", body_names=MISSING),
308+
"asset_cfg": SceneEntityCfg("robot", body_names=MISSING),
342309
},
343310
)
344311
feet_orientation_l2 = RewTerm(
345312
func=mdp.feet_orientation_l2,
346313
weight=-0.5,
347314
params={
348-
"sensor_cfg": SceneEntityCfg("contact_forces", body_names=".*_ankle_roll_link"),
349-
"asset_cfg": SceneEntityCfg("robot", body_names=".*_ankle_roll_link"),
315+
"sensor_cfg": SceneEntityCfg("contact_forces", body_names=MISSING),
316+
"asset_cfg": SceneEntityCfg("robot", body_names=MISSING),
350317
},
351318
)
352319

@@ -369,12 +336,7 @@ class TerminationsCfg:
369336
# params={
370337
# "command_name": "motion",
371338
# "threshold": 0.25,
372-
# "body_names": [
373-
# "left_ankle_roll_link",
374-
# "right_ankle_roll_link",
375-
# "left_wrist_yaw_link",
376-
# "right_wrist_yaw_link",
377-
# ],
339+
# "body_names": MISSING,
378340
# },
379341
# )
380342

0 commit comments

Comments
 (0)