diff --git a/README.md b/README.md index 6adb0b6..2544281 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ # Roadmap -* Change the lookat point to teh pointcloud average xyz instead of bbox center * Debug with model output pose * Change simulation scenes * Interface with GS-Net diff --git a/src/active_grasp/active_perception_policy.py b/src/active_grasp/active_perception_policy.py index 44ffa5c..b124b63 100644 --- a/src/active_grasp/active_perception_policy.py +++ b/src/active_grasp/active_perception_policy.py @@ -209,7 +209,11 @@ class ActivePerceptionSingleViewPolicy(SingleViewPolicy): current_cam_pose = torch.from_numpy(x.as_matrix()).float().to("cuda:0") est_delta_rot_mat = self.rotation_6d_to_matrix_tensor_batch(delta_rot_6d)[0] - look_at_center = torch.from_numpy(self.bbox.center).float().to("cuda:0") + + target_points_np = target_points.cpu().numpy()[0,:,:] + central_point_of_target = np.mean(target_points_np, axis=0) + + look_at_center = torch.from_numpy(central_point_of_target).float().to("cuda:0") nbv_tensor = self.get_transformed_mat(current_cam_pose, est_delta_rot_mat, look_at_center)