Skip to content

Commit

Permalink
fix contact reward bug
Browse files Browse the repository at this point in the history
  • Loading branch information
yukezhu committed Jun 1, 2018
1 parent ed29bea commit 91acd8b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MujocoManip/environments/sawyer_lift.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ def reward(self, action):
touch_right_finger = True
if c.geom1 == self.cube_geom_id and c.geom2 == self.r_finger_geom_id:
touch_right_finger = True
if touch_right_finger and touch_right_finger:
if touch_left_finger and touch_right_finger:
reward += 0.25

return reward
Expand Down
2 changes: 1 addition & 1 deletion MujocoManip/environments/sawyer_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def staged_rewards(self):
touch_right_finger = True
if c.geom1 == self.cubeA_geom_id and c.geom2 == self.r_finger_geom_id:
touch_right_finger = True
if touch_right_finger and touch_right_finger:
if touch_left_finger and touch_right_finger:
r_reach += 0.25

# lifting is successful when the cube is above the table top
Expand Down

0 comments on commit 91acd8b

Please sign in to comment.