Document toolboxDocument toolbox

WIP Vacuum Gripper Tutorial

In this tutorial we show you how to set up a vacuum gripper system based on unity cubes. For your own purposes this can be replaced with more accurate geometry.

 

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

  • A box that can be picked

  • A placeholder vacuum 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 Vacuum Gripper

Setup the Base

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

    1. Add Vacuum Gripper Base

    2. Add a Rigidbody Component

  2. Set the Rigidbody component to:

    1. Use Gravity Off

    2. Is Kinematic On

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 one of the Suction Cups

  2. Add components

    1. Add Vacuum Gripper Finger

    2. Add Box Collider

  3. Set the Box collider to Trigger

  4. Drag the collider into the Trigger field

It should now look like

If the collider is not a trigger it will show you this error in the console:

Do this for all Cups (1 to 4)

Continue with setup of the Vacuum Gripper

Select the Vacuum Gripper (base)

Add the vacuum fingers that you just created. You can do this by dragging the fingers on the add object field, or you can add it with the select button from the object field. Selecting one will add it immediately to the list.

 

Set the Activation Percentage to for example 0.8. This will overwrite the values on the fingers. If you select one of the fingers, the current value will show up

 

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 Vacuum Gripper

  1. Create an empty gameoject and name it ControlPanel

  2. Go back to the Vacuum 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

In the ‘Scene’ view of unity you can test the gripper by dragging the ‘VacuumGripper’ assembly on top of the ‘Box’ in such a way that the green colliders are penetrating the Box.

 

The easiest way to do this is set the unity view to Isometric and place the camera to one side:

 

If you move the VacuumGripper through the box it will push it like any other unity Physx Rigidbody component

If you move it away from the box, nothing will happen.

Now, if we close the gripper (press close in the VacuumGripperBase component or on the control panel you will see the live data status update.

The value will increase to (at least) the percentage to activate and the state turns to ‘Closed’.

If you now drag the Vacuum Gripper assembly straight up, the box stays connected to the gripper.

If you open the gripper, the box will drop

Prespective Documentation