in gym_genesis/tasks/cube_pick.py [0:0]
def compute_reward(self):
# Get z positions of cube in each env
z = self.cube.get_pos().cpu().numpy() # shape: (B, 3)
z_height = z[:, -1] # get the z (height) coordinate for each env
reward = (z_height > 0.1).astype(np.float32) # shape: (B,)
return reward