Skip to content

Commit

Permalink
Update adroit_pen.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Kallinteris-Andreas authored Jan 8, 2024
1 parent 30433f5 commit 73023c7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gymnasium_robotics/envs/adroit_hand/adroit_pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,7 @@ def step(self, a):
# compute the sparse reward variant first
goal_distance = np.linalg.norm(obj_pos - desired_loc)
orien_similarity = np.dot(obj_orien, desired_orien)
goal_achieved = (
True if (goal_distance < 0.075 and orien_similarity > 0.95) else False
)
goal_achieved = goal_distance < 0.075 and orien_similarity > 0.95)
reward = 10.0 if goal_achieved else -0.1

# goal_failed = obj_pos[2] < 0.075
Expand Down

0 comments on commit 73023c7

Please sign in to comment.