[Suggestion] checking variable type at `compute_inverse_kinematics`


I suggest adding a type check at def compute_inverse_kinematics at omni/isaac/motion_generation/articulation_knematics_solver.py. I think the below two lines should be added just below warm_start = self._joints_view.get_joint_positions().

if type(warm_start) is not np.ndarray:
    warm_start = warm_start.detach().cpu().numpy()

I tried reaching task with UR5e using I.K rather than pure joint positions which are used by actions in RL environment. In this situation, there was hard to match a type of input to calculate I.K.

For example,

def pre_physics_step(self, actions) -> None:
  ur5es = self._scene.get_object("ur5e")
  controller = KinematicsSolver(ur5es, end_effector_frame_name="tool0")
  self.np_target_position = self.actions.cpu().numpy()
  self.np_target_orientation = np.tile(self.target_orientation, (self._num_envs, 1))
  self.np_target_orientation = np.float32(self.np_target_orientation)
  targets = [torch.from_numpy(
      ).to(device=self._device) for i in range(self._num_envs)]
  targets = torch.stack(targets, dim=0)

when I create instances for making controllers, getting values, ets…, many values related to the robot are the tensors. Nevertheless, compute_inverse_kinematics gets inputs only for numpy, there is a line that automatically gets a self variable which is a tensor such as self._joints_view.