Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
arth-shukla committed Mar 6, 2024
1 parent 4369cae commit 67f38b2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mani_skill2/envs/scenes/tasks/pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,12 @@ def compute_dense_reward(self, obs: Any, action: torch.Tensor, info: Dict):

new_info = dict()
for k in ["elapsed_steps", "success", "fail", "is_grasped", "robot_force", "robot_cumulative_force"]:
new_info[k] = info[k].clone()
if isinstance(new_info[k], torch.Tensor):
new_info[k] = info[k].clone()
elif isinstance(new_info[k], np.ndarray):
new_info[k] = info[k].copy()
else:
new_info[k] = info[k]

if torch.any(robot_too_far):
# prevent torso and arm moving too much
Expand Down

0 comments on commit 67f38b2

Please sign in to comment.