Skip to content

Commit

Permalink
Update adroit_hammer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kallinteris-Andreas authored Jan 8, 2024
1 parent 90b4224 commit 30433f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gymnasium_robotics/envs/adroit_hand/adroit_hammer.py
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ def step(self, a):

# compute the sparse reward variant first
goal_distance = np.linalg.norm(nail_pos - goal_pos)
goal_achieved = True if goal_distance < 0.01 else False
goal_achieved = goal_distance < 0.01
reward = 10.0 if goal_achieved else -0.1

# override reward if not sparse reward
Expand Down

0 comments on commit 30433f5

Please sign in to comment.