Main Content

Creating a Robotic Gripper Multibody in MATLAB

This example constructs a robotic gripper multibody in MATLAB®. It demonstrates how various classes under simscape.multibody.* package can be used to build a hierarchical multibody system.

The gripper has a palm which is a RigidBody component and has fingers which are themselves Multibody components. Each of the articulated finger multibody comprises of rigid finger segments connected via revolute joint knuckles.

To construct the gripper, run the following code in MATLAB:

import simscape.Value;

% Number of fingers
numFingers = 5;

% Palm dimensions
palmDims = Value([8 40], 'mm');

% Finger segment number and dimensions
segmentDims = Value([30 8; ...   % Proximal segment
                    30 6; ...    % Middle segment
                    40 5], ...   % Distal segment
                    'mm');

% Finger tip dimensions
tipRad = Value(9, 'mm');

% Finger bend angles
bendAngles = Value([-30, +30, +25], 'deg');

% Finger segment colors
colors = [0 0 .7;  ...     % Palm
          .5 .4 0;  ...    % Proximal segment
          .8 .6 0; ...     % Middle segment
          1 .9 0; ...      % Distal segment
          1 1 1];          % Tip

% Construct the gripper
[gripper, gripper_op] = robotGripper(numFingers, palmDims, segmentDims, tipRad, bendAngles, colors);

% Visualize the gripper
cmb = compile(gripper);
visualize(cmb,computeState(cmb,gripper_op),'vizGripper');

To perform any simulation workflows, a simulink model can be created from the gripper multibody object using its makeBlockDiagram method.

makeBlockDiagram(gripper,gripper_op,'gripperModel');

Gripper.PNG

See Also

|