Skip to content

Commit

Permalink
BUGFIX: Updated envs with the same horizon as the MyoChallenge envs
Browse files Browse the repository at this point in the history
  • Loading branch information
vikashplus committed Jan 4, 2023
1 parent b09b5a2 commit 36df69c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions mj_envs/envs/myo/myochallenge/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# MyoChallenge Die: Trial env
register(id='myoChallengeDieReorientDemo-v0',
entry_point='mj_envs.envs.myo.myochallenge.reorient_v0:ReorientEnvV0',
max_episode_steps=50,
max_episode_steps=150,
kwargs={
'model_path': curr_dir+'/../assets/hand/myo_hand_die.xml',
'normalize_act': True,
Expand All @@ -20,7 +20,7 @@
# MyoChallenge Die: Phase1 env
register(id='myoChallengeDieReorientP1-v0',
entry_point='mj_envs.envs.myo.myochallenge.reorient_v0:ReorientEnvV0',
max_episode_steps=50,
max_episode_steps=150,
kwargs={
'model_path': curr_dir+'/../assets/hand/myo_hand_die.xml',
'normalize_act': True,
Expand All @@ -32,7 +32,7 @@
# MyoChallenge Die: Phase2 env
register(id='myoChallengeDieReorientP2-v0',
entry_point='mj_envs.envs.myo.myochallenge.reorient_v0:ReorientEnvV0',
max_episode_steps=50,
max_episode_steps=150,
kwargs={
'model_path': curr_dir+'/../assets/hand/myo_hand_die.xml',
'normalize_act': True,
Expand Down
1 change: 0 additions & 1 deletion mj_envs/envs/myo/myochallenge/reorient_v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def get_reward_dict(self, obs_dict):
))
rwd_dict['dense'] = np.sum([wt*rwd_dict[key] for key, wt in self.rwd_keys_wt.items()], axis=0)

# print(rwd_dict['solved'], rwd_dict['done'])
# Sucess Indicator
self.sim.model.site_rgba[self.success_indicator_sid, :2] = np.array([0, 2]) if rwd_dict['solved'] else np.array([2, 0])
return rwd_dict
Expand Down
2 changes: 1 addition & 1 deletion mj_envs/envs/myo/sync_myo.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Utility script to sync between mj_envs to myosuite repo repository
# Utility script to sync from mj_envs to myosuite repo repository
# Note: that its a one way sync at the moment "mj_envs => myosuite"
# Usage: .sync_myo.sh <full_path>/mj_envs/ <full_path>/myoSuite/

Expand Down
2 changes: 1 addition & 1 deletion mj_envs/tests/test_myo.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def test_myochallenge(self):
'myoChallengeDieReorientDemo-v0', 'myoChallengeDieReorientP1-v0', 'myoChallengeDieReorientP2-v0',
'myoChallengeBaodingP1-v1', 'myoChallengeBaodingP2-v1'
]
self.check_envs('Myo', env_names)
self.check_envs('MyoChallenge', env_names)

if __name__ == '__main__':
unittest.main()

0 comments on commit 36df69c

Please sign in to comment.