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
Select the box and click ‘Add Component’
Add ‘Rigidbody’
Add ‘Box Collider’
Both default settings are sufficient.
Setup Angular Gripper
Setup the Base
Select the ‘Angular Gripper’ and Click Add Component
Add Angular Gripper Base
Add a Rigidbody Component
Use Gravity Off
Is Kinematic On
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
Select the GripperRight
Add Component DWheelJoint
Unfold Wheel Axis Direction
Set it to Vector Direction ‘Right’
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)
Add Component AngularFinger
Select the FingerRight
Add Box Collider
Add Rigidbody Component
Use Gravity Off
Is Kinematic On
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
Drag the Fingers, or open the Selection tab
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.
Add Component
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 Angular Gripper
Create an empty gameoject and name it ControlPanel
Go back to the Angular Gripper and drag 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. 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