Document toolboxDocument toolbox

WIP Angular Gripper Tutorial

Angular Gripper system is a mechanical gripper that uses angular fingers that can close and open by rotation.

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

 

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

  • A box that can be picked

  • A placeholder angular 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 Angular Gripper

Setup the Base

  1. Select the ‘Angular Gripper’ and Click Add Component

    1. Add Angular Gripper Base

    2. Add a Rigidbody Component

      1. Use Gravity Off

      2. Is Kinematic On

    3. Add Box Collider

This way we can control the gripper and interact with other PhysX components.

 

Lets leave this part for now and continue with setting up the suction cups

Setup the Fingers

  1. Select the GripperRight

  2. Add Component DWheelJoint

  3. Unfold Wheel Axis Direction

  4. Set it to Vector Direction ‘Right’

  5. Now you can set limits on minimum rotation (-90) and maximum rotation (0) and the current rotation (-90) (or do it later on in the Angular Finger)

  6. Add Component AngularFinger

  7. Select the FingerRight

    1. Add Box Collider

    2. Add Rigidbody Component

      1. Use Gravity Off

      2. Is Kinematic On

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

Do the same thing for the other gripper

There are two main options for setting the other gripper. One is to flip the wheel joint direction and keep the limits.

Or you can keep the rotation axis and reset the limits to min 0, max 90 and current 90

 

Continue setting up the Angular Base

Now we can go back to the AngularGripper GameObject

 

Here we need to add the fingers to the base

  1. Drag the Fingers, or open the Selection tab

  2. Depending on the way of setting up the wheeljoint, you might need to invert one of the fingers to close and open. Easiest way is to go into playmode and see what happens. (invert the one to make the gripper close when you press close)

Because we use the Prespective Wheel Joint we also need a Kinematics controller. Kinematics 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. 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 Angular Gripper

  1. Create an empty gameoject and name it ControlPanel

  2. Go back to the Angular Gripper and drag 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. Or you can set it in 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 drops when the gripper is opened

 

Prespective Documentation