MyoHub/myosuite

hand observations in relocate and reorient of myochallenge skips MD5 joint

vikashplus opened this issue · 0 comments

In relocate and reorient env of the myochallenge, the observation accidentally omits the MD5 (little finger distal) joint from the hand_qpos key. This bug omits the distal joint of the little finger from being included in the observation.

obs_dict['hand_qpos'] = sim.data.qpos[:-7].copy() # This is a bug. 

A fix for this bug would look like this

obs_dict['hand_qpos'] = sim.data.qpos[:-6].copy() # V1 of the env will use this corrected key by default

A fix to this will break all the submitted policies of the MyoChallenge. Therefore a fix will be pushed after the myochallenge23
and the env version will be bumped to v1

As a stop-gap solution, the keys are being renamed to hand_qpos_noMD5 to reflect what it currently has, and DEFAULT_OBS_KEYS is being updated to select this key. A corrected key hand_qpos is also getting added to the env but will not be used in the current version (v0) of the envs that are being used in the MyoChallenge23. This corrected key will become the default at a later date after the challenge is over

# This is a bug. This bug omits the distal joint of the little finger from the observation.
#  A fix to this will break all the submitted policies. To clearly mark the key is getting 
# renamed to hand_qpos_noMD5 that marks this exclusion
obs_dict['hand_qpos_noMD5'] = sim.data.qpos[:-7].copy() 
# This is the fix. V1 of the env will use this corrected key by default
#  A fix to this will be pushed after the myochallenge23
obs_dict['hand_qpos'] = sim.data.qpos[:-6].copy()

This needs to be qpos[:-6].