Skip to content

Commit

Permalink
SYNC, UPDATE, FIX: Sync with MyoSuite 2.1.3
Browse files Browse the repository at this point in the history
- MyoHand_tabletop - ARTX range updated to +-1.25
- Bugfix for hfield turning black
- MyoChal/Mani: BugFix and update in env prms
- MyoChal/loco: Adding P2 envs
- MyoChal/Relocate+ReOrient: Rolling back bug fix in hand_qpos. Will push this update post challenge
- myodm env and objects refreshed
  • Loading branch information
vikashplus committed Oct 10, 2023
1 parent ff2d489 commit 3564bb2
Show file tree
Hide file tree
Showing 11 changed files with 511 additions and 78 deletions.
2 changes: 1 addition & 1 deletion robohive/envs/myo/assets/hand/MyoHand_tabletop.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<geom type="plane" rgba=".1 .1 .1 1" size="10 10 1" pos="0 0 -.76"/>

<body pos="0.1 -0.55 0.32" euler="0 0 0">
<joint name="ARTx" pos="0 0 0" axis="1 0 0" type="slide" range="-.05 .05" damping="20" limited="true"/>
<joint name="ARTx" pos="0 0 0" axis="1 0 0" type="slide" range="-.25 .25" damping="20" limited="true"/>
<joint name="ARTy" pos="0 0 0" axis="0 1 0" type="slide" range="-.3 .4" damping="20" limited="true"/>
<joint name="ARTz" pos="0 0 0" axis="0 0 1" type="slide" range="-0.1 .1" damping="20" limited="true"/>
<joint name="ARRx" pos="0 0 0" axis="1 0 0" range="-1.75 1.75" damping="20" limited="true"/>
Expand Down
2 changes: 1 addition & 1 deletion robohive/envs/myo/myobase/walk_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def reset(self):
normalized_data = (new_terrain_data + 2) / (2 + stair_height * num_stairs)
self.sim.model.hfield_data[:] = np.flip(normalized_data.reshape(100,100)*scalar, [0,1]).reshape(10000,)

self.sim.model.geom_rgba[self.sim.model.geom_name2id('terrain')] = np.array([0,0,0,1])
self.sim.model.geom_rgba[self.sim.model.geom_name2id('terrain')][-1] = 1.0
self.sim.model.geom_pos[self.sim.model.geom_name2id('terrain')] = np.array([0,0,0])
self.sim.model.geom_contype[self.sim.model.geom_name2id('terrain')] = 1
self.sim.model.geom_conaffinity[self.sim.model.geom_name2id('terrain')] = 1
Expand Down
44 changes: 34 additions & 10 deletions robohive/envs/myo/myochallenge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


# MyoChallenge 2023 envs ==============================================
# MyoChallenge Manipulation
# MyoChallenge Manipulation P1
register(id='myoChallengeRelocateP1-v0',
entry_point='robohive.envs.myo.myochallenge.relocate_v0:RelocateEnvV0',
max_episode_steps=150,
Expand All @@ -21,7 +21,7 @@
}
)

# MyoChallenge Manipulation
# MyoChallenge Manipulation P2
register(id='myoChallengeRelocateP2-v0',
entry_point='robohive.envs.myo.myochallenge.relocate_v0:RelocateEnvV0',
max_episode_steps=150,
Expand All @@ -32,26 +32,50 @@
'pos_th': 0.1, # cover entire base of the receptacle
'rot_th': np.inf, # ignore rotation errors
'qpos_noise_range':0.01, # jnt initialization range
'target_xyz_range': {'high':[0.3, -.45, 0.9], 'low':[0.0, -.1, 1.05]},
'target_rxryrz_range': {'high':[-.2, -.2, -.2], 'low':[0.2, 0.2, 0.2]},
'target_xyz_range': {'high':[0.3, -.1, 1.05], 'low':[0.0, -.45, 0.9]},
'target_rxryrz_range': {'high':[0.2, 0.2, 0.2], 'low':[-.2, -.2, -.2]},
'obj_xyz_range': {'high':[0.1, -.15, 1.0], 'low':[-0.1, -.35, 1.0]},
'obj_geom_range': {'high':[.025, .025, .025], 'low':[.015, 0.015, 0.015]},
'obj_mass_range': {'high':0.200, 'low':0.050},# 50gms to 250 gms
'obj_mass_range': {'high':0.200, 'low':0.050},# 50gms to 200 gms
'obj_friction_range': {'high':[1.2, 0.006, 0.00012], 'low':[0.8, 0.004, 0.00008]}
}
)


# MyoChallenge Locomotion
## MyoChallenge Locomotion P1
register(id='myoChallengeChaseTagP1-v0',
entry_point='robohive.envs.myo.myochallenge.chasetag_v0:ChaseTagEnvV0',
max_episode_steps=2000,
kwargs={
'model_path': curr_dir+'/../../../simhive/myo_sim/leg/myolegs_chasetag_v0.10(mj237).mjb',
'model_path': curr_dir+'/../../../simhive/myo_sim/leg/myolegs_chasetag_v0.11(mj237).mjb',
'normalize_act': True,
'reset_type':'init', # none, init, random
'win_distance': 0.5,
'min_spawn_distance': 2
'min_spawn_distance': 2,
'reset_type': 'init', # none, init, random
'terrain': 'FLAT', # FLAT, random
'task_choice': 'CHASE', # CHASE, EVADE, random
'hills_range': (0.0, 0.0),
'rough_range': (0.0, 0.0),
'relief_range': (0.0, 0.0),
}
)


# MyoChallenge Locomotion P2
register(id='myoChallengeChaseTagP2-v0',
entry_point='robohive.envs.myo.myochallenge.chasetag_v0:ChaseTagEnvV0',
max_episode_steps=2000,
kwargs={
'model_path': curr_dir+'/../../../simhive/myo_sim/leg/myolegs_chasetag_v0.11(mj237).mjb',
'normalize_act': True,
'win_distance': 0.5,
'min_spawn_distance': 2,
'reset_type': 'random', # none, init, random
'terrain': 'random', # FLAT, random
'task_choice': 'random', # CHASE, EVADE, random
'hills_range': (0.03, 0.23),
'rough_range': (0.05, 0.1),
'relief_range': (0.1, 0.3),
}
)

Expand Down Expand Up @@ -129,4 +153,4 @@
'obj_friction_change': (0.2, 0.001, 0.00002), # nominal: 1.0, 0.005, 0.0001
'task_choice': 'random'
}
)
)
Loading

0 comments on commit 3564bb2

Please sign in to comment.