Surface Gripper

About

The Surface Gripper Extension is used to create a suction-cup gripper behavior for an end-effector. It works by creating a Joint between two bodies when the parent body is close enough to the child at the gripper point of contact.

This extension is enabled by default. If it is ever disabled, it can be re-enabled from the Extension Manager by searching for omni.isaac.surface_gripper.

API Documentation

See the API Documentation for usage information.

Tutorials & Examples

The following example showcases how to best use this extension:

Examples

  • Surface Gripper Example: Isaac Examples > Manipulation > Surface Gripper

Surface Gripper Example

To run the Example:

  1. Go to the top menu bar and click Isaac Examples > Manipulation > Surface Gripper

  2. Press the Load Scene button.

  3. Press the PLAY button to begin simulating.

  4. Toggle the Gripper State button to CLOSE to attach the cone to the cube. The cone will turn RED on successful attachment.

  5. Adjust the Gripper Force and Gripper Speed sliders to change the force intensity at the Cone. Excessive forces will break the gripper attachment, and the cone will go back to GREEN when the surface gripper is open.

Code Snippets

This section describes the functionality of the Surface Gripper Sample code. On this document, we will only cover the portion that pertains to the Surface Gripper.

Create Gripper Properties

Surface Gripper properties are defined within the _create_scenario function. Let’s take a closer look at the different parameters of the Gripper Properties:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
async def _create_scenario(self, task):
    # [...]

    # Create the Gripper Properties
    self.sgp = Surface_Gripper_Properties()
    self.sgp.d6JointPath = ""
    self.sgp.parentPath = "/GripperCone"                # Set the Cone as the parent object
    self.sgp.offset = dc.Transform()                    # Offset the transform to the base of the Cone
    self.sgp.offset.p.x = 0
    self.sgp.offset.p.z = -30.01
    self.sgp.offset.r = [0, 0.7171, 0, 0.7171]          # Rotate to point gripper in Z direction
    self.sgp.gripThreshold = 2                          # Set attachment to within 2cm of the base of the Cone
    self.sgp.forceLimit = 1.0e4                         # Set other limits of the gripper ...
    self.sgp.torqueLimit = 1.0e5
    self.sgp.bendAngle = np.pi / 4
    self.sgp.stiffness = 1.0e4
    self.sgp.damping = 1.0e3

    self.surface_gripper = Surface_Gripper(self._dc)    # Create the Gripper
    self.surface_gripper.initialize(self.sgp)           # Initialize the Gripper with these Properties

    # [...]

Update Gripper State

The Surface Gripper is updated on every simulation step in the _on_simulation_step function. Use it to update the gripper status, and then change the cone color to RED if it’s closed or GREEN if it’s open.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
def _on_simulation_step(self, step):

    # [...]

    self.surface_gripper.update()                       # On every sim step, update the gripper status
    if self.surface_gripper.is_closed():                # Assign color to Cone based on current state
        self.coneGeom.GetDisplayColorAttr().Set([self.color_closed])
    else:
        self.coneGeom.GetDisplayColorAttr().Set([self.color_open])

    # [...]

Toggle the Gripper

The Gripper State is controlled by the on_toggle_gripper_button_clicked function connected to the extension’s UI. It toggle the Gripper State between OPEN and CLOSE.

1
2
3
4
5
6
def _on_toggle_gripper_button_clicked(self, button):    # When receiving a button press
    if self._editor.is_playing():
        if self.surface_gripper.is_closed():            # Toggle Open or Close
            self.surface_gripper.open()
        else:
            self.surface_gripper.close()