How to add a suction gripper on UR10 robot & acces source code for UR10 Palletizing?

I have two questions.

I wonder how to add a suction gripper on a Universal Robot (UR10) within the python script? Should I import UR10 with short_gripper off the bat, and if so how can I do it?

I also tried to find the source code for Isaac Examples → Demos → UR10 Palletizing, but there was no menu for it. So I looked for it in the folder extension_examples and yet it wasn’t there… any idea of where it is located/if it is accesible?

1 Like

Hello, to answer the second part of your question, the code is in omni.isaac.samples. I suggest you take a look at
exts/omni.isaac.samples/omni/isaac/samples/scripts/ur10_scenarios/fill_bin.py, as it’s a lighter version of the palletizing demo.

For an even simpler script sample, use Isaac Samples → Manipulation → Surface Gripper. Code is available on exts/omni.isaac.examples/omni/isaac/examples/surface_gripper

See Surface Gripper — Omniverse Robotics documentation for reference.

1 Like

@rgasoto Thanks for the great tip!

I managed to add a gripper to UR10, but it’s the default one… as of how to swap it I have no clue.

“”“Seting up UR10 robot”""

        """Seting up UR10 robot"""
        ur10 = world.scene.add(
            UR10(
                prim_path="/World/UR10",
                name="UR10",
                position=np.array([0, 0, 51.5]), 
                attach_gripper=True
                )
            )

The code that attaches the gripper is defined in:
exts/omni.isaac.universal_robots/omni/isaac/universal_robots/ur10.py

        if attach_gripper:
            if gripper_usd == "default":
                result, nucleus_server = find_nucleus_server()
                if result is False:
                    carb.log_error("Could not find nucleus server with /Isaac folder")
                    return
                gripper_usd = nucleus_server + "/Isaac/Robots/UR10/Props/short_gripper.usd"
                translate = 16.11
                direction = "x"
                self._gripper = SurfaceGripper(usd_path=gripper_usd, translate=translate, direction=direction)
            elif gripper_usd is None:
                carb.log_warn("Not adding a gripper usd, the gripper already exists in the ur10 asset")
                self._gripper = SurfaceGripper(usd_path=None)
            else:
                raise NotImplementedError