You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Specifically, the shift applied to the initial hand position will cumulate. To reproduce this bug, one can run by setting the task_arguments with randomize_hand_positions=True.
I fix this issue in a hacky way by recording the previously applied offset and adding the offset back before applying a new offset. So the _randomize_initial_hand_positions changes to:
def_randomize_initial_hand_positions(
self, physics: mjcf.Physics, random_state: np.random.RandomState
) ->None:
"""Randomize the initial position of the hands."""ifnotself._randomize_hand_positions:
returnoffset=random_state.uniform(low=-_POSITION_OFFSET, high=_POSITION_OFFSET)
forhandin [self.right_hand, self.left_hand]:
hand.shift_pose(physics, (0, -self._last_offset, 0)) # to correct the offset.hand.shift_pose(physics, (0, offset, 0))
self._last_offset=offset
Hope you have a better solution. Or I can open a PR.
Best,
Yi
The text was updated successfully, but these errors were encountered:
When using the augmentation
randomize_hand_positions
, there is a bug for the state of thephysics
.robopianist/robopianist/suite/tasks/piano_with_shadow_hands.py
Lines 447 to 455 in d9cde23
randomize_hand_positions=True
.I fix this issue in a hacky way by recording the previously applied offset and adding the offset back before applying a new offset. So the
_randomize_initial_hand_positions
changes to:Hope you have a better solution. Or I can open a PR.
Best,
Yi
The text was updated successfully, but these errors were encountered: