Accessing surface gripper in RL environment

I set up a RL environment in Isaac Sim using OmniIsaacGymEnv plug in and the RLTask class. I am using the UR10 class set up in omni.isaac.universal_robots directory.
I view the robot instances through ArticulationView and the ee_link through RigidPrimView but I cannot gain access to the gripper methods. I would like to see the same behavior as the pick_place example. Any hints? Code below.

def set_up_scene(self, scene) -> None:
        self.get_ur10()
        self.get_target()
        super().set_up_scene(scene)
        self._robots = ArticulationView(prim_paths_expr="/World/envs/.*/ur10", name="ur10_view", reset_xform_properties=False)
        scene.add(self._robots)
        # end-effectors view
        self._hands = RigidPrimView(prim_paths_expr="/World/envs/.*/ur10/ee_link", name="hand_view", reset_xform_properties=False)
        scene.add(self._hands)
        # target view
        self._targets = RigidPrimView(prim_paths_expr="/World/envs/.*/target", name="target_view", reset_xform_properties=False)
        scene.add(self._targets)

I entered with the same problem. Have you found a solution for this? Thank you.

Hi there, in order to access the UR10 SurfaceGripper, you would need to create an instance of the UR10 class in the task self._robot = UR10(...) and add the robot instance to the scene with scene.add(self._robot). Then, you can access the SurfaceGripper component with self._robot.gripper.

Hi there, I used exactly the described setup (= RLTask from OmniIsaacGymEnvs & UR10 Robot), however my gripper won’t close:

def pre_physics_step(self, actions) -> None:
    reset_env_indices = self.reset_buf.nonzero(as_tuple=False).squeeze(-1)
    if 0 < len(reset_env_indices):
        self.reset_envs(reset_env_indices)

    # Rotate Joints
    joint_rots = self._robots_view.get_joint_positions()
    joint_rots += torch.tensor(actions[:, 0:6]) * self._max_joint_rot_speed
    self._robots_view.set_joint_positions(positions=joint_rots)

    # Open or close Gripper
    for env_index in range(self._num_envs):
        gripper = self._robots[env_index].gripper
        is_closed = gripper.is_closed()
        gripper_action = actions[env_index, 6]
        if 0.9 < gripper_action and is_closed:
            gripper.open()
        elif gripper_action < -0.3 and not is_closed:
            gripper.close()

I tested the code by having it called explicitly without the Actor Action and placing a part right into the gripper, however it does not work. I also have a single threaded Implementation with a single actor that doesn’t use RLTask and there the gripper works.

Hi @overflow.operator - Can you confirm what version of Isaac Sim and OIGE are you using?