From 9771097125dc779c74ba860d7de689f61ffa344d Mon Sep 17 00:00:00 2001 From: HaozhiQi Date: Sun, 27 Nov 2022 18:19:17 -0800 Subject: [PATCH] bug fix for grasp generation --- hora/tasks/allegro_hand_grasp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hora/tasks/allegro_hand_grasp.py b/hora/tasks/allegro_hand_grasp.py index 169af31..1c04259 100644 --- a/hora/tasks/allegro_hand_grasp.py +++ b/hora/tasks/allegro_hand_grasp.py @@ -81,7 +81,7 @@ def reset_idx(self, env_ids): self.gym.set_actor_root_state_tensor_indexed(self.sim, gymtorch.unwrap_tensor(self.root_state_tensor), gymtorch.unwrap_tensor(object_indices), len(object_indices)) - pos = to_torch(self.canonical_pose)[None].repeat(len(env_ids), 1) + pos = to_torch(self.canonical_pose, device=self.device)[None].repeat(len(env_ids), 1) pos += 0.25 * rand_floats[:, 5:5 + self.num_allegro_hand_dofs] pos = tensor_clamp(pos, self.allegro_hand_dof_lower_limits, self.allegro_hand_dof_upper_limits)