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 d52c598 commit 293494e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mani_skill2/envs/scenes/tasks/pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ 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"]:
if k in info:
if isinstance(new_info[k], torch.Tensor):
if isinstance(info[k], torch.Tensor):
new_info[k] = info[k].clone()
elif isinstance(new_info[k], np.ndarray):
elif isinstance(info[k], np.ndarray):
new_info[k] = info[k].copy()
else:
new_info[k] = info[k]
Expand Down

0 comments on commit 293494e

Please sign in to comment.