diff --git a/gymnasium_robotics/envs/adroit_hand/adroit_pen.py b/gymnasium_robotics/envs/adroit_hand/adroit_pen.py index baaebec5..72b27a17 100644 --- a/gymnasium_robotics/envs/adroit_hand/adroit_pen.py +++ b/gymnasium_robotics/envs/adroit_hand/adroit_pen.py @@ -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