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
Select the box and click ‘Add Component’
Add ‘Rigidbody’
Add ‘Box Collider’
Both default settings are sufficient.
Setup a Parallel Gripper
Setup the Base
Select ParallelGripper and add Components
Add Parallel Gripper Base
Add Rigidbody
Use Gravity Off
Is Kinematic On
Add Box collider
Lets leave this component and start setting the fingers
Setup of Parallel Fingers
Select the GripperRight
Add Component DSpline
Unfold SplineControlPoints and select Point[2]
Move this to position 0, 0 ,-0.5
Select FingerRight
Add Component DPrismatic Joint
Drag the newly created DSpline in the DPrismatic Joint
Add Components
Add Parallel Gripper Finger Component
Add Box Collider
Add Rigidbody Component
Use Gravity Off
Is Kinematic On
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
Here we need to add the fingers to the base
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.
Add Component
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.
Create the control panel by pressing the Generate Control Panel button.
Now you see a new MonoBehaviour being placed on the Parallel Gripper
Create an empty gameoject and name it ControlPanel
Go back to the Parallel Gripper and drags the Control Panel Interface UIE to the newly created ControlPanel GameObject.
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