Document toolboxDocument toolbox

WIP Parallel Gripper Tutorial

Parallel Gripper system is a mechanical gripper that uses parallel fingers that can close and open

In this tutorial we will learn how to create this system by setting up the Parallel Gripper Base and Fingers

 

In the tutorials, open scene1. Here you will find a prepared scene containing two main components:

  • A box that can be picked

  • A placeholder parallel gripper with the correct hierarchy

 

Setup Box

  1. Select the box and click ‘Add Component’

    1. Add ‘Rigidbody’

    2. Add ‘Box Collider’

Both default settings are sufficient.

 

Setup a Parallel Gripper

Setup the Base

  1. Select ParallelGripper and add Components

    1. Add Parallel Gripper Base

    2. Add Rigidbody

      1. Use Gravity Off

      2. Is Kinematic On

    3. Add Box collider

Lets leave this component and start setting the fingers

Setup of Parallel Fingers

  1. Select the GripperRight

  2. Add Component DSpline

  3. Unfold SplineControlPoints and select Point[2]

  4. Move this to position 0, 0 ,-0.5

  5. Select FingerRight

  6. Add Component DPrismatic Joint

  7. Drag the newly created DSpline in the DPrismatic Joint

  8. Add Components

    1. Add Parallel Gripper Finger Component

    2. Add Box Collider

    3. Add Rigidbody Component

      1. Use Gravity Off

      2. Is Kinematic On

  9. Drag the Rigidbody component into the Parallel Gripper Finger and make sure the callback method is set to Rigidbody.

 

Repeat these steps for the other gripper fingers

The only difference is the positioning of the spline control points

Here you have two options.

You do it with the same offset and invert the finger in the Parallel Gripper Base inspector, or (more preferably) swap position of point[1] and point[2] to make sure point[1] is the open state and point[2] the closed state.

Continue with the parallel Gripper Base

Now we can go back to the ParallelGripper GameObject

  1. Here we need to add the fingers to the base

    1. Drag the Fingers, or open the Selection tab

Because we use the Prespective Prismatic Joint we also need a Kinematics controller. Kinenmatics controller can already be included in the chain when the gripper is used as an end effector on for example a robotarm.

In this example we don’t have it connected to anything, so we need to add it to the Parallel Gripper Base.

  1. Add Component

    1. Add DKinematicsController

 

Create a Control Panel

You can create a control panel to modify to enable the gripper from another gameobject. This can be useful if you place all control panels on one object to get an overview.

 

  1. Create the control panel by pressing the Generate Control Panel button.

Now you see a new MonoBehaviour being placed on the Parallel Gripper

 

  1. Create an empty gameoject and name it ControlPanel

  2. Go back to the Parallel Gripper and drags the Control Panel Interface UIE to the newly created ControlPanel GameObject.

  3. You can now control the Gripper from this Control Panel GameObject when Unity is in playmode.

 

Test the Gripper

Unity does not provide Kinematic- Kinematic contact pairs. This should be enabled per project. If the setting does not align with the expected setting, this shows up in the inspector and shows the option to set it to Kinematic – Kinematic contact pairs or to All contact pairs. Otherwise the finger-finger collisions are not picked up by Unity’s PhysX. You can also change this setting in the Project Settings

 

 

The gripper can be placed above the Box to be picked up

 

Press the close button on the inspector to close the gripper

 

Now the grippers are moved inwards and will stop when the hit the box object. The inspector shows the gripped object

 

Now you can move the gripper around until the gripper is ‘opened’.

The object now drops

Prespective Documentation