From 30433f54186518dd671e022693e4d0245f2f1906 Mon Sep 17 00:00:00 2001 From: Kallinteris Andreas <30759571+Kallinteris-Andreas@users.noreply.github.com> Date: Mon, 8 Jan 2024 09:54:14 +0200 Subject: [PATCH] Update adroit_hammer.py --- gymnasium_robotics/envs/adroit_hand/adroit_hammer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gymnasium_robotics/envs/adroit_hand/adroit_hammer.py b/gymnasium_robotics/envs/adroit_hand/adroit_hammer.py index 74abb5fa..8d4c6c0d 100644 --- a/gymnasium_robotics/envs/adroit_hand/adroit_hammer.py +++ b/gymnasium_robotics/envs/adroit_hand/adroit_hammer.py @@ -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