15
1 SynGrasp: A Matlab Toolbox for Underactuated and Compliant Hands Monica Malvezzi Member, IEEE, Guido Gioioso Student Member, IEEE, Gionata Salvietti Member, IEEE, and Domenico Prattichizzo Senior Member, IEEE. Abstract—SynGrasp is a MATLAB toolbox for grasp analysis of fully or underactuated robotic hands with compliance. Com- pliance can be modeled at contact points, in the joints or in the actuation system including transmission. It is possible to use a Graphical User Interface or directly assemble and modify the available functions to exploit all the toolbox features. Grasps can be described either using the provided grasp planner or directly defining contact points on the hand with the respective contact normal directions. Several analysis functions have been developed to investigate the main grasp properties: control- lable forces and object displacement, manipulability analysis, grasp stiffness and grasp quality measures. Functions for the graphical representation of the hand, the object and the main analysis results are provided. The toolbox is freely available at http://syngrasp.dii.unisi.it. Index Terms—Grasping, Human hand synergies, Underactu- ated hands, Soft hands, Compliant grasps, Matlab toolbox. I. I NTRODUCTION S YNGRASP is a MATLAB function collection providing algorithms and tools to the current research on compliant and underactuated robotic hands. In the last decade robotic hand design has particularly focused on joint coupling and compliant devices [1]. In the first approach a reduction of the number of Degrees of Freedom (DoF) is obtained by coupling joint motions using for instance tendons [2] or fixed mechanical couplings [3]. In the second, passive or active compliance is introduced at different levels improving adaptability properties and gaining robustness with respect to uncertainties [4]. A different design approach is inspired by biological sys- tems. In particular, several studies demonstrated that, notwith- standing the human hand complexity, only a limited set of variables are able to describe most of the variance of hand postures during grasping tasks. Neuroscientists often refer to this low dimensional representation of hand postures as postural synergies [5]. Reducing the number of control inputs, from a fully actu- ated to an underactuated or joint coupled solution, obviously M. Malvezzi, G. Gioioso and D. Prattichizzo are with the Department of Information Engineering and Mathematics, University of Siena, Via Roma 56, 53100 Siena, Italy, e-mail: {malvezzi,gioioso,prattichizzo}@dii.unisi.it G. Salvietti, G. Gioioso and D. Prattichizzo are with Department of Advanced Robotics, Istituto Italiano di Tecnologia, Via Morego 30, Genova, Italy, e-mail: [email protected] The research leading to these results has received funding from the European Union Seventh Framework Programme FP7/2007- 2013 under grant agreement 601165 of the project WEARHAP, and by the Italian Ministry of Education, Universities and Research, Futuro in Ricerca 2012 Programme, with the MODELACT project (Code RBFR12C608). limits the dimension of the force and motion controllability subspaces, reducing the dexterity of the given robotic grasp. If we define the actual joint variables as a linear combination of few inputs as those defined by postural synergies, as, e.g. in [6], [7], hand postures would rigidly lie on a linear manifold, and the hand would rigidly move along given directions in the joint space. In this case it would be impossible for the hand to adapt its posture to grasp objects with different shapes and dimensions. An improvement in adaptability and robustness level of robotic hands can be obtained by using a compliant definition of synergies. Soft synergies therefore represent a joint displacement aggregation corresponding to a reduced dimension representation of the hand reference movements. The actual hand posture will differ from the reference one because of its compliance. We defined this type of hand joint coupling as compliant postural synergies, or soft synergies in [8], [9]. The toolbox, presented in its preliminary version in [10], is particularly suited to model and analyze underactuated hands, hands with joint coupled movements, soft synergy actuated hands, but it can be easily adapted to fully actu- ated hands. Several compliance sources can be modeled with SynGrasp: contact compliance, due to the fingertip and object deformation, joint compliance, due to mechanical structure deformations and to actuator static control gains, and, finally, synergy compliance, induced by soft synergy organization of hand motions. The availability of numerical tools for the definition of the main grasp properties is useful to analyze and compare the performance of the existing solutions, and also to design and optimize new devices. Such tools are also useful to analyse and better understand the behavior of human hand performing grasp operation. For instance, it is possible to evaluate contact force distribution in grasping, how does the synergies influence grasp quality, etc.. Simulation tools have a long tradition in robot grasping, especially for the evaluation of grasp planning algorithms. Among those, it is worth mentioning GraspIt! [11] and OpenGrasp [12] for the specificity of their functions. The former has been frequently used in the literature and includes several models of robot hands allowing the study of the dynamics of contacting bodies and a grasp planner for a Barrett hand model. OpenGrasp is built upon the OpenRAVE simulator [13] and includes a robot hand editor together with a physics abstraction layer enabling an interface to different physics engines. Both these simulators allow to define complex environments, everyday life objects and different manipulation

SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

  • Upload
    others

  • View
    54

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

1

SynGrasp: A Matlab Toolboxfor Underactuated and Compliant Hands

Monica Malvezzi Member, IEEE, Guido Gioioso Student Member, IEEE,Gionata Salvietti Member, IEEE, and Domenico Prattichizzo Senior Member, IEEE.

Abstract—SynGrasp is a MATLAB toolbox for grasp analysisof fully or underactuated robotic hands with compliance. Com-pliance can be modeled at contact points, in the joints or in theactuation system including transmission. It is possible to use aGraphical User Interface or directly assemble and modify theavailable functions to exploit all the toolbox features. Graspscan be described either using the provided grasp planner ordirectly defining contact points on the hand with the respectivecontact normal directions. Several analysis functions have beendeveloped to investigate the main grasp properties: control-lable forces and object displacement, manipulability analysis,grasp stiffness and grasp quality measures. Functions for thegraphical representation of the hand, the object and the mainanalysis results are provided. The toolbox is freely available athttp://syngrasp.dii.unisi.it.

Index Terms—Grasping, Human hand synergies, Underactu-ated hands, Soft hands, Compliant grasps, Matlab toolbox.

I. INTRODUCTION

SYNGRASP is a MATLAB function collection providingalgorithms and tools to the current research on compliant

and underactuated robotic hands. In the last decade robotichand design has particularly focused on joint coupling andcompliant devices [1]. In the first approach a reduction ofthe number of Degrees of Freedom (DoF) is obtained bycoupling joint motions using for instance tendons [2] orfixed mechanical couplings [3]. In the second, passive oractive compliance is introduced at different levels improvingadaptability properties and gaining robustness with respect touncertainties [4].

A different design approach is inspired by biological sys-tems. In particular, several studies demonstrated that, notwith-standing the human hand complexity, only a limited set ofvariables are able to describe most of the variance of handpostures during grasping tasks. Neuroscientists often referto this low dimensional representation of hand postures aspostural synergies [5].

Reducing the number of control inputs, from a fully actu-ated to an underactuated or joint coupled solution, obviously

M. Malvezzi, G. Gioioso and D. Prattichizzo are with the Department ofInformation Engineering and Mathematics, University of Siena, Via Roma 56,53100 Siena, Italy, e-mail: {malvezzi,gioioso,prattichizzo}@dii.unisi.it

G. Salvietti, G. Gioioso and D. Prattichizzo are with Department ofAdvanced Robotics, Istituto Italiano di Tecnologia, Via Morego 30, Genova,Italy, e-mail: [email protected]

The research leading to these results has received funding from theEuropean Union Seventh Framework Programme FP7/2007- 2013 under grantagreement 601165 of the project WEARHAP, and by the Italian Ministry ofEducation, Universities and Research, Futuro in Ricerca 2012 Programme,with the MODELACT project (Code RBFR12C608).

limits the dimension of the force and motion controllabilitysubspaces, reducing the dexterity of the given robotic grasp.If we define the actual joint variables as a linear combinationof few inputs as those defined by postural synergies, as, e.g. in[6], [7], hand postures would rigidly lie on a linear manifold,and the hand would rigidly move along given directions inthe joint space. In this case it would be impossible for thehand to adapt its posture to grasp objects with differentshapes and dimensions. An improvement in adaptability androbustness level of robotic hands can be obtained by usinga compliant definition of synergies. Soft synergies thereforerepresent a joint displacement aggregation corresponding toa reduced dimension representation of the hand referencemovements. The actual hand posture will differ from thereference one because of its compliance. We defined this typeof hand joint coupling as compliant postural synergies, or softsynergies in [8], [9].

The toolbox, presented in its preliminary version in [10],is particularly suited to model and analyze underactuatedhands, hands with joint coupled movements, soft synergyactuated hands, but it can be easily adapted to fully actu-ated hands. Several compliance sources can be modeled withSynGrasp: contact compliance, due to the fingertip and objectdeformation, joint compliance, due to mechanical structuredeformations and to actuator static control gains, and, finally,synergy compliance, induced by soft synergy organization ofhand motions.

The availability of numerical tools for the definition of themain grasp properties is useful to analyze and compare theperformance of the existing solutions, and also to design andoptimize new devices. Such tools are also useful to analyseand better understand the behavior of human hand performinggrasp operation. For instance, it is possible to evaluate contactforce distribution in grasping, how does the synergies influencegrasp quality, etc..

Simulation tools have a long tradition in robot grasping,especially for the evaluation of grasp planning algorithms.Among those, it is worth mentioning GraspIt! [11] andOpenGrasp [12] for the specificity of their functions. Theformer has been frequently used in the literature and includesseveral models of robot hands allowing the study of thedynamics of contacting bodies and a grasp planner for aBarrett hand model. OpenGrasp is built upon the OpenRAVEsimulator [13] and includes a robot hand editor together witha physics abstraction layer enabling an interface to differentphysics engines. Both these simulators allow to define complexenvironments, everyday life objects and different manipulation

Page 2: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

2

platforms but do not embed a large set of functions for graspanalysis, especially if underactuated hands are considered.

SynGrasp is particularly suitable for sensitivity analysisand optimization procedures due to the limited set of in-struction necessary to define a hand and a grasp using theavailable functions. The toolbox includes several functions forgrasp analysis and optimization, usually not included in othersoftware packages, e.g. controllable internal force subspace,rigid body motion subspace, grasp stiffness, manipulabilityellipsoids etc..

We used the Matlab [14] platform, since this languageis widely diffused in the scientific and technical world.Matlab programming environment allows to easily exploitother specific tools and built-in math functions enabling theexploration of multiple approaches and the integration withother analysis tools, e.g. statistical processing of experimentaldata, optimization, dynamic models and simulations etc..

Moreover, Matlab is well known also outside the roboticcommunity, this makes our toolbox also useful in other fields,such as experiment design and validation in neuroscience,physiology and haptics.

The rest of the paper is organized as it follows. In Section IIthe main functions of the toolbox are presented. In Section IIIfour examples are presented to show the usability of thetoolbox, while in Section IV two examples of a practical useof the toolbox are described. Finally, Section V reports theconclusion and the future work.

II. OVERVIEW OF THE TOOLBOX

A. How to use SynGrasp

There are two possible ways to use SynGrasp: scriptingmode and Graphical User Interface (GUI). The former letthe user write MATLAB scripts including SynGrasp functions.This solution is preferred if a customization is needed. Theuser can add his/her own functions and/or can modify thosealready existing. A list of the main functions provided withthe toolbox is reported in Table I and will be detailed in therest of this section. The complete description of all the toolboxfunctions and their usage is reported in [15].

A set of functions can be used in scripting mode to let theuser have a simple graphical representation of the manipulatorand the object. The function SGplotHand() draws the hand inthe configuration specified by the user defining joint variablevalues. The function SGhandFrames() plots a scheme of thehand, highlighting its kinematical structure, its joints, linksand orientation of the local frames for each link. It is alsopossible to draw some simple objects to be grasped. Weincluded a sphere, a cylinder and a cube that can be drawnusing SGplotCylinder(), SGplotSphere() and SGplotCube()respectively.

The GUI allows the user to load a hand structure andinteractively perform hand and grasp analysis. Referring toFig. 1, the GUI window is separated in six zones. The main

TABLE I: List of the main functions in SynGrasp.

FunctionAvailable hand modelsSGparadigmatic define the paradigmatic hand modelSGhuman24DoF define a human hand model with 24 DoFsSGmodularHand define the modular hand modelSG3Fingered define the Barrett-like hand modelSGDLRHandII define the DLR-HIT Hand II modelGraphics and GUISGplotHand draw the hand in a selected configurationSGplotSyn shows the motion generated by a synergySGplotObject plot an object and the contact pointsSyngrasp GUI open the GUISGplotCylinder plot a cylinderSGplotCube plot a cubeSGplotSphere plot a sphereModelingSGmakeHand define hand structureSGmakeFinger define finger structure and parametersSGmoveHand move the hand in a selected configurationSGdefineSynergies define the synergy matrixSGactivateSynergies activate a synergy or a group of synergiesSGmakeObject define a structure for the grasped objectSGsynergyStiffness define the synergy stiffnessSGsantelloSynergies define synergies for the human hand modelSGjointStiffness define the joint’s stiffnessSGcontactStiffness define the stiffness at contactsGrasp definitionSGaddContact define a contact pointSGaddFtipContact add a contact at the fingertipsSGgraspPlanner activate the grasp plannerSGselectionMatrix define selection matrixSGgraspMatrix define grasp matrixSGjacobianMatrix define the Jacobian matrixGrasp analysisSGquasistatic solve the quasi–static grasp linear systemSGquasistaticMaps evaluates the linear i/o mapping matricesSGgraspAnalysis internal force and motion subspacesSGrbMotions evaluate the object rigid body motionsSGkinManipulability performs kinematic manipulability analysisSGforceManipulability performs force manipulability analysisSGquasistaticHsolution analysis of quasistatic grasp modelSGVcost cost function for grasp force closureSGcheckFriction evaluates the friction constraintsSGcheckAngle contact force and normal vectors anglesSGCFtau defines a cost function for joint effort

plot is placed on the center of the GUI window. On the lefthand side there are two zones that take care of manuallyplacing on the main plot a hand model and an object model,respectively. It is possible to load either one of the availablehand models or a hand model defined by the user. Five handsare already available in the toolbox. SG3Fingered is a threefinger hand, inspired by the Barrett hand, SGDLRHandIIis the DLR-HIT Hand II [3], SGmodularHand is a threefingered modular hand [16]. We also included two modelsof the human hand: SGparadigmatic is a 20 DoF model ofan anthropomorphic hand, referred to as paradigmatic handin [17], while SGhuman24Dof is a human hand model with24 DoFs. Position and orientation of the hands can be set andmodified by the user. Concerning the object, in the currentversion of the toolbox, it is possible to load simple objectssuch as a sphere, a cube or a cylinder. It is possible to setand modify position, orientation and size of the object. Onthe bottom zone, there is a set of sliders that can be used tomodify the hand model configuration. The sliders can control

Page 3: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

3

Fig. 1: The SynGrasp GUI.

either each joint separately or can coordinately move the jointsalong a synergy direction. Synergies are already defined for thehuman hand models as will be better explained in Section II-B.Synergies for robotic hands can be: (i) defined directly bythe user, (ii) derived from the linearization of the forwardkinematic relationships, (iii) obtained from the processing ofexperimental data or (iv) mapped from the human hand, asreported in Section III. The sliders can be used to bring thehand in contact with the object. A contact-detection algorithmallows detecting contact points on the hand. The button placedin the top-right part of the GUI can be used to performan automatic “close all” movement of the hand wrapping itaround the object. On the bottom-right there is the area relatedto grasp analysis. Once the fingers are in contact with theobject, it is possible to analyse the quality of the obtainedgrasp. The desired quality index can be chosen form the drop-down menu. All the functions described in the following canbe used in scripting mode. Most of them are also embeddedin the GUI.

B. Hand Modelling

This section groups all the functions needed to describe thekinematics of a hand. The hand structure is defined in termsof fingers, links and joints. A cell named base, containingas many elements as the number of fingers, collects in eachcell element a 4× 4 matrix representing the homogeneoustransformation matrix between the wrist reference frame anda reference frame defined at the beginning of each finger.Denavit-Hartenberg (DH) parameters [18] have been chosenas default notation for the description of the finger kinematicchain. A table containing the DH parameters of each fingerhas to be provided to describe a hand. A cell named DHpars,

which has as many elements as the number of fingers, collectsin each element a matrix with four columns and as many rowsas the number of joints of each finger. Each row represents theDH parameters allowing to define the joint with respect to thepreceding one or with respect to the base reference frame.The function SGmakeHand() defines a hand structure, whosearguments are defined by the function SGmakeFinger().

F = SGmakefinger(dhpar, base, q).Arguments:dhpar= n (number of joints) x 4 matrixcontaining DH parameters for each joint;base = 4 x 4 homogeneous transformationmatrix for the finger frame;q = n x 1 vector containing values ofjoint variables.

hand = SGmakeHand(F)Arguments:F = array of finger structures definedby SGmakeFinger.

Hand configuration is defined by the joint variables q =[q1 · · · qnq ]

T ∈ℜnq . The user can modify the hand configura-tion through the function SGmoveHand().

new_hand = SGmoveHand(hand,q)Arguments:hand = hand structure;q = joint values.

The toolbox can be used to investigate the properties ofhands in which the joint displacements are coupled, mechani-cally or by means of a suitable control algorithm. In the caseof human hand synergies, this coupling has been described as asynergy matrix associated to hand model [8]. For the 20 DoFsmodel of the human hand available in the toolbox, the synergymatrix refers to the data collected by Santello et. al in [5] and

Page 4: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

4

it is provided through the function SGsantelloSynergies. Thefunction SGdefineSynergies() associates to a specific handmodel the relative coupling matrix.

hand = SGdefineSynergies(hand,S)Arguments:hand = the hand structure on which theuser is defining the synergy matrix;S = the synergy matrix.

The function SGactivateSynergies() activates a synergy or acombination of synergies on the hand.

hand = SGactivateSynergies(hand,z)Arguments:hand = the hand on which the synergiesspecified in z must be activated;z = the synergy activation vector.

The function SGplotSyn() draws the movement correspondingto the activation of one synergy. It draws on the same plotthe hand in the initial reference configuration and in theconfiguration obtained activating one or more synergies.

SGplotSyn(hand,z,qm)Arguments:hand = the hand to move;z = the synergy activation vector;qm (optional) = starting configuration(the current hand configuration by default).

C. Grasp Definition

The definition of an object and the contact point locationsare fundamental for grasp analysis. Object configuration isdescribed by a frame {B} fixed to the object with respectto an inertial frame {N} fixed in the workspace. Let u ∈ ℜ6

denote the vector representing the position and orientation of{B} relative to {N}. Let nc be the number of contact points. Inorder to define the constraints and the contact forces imposedby the contact between the hand and the object, a suitablecontact model has to be introduced [19]. For each contactpoint i, the contact model selects the contact force componentsλi ∈ℜli , where li value depends on the type of contact (e.g.,li=3 for hard finger model [19]).

Together with the contact type, a grasp is defined by:• the location and orientation of the object frame {B} with

respect to the wrist frame {N};• the contact points coordinates;• the directions normal to the contact surfaces on the

contact points.With SynGrasp these parameters can be defined in two ways.The user can directly specify the location of the contact pointsanywhere on the hand with the function SGaddContact(),while SGaddFtipContact() can be used if the contact pointhas to be located on the fingertip.

new_hand = SGaddcontact(hand,type,cwhere,link,alpha)Arguments:hand = hand structure;type = type of contact;

0 - single point without friction;1 - hard finger;2 - soft finger;

cwhere = finger index;

link = link index;alpha = distance from the link ref origin.

Given the contact points on the hand, it is possible to create astructure representing the grasped object through the functionSGmakeObject(). The structure for the grasped object con-tains the object center, contact points and contact normal unitvectors.

[new_hand, object] = SGmakeObject(hand,center,nor)Arguments:

hand: a structure defining the hand structure;center(opt): object center coordinates;nor: directions normal to the contact surfacein the contact points.

Returns:newhand: an updated structure of the hand;object: a structure containing object data.

These values can be either automatically computed by thesoftware on the basis of the contact point locations or manuallydefined by the user. The function SGplotObject() can be usedto plot a convex object defined by the given contact points. Theuser can choose the fillet radius and the number of elementsfor object representation.

The second method to define a grasp in SynGrasp isusing the provided grasp planner. The grasp planner functionSGgraspPlanner() takes as input the hand model, the objectto be grasped, the number of pre-grasp positions and the metricto be used for grasp evaluation.

[hand_c,object,b_index] =SGgraspPlanner(hand,obj,N,qmtype)

Arguments:hand = the hand structure;obj = the object structure to be grasped;N = the number of random pregrasp;qmtype = the quality metric to be used.Returns:hand_c = the best hand configuration;object = the grasped object;b_index= the best quality index obtained.

The function returns the best grasp obtained and the value ofthe index used for the evaluation. Additionally, it is possibleto access to the whole list of grasps evaluated and to theirrespective obtained index. In the following it is described thegrasp planner working principle. The user sets the number ofpossible pregrasp positions. To obtain the pregrasp positions,the hand is initially moved using SGtransl() to the center ofthe object with a random orientation of the palm. Then, thehand is moved along the outgoing direction perpendicular tothe palm of an offset computed through SGevaluateOffset()that depends on the object dimension and on the hand fingerlengths. The user can eventually set a different distance fromthe object if needed. From the pregrasp position the handis closed using SGcloseHand(). It is possible to set whichjoints are involved in the grasping action and the size of thestep used to close the finger around the object. The functionSGcontactDetection() evaluates if a link of the hand is contactwith the object and eventually stops the relative finger. Onceall the fingers are in contact with the object or have reached thejoint limits, the grasp quality is evaluated. All the computedgrasps are sorted according to the quality index selected at the

Page 5: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

5

Fig. 2: Grasp planner output. In the left hand side the pregraspposition and on the right the obtained grasp.

beginning of the procedure and the best grasp is returned. Anexample of outcome of the grasp planner is reported in Fig.2.

Remark 1: As we have briefly introduced, in SynGrasp thereare two possibilities to define a grasp. It is possible either toconsider an object and close the hand on it to define the contactpoints or to consider contact points on the hand and definean object through them. This last solution can be used whencontact point positions are acquired through real experimentson a robotic or human hand or if an external grasp planner isused.

Once the grasp is defined, it is possible to compute allthe matrices relevant to grasp analysis. The evaluation ofthe selection matrix H, that extracts from the contact pointtwists the components constrained by the specified contactmodel, is performed by the function SGselectionMatrix().The SynGrasp function SGgraspMatrix() allows to evaluate,for a given grasp, the value of the grasp matrix G. The handJacobian matrix can be evaluated by means of the functionSGjacobianMatrix(). More details on the evaluation of graspmatrix and hand Jacobian matrix can be found in [19] andin [20].

A fundamental role in the definition of grasp properties isplayed by system compliance, in particular if the hand is un-deractuated or has a limited number of DoFs. In SynGrasp weconsidered a lumped parameter model in which the compliantelements can be located at the contact points, at the jointsand at the synergy actuation level [21]. Concentrating theobject and finger contact deformations at the contact points,a variation of contact force with respect to a reference initialcondition can be expressed as

∆λ = Kc(J∆q−GT∆u), (1)

where Kc ∈ℜnl×nl is the contact compliance matrix symmetricand positive definite, ∆q is the joint variable variation and ∆urepresents a variation on the object reference frame position.The contact stiffness matrix can be defined in SynGrasp withthe function SGcontactStiffness().

Furthermore, within SynGrasp, also the structural stiffnessof the links and the controllable servo compliance of the jointscan be modelled [22]. The joint torque variation ∆τ ∈ℜnq is

proportional to the difference between a reference ∆qr and theactual ∆q variations of the joint displacements

∆τ = Kq(∆qr−∆q), (2)

where Kq ∈ ℜnq×nq is the joint stiffness matrix, symmetricand positive definite, and can be defined in SynGrasp with thefunction SGjointStiffness().

Finally, SynGrasp allows defining a compliant model forthe joint aggregation inputs defined by synergies, referred assoftly underactuated model in [17]

∆σ = Kz(∆zr−∆z), (3)

where Kz ∈ℜnz×nz is a symmetric and positive definite matrixthat defines the synergy stiffness. The synergy stiffness matrixis set by SGsynergyStiffness().

D. Grasp analysis

Grasp analysis is the most important feature of SynGrasp.The included functions are the results of different studieson both fully and underactuated hand models, consideringcompliance at different levels. In this section we report themain results obtained considering a synergy actuated humanhand model. The quasi–static model adopted to define themain properties of a grasp is obtained by performing a linearapproximation of the kinematic and compliance equations inthe neighborhood of an initial static equilibrium configuration.More details of this model can be found in [8], [17], and[23]. Starting from an equilibrium configuration and applyinga small variation to the input synergy reference values ∆zr,in the hypotheses that the system reaches a new equilibriumconfiguration, the following linear equations hold−G 0 0 0 0 0JT 0 0 −I 0 00 0 0 ST −I 0I KcGT −KcJ 0 0 00 0 Kq I 0 −KqS0 0 0 0 I Kz

∆λ

∆u∆q∆τ

∆σ

∆z

=

00000

Kz∆zr0

.(4)

The solution of this linear system leads to the followingmapping between the input controlled variable, i.e. the synergyreference variation ∆zr, and the output variables

∆u = V ∆zr (5)∆q = XSY ∆zr = Qδ zr (6)∆z = Y ∆zr (7)

∆λ = P∆zr (8)

where the transfer matrices V , Q, Y and P depend on graspcharacteristics. The solution of this linrar system is detailed in[9].

SynGrasp function SGquasistatic() solves the linear systemin eq. (4) for a given grasp and for a given variation ofreference synergy values, and evaluates the correspondingvariation of grasp configuration, according to eq. (5)-(8). Ituses the function SGquasistaticMaps(), that evaluates thematrices mapping the input variation ∆zr to the outputs.

Page 6: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

6

linMaps = SGquasistaticMaps(hand,object)Arguments:hand = the hand structure;object = the object structure.Returns:linMaps.V = object motion;linMaps.P = contact forces;linMaps.Q = hand joint displacements;linMaps.T = joint torques;linMaps.Y = synergy actual values.

From eq. (8), a basis matrix Es for the subspace of con-trollable internal forces, i.e. the internal forces ∆λ that can beproduced by activating the synergy references ∆zr [8], can bedefined as

Es = R (P) . (9)

All internal forces controllable by synergy actions can thenbe parametrized through a free vector y ∈ ℜnh as ∆λ = Esy,where nh represents the dimension of the controllable internalforce subspace [20].

SynGrasp function SGgraspAnalysis() analyses the givengrasping configuration in terms of internal forces and objectmotions.

[E] = SGgraspAnalysis(grasp)Returns:E = matrix of controllable internal forces.Arguments:grasp = the hand to analyze.

Eq. (5) shows how the object displacements ∆u are con-trolled from one equilibrium configuration to another bysynergy small variations ∆zr. Among all the possible objectmotions, rigid-body motions are those that do not involvevisco-elastic deformations in the contact points. Rigid-bodymotions controllable by synergies has to be compatible withcontact constraint (1), evaluated assuming ∆λ = 0, and witheq. (6), which relates controlled postural synergies and jointdisplacements. The synergy reference values that modify handand object configuration without modifying the contact forcevalues belong to the P matrix nullspace, i.e. ∆zrh ∈ N (P).The corresponding object displacement and hand configura-tion variation, according to eq. (5) and (6) are given by∆uh = V ∆zrh and ∆qh = Q∆zrh, respectively. SynGrasp func-tion SGrbMotions() evaluates, for a given grasp configuration,the subspace of hand and object rigid body motions.

Remark 2: When the hand structure is generated, if notspecifically defined, the S matrix is set to an identity matrixI ∈ℜnq×nq . This corresponds to a fully actuated hand, in whicheach component of q can be independently controlled. Thus,all the grasp analysis functions can be used for fully actuatedhands.

The stiffness of a grasp is defined as the linear relationshipbetween a variation of the wrench applied on an object andthe resulting motion

∆w = K∆u. (10)

As previously outlined, the prefix ∆ indicates that we are con-sidering a small variation of grasp configuration with respectto a reference equilibrium condition. This condition allows thelinearization of the kinematic and equilibrium relationshipsthat characterize grasp configuration. Grasp stiffness matrix

Fig. 3: Analysis of the 20 DoFs anthropomorphic hand,kinematic manipulability ellipsoid.

K ∈ℜ6×6 therefore describes force/motion relationships in theobject space [22]. In [24] the expression of K matrix has beenevaluated as a function of grasp properties. According to [22],[21], [24], K matrix can be evaluated as

K = G(K−1

c + JKqJT + JSKzSTJT)−1GT. (11)

The function SGgraspStiffness() has been implemented inSynGrasp to evaluate grasp stiffness matrix.

The manipulability analysis, proposed in [25], [26], [27] iswidely common in robotics to analyze the robot performancein the task space. In [23] it has been extended to synergyactuated hands, including the effect of system compliance.Manipulability allows investigating how a unitary variation inthe input space is reproduced in the task space. The kinematicmanipulability index, in terms of differential motions, is de-fined as the ratio of a measure of performance in the taskspace and a measure of effort in the input (synergies in thiscase) space

Rk =∆uTWu∆u∆zTWz,∆z

, (12)

where Wu is the object displacement weight matrix and Wz isthe synergy weight matrix. The analysis of which directions inthe task space (and corresponding directions in the actuatedjoint space) maximize or minimize Rk, can be solved oncea correspondence between the numerator and denominatorvariables, namely ∆u and ∆z in (12), is established. The forcemanipulability index is similarly defined in the force space.The complete discussion on how to find a one–to–one mapbetween the numerator and denominator in robotic hands ac-tivated by synergies is presented in [23]. Within SynGrasp, thefunctions SGkinManipulability() and SGforceManipulabil-ity() perform manipulability analysis evaluating the directionsalong which the kinematic and force manipulability indexesare maximized and minimized. Fig. 3 shows the kinematicmanipulability ellipsoids for the paradigmatic hand model.

kinmanipulability = SGkinManipulability(Gamma,

Page 7: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

7

in_col, Wu,Wz)Inputs:Gamma = solution of the homogeneous q.s. problemobtained by the function SGquasistaticHsolution;in_col = column interval to be considered in theevaluation;Wu = object displacement weight matrix;Wz = synergy weight matrix.Returns:kinmanipulability = structure containing thedirections in the x, z and u spaces, thatmaximizes/minimizes kinematic manipulabilityindex.

The input for the function is a matrix that representsthe solution of the quasi–static linear homogeneous systemdiscussed in [23], and can be evaluated with the functionSGquasistaticHsolution().

Gamma = SGquasistaticHsolution(hand, object)Inputs: hand and object structures defined bySGmakeHand and SGmakeObject.Returns:Gamma = structure containing homogeneoussolution of quasistatic problem and itspartition.

In order to assure grasp stability, avoiding contact lossesand slippage, the ratio between the tangential and normalcomponent of each contact force has to be lower than thefriction coefficient, that depends on contact surface properties.Within this subset, the vector of linear coefficient y can bechosen in order to optimize some cost functions. In [28] an ef-ficient algorithm to find the internal force set, maximizing thedistance from the friction limit boundary, has been provided.In [2] the algorithm was furthermore generalized for tendinousactuated hands. In [17] the algorithm was adopted to analyzethe role of synergies in the choice of grasp forces in the humanhand. Analytically the problem consists in the minimization ofa cost function V (y) that depends on the contact forces andon the contact properties (friction coefficient, contact surfacegeometry). The SynGrasp function SGVcost() evaluates, for agiven grasp configuration and applied force, the correspondingvalue of the cost function V (y).

cost = SGVcost(w,y,pG,E,n,mu, fmin,fmax,k)Inputs:w = external load;pG = grasp matrix pseudoinverse;E = controllable internal force subspace;n = contact normal (matrix 3xnc);mu = cosine of the friction angle;fmin = minimum normal component;fmax = maximum contact force norm;k = positive margin.Returns:cost = cost function value.

This cost function can be minimized adopting standardMATLAB functions, e.g. fminsearch(). The utility functionSGcheckAngle() evaluates, for each contact point, the anglebetween the contact normal unity vector ni and the contactforce λi. The utility function SGcheckFriction() evaluates,for a given grasp configuration, if the friction constraints aresatisfied or not.

The SynGrasp function SGCFtau(), in a similar way, evalu-ates a cost function that takes into account the torque applied

on hand joints. The value of y that minimizes this functioncorresponds to the set of internal forces that minimize thehand joint effort [29].

Other functions widely described in the literature, are avail-able in SynGrasp to define grasp quality [30]. SGminSVG()evaluates the minimum singular value of G matrix: the smallestsingular value of the G matrix is a quality measure thatindicates how far is the grasp configuration from falling into asingular configuration [19], [31]. SGmanipEllisoidVolume()evaluates the hand manipulability ellipsoid [32]. In orderto keep redundant fingers far from singular configurations,it is desirable to maximize the smallest singular value ofgrasp Jacobian matrix Ho = G+J [33]. SGdistSingularCon-figuration() evaluates the minimum singular value of Homatrix. The transformation between the velocity domain inthe finger joints and the velocity domain of the object can bequalitatively considered “uniform” when the contribution ofeach joint velocity is the same in all the components of objectvelocity. In the literature, this uniformity measure is evaluatedas the ratio between the minimum and maximum singularvalue of matrix Ho [34], the function SGunifTransf() allowscomputing such parameter. Finally, SGgraspIsotropyIndex()looks for an uniform contribution of the contact forces tothe total wrench exerted on the object, i.e. tries to obtain anisotropic grasp where the magnitudes of the internal forces aresimilar [35].

III. ILLUSTRATIVE EXAMPLES

In this section we describe in detail four of the examplesavailable within the SynGrasp toolbox. The goal is to provideto the user a tutorial to understand the potentials of the toolbox.The first example involves the paradigmatic hand model. Theanalysis of the human hand during a writing task is proposed.The task performance is evaluated in terms of kinematicmanipulability index. In the second example, we report howSynGrasp can be used to map human hand synergies ontorobotic hands. In literature there are several examples wherethe synergies for a robotic hand are defined considering PCAanalysis over a set of grasps obtained closing the hand on aset of objects, see for instance [36], [37]. In [38] we proposedan object-based approach to map human hand synergies ontorobotics hands with dissimilar kinematics. Using this mappingalgorithm is possible to define the synergistic motion of arobotic hand without testing or simulating different graspsfor different objects. In the Section III-B the main step ofthe algorithm as well as its implementation using SynGraspare presented. The third example deals with the modelingand analysis of underactuated robotic hands. Two cases arepresented: in the first the underactuation is realized with apulley-tendon system, while in the second the hand joints aremechanically coupled. In both cases the hand presents activeand passive DoFs. In the last example we show how to usethe grasp planner included in the toolbox.

The main target of the proposed examples is to show theversatility of the toolbox and how SynGrasp can be used:• outside of the robotic context to evaluate human hand

tasks;

Page 8: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

8

Fig. 4: On the left, the kinematic scheme and contact point ap-proximated location adopted to simulate handwriting tasks. Onthe right, the SynGrasp model of the human hand performinghandwriting tasks.

• to replicate human hand capabilities onto robotic hands;• to model complex robotic hands and to test them in

grasping and manipulation tasks• to synthesize grasps of different objects using several

robotic hands models.

A. Hand writing modeling and evaluation

In SGwritingExample.m we describe a mathematicalmodel of the human hand kinematics able to describe complexmanipulation tasks, such as writing on a tablet with a stylus.In handwriting tasks, the stylus/pen typically makes contactswith the hand at four zones: the thumb and index fingertips,the lateral surface of the middle finger distal phalanges, and aproximal part of the hand, usually located between the thumband the index [39], [40]. Due to finger compliance, the contactis extended on an area whose dimension depends on the skindeformation properties and on the contact force. However, inthis example, we represent the contact as a point. Typicallyduring writing tasks the three contact points with the fingersdo not change significantly with respect to the pen referencesystem, while the contact point on the hand palm may vary,due to the sliding between the pen and the hand skin. Wefurthermore assume that the paper on which the hand is writingis fixed with respect to the external reference system.

The kinematic scheme of the hand performing handwritingtasks is shown in Fig. 4 with the corresponding SynGraspmodel. The kinematic structure of the human hand adopted inthis example is the 20 DoFs model provided in the toolboxin the file SGparadigmatic. The hand joint values are setto simulate a configuration compatible with the task thatis performed. Contact points are set through the functionSGaddFtipContact() on the thumb and index fingertips, andthrough the function SGaddContact() on the lateral part ofthe middle finger distal phalanges. The reference system onthe stylus is fixed on its tip and the stylus is plotted usingstandard MATLAB graphic functions. Once the hand structureand posture, the contact point and the object reference frameare defined, the task can be analyzed using the functionsdescribed in the previous section. In particular, we analyzedthe task performance in terms of kinematic manipulability

Fig. 5: Kinematic manipulability ellipsoid obtained in theanalysis of the handwriting problem.

index [23]. This analysis firstly requires the solution of thequasistatic problem, that can be performed using the functionSGquasistaticHsolution(). In this example, only the rigidbody motions, i.e. the motions of the stylus that do notinvolve variations in the contact forces, are considered. Weextracted this motions from the solution of the quasistaticproblem. This can be performed since the solution Gammaprovided by SGquasistaticHsolution() is organized in orderto highlight the rigid body motions in the fields Gamma.urband Gamma.zrrb. Gamma.urb is a matrix whose columnsrepresent a basis of all the possible object rigid body motions,while Gamma.zrrb represents the corresponding basis ofsynergy reference variations. The weight matrices necessary toevaluate the manipulability indexes have been set, for the sakeof simplicity, as identity matrices. Finally, the manipulabilityanalysis has been performed with the function SGkinManip-ulability(). This function provides as outputs the principaldirections in the object displacement and synergy spaces thatmaximizes and minimizes the kinematic manipulability index,and the corresponding eigenvalues. With these information,using standard MATLAB graphic functions, the kinematicmanipulability ellipsoid can be drawn, as shown in Fig. 5.

B. Mapping human hand synergies onto robotic hands

SynGrasp allows defining hand models with coupled jointsactivation according to a defined synergistic organization.In the paradigmatic hand the synergy subspaces are definedaccording to the data collect by Santello et al. [5] and can beset using the commands SGsantelloSynergies() and SGde-fineSynergies(). A different approach is necessary to exploitsynergies on robotic hands. In the example SGmappingEx-ample.m a possible solution is shown to map human hand

Page 9: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

9

Fig. 6: Mapping synergies from the human hand model to therobotic hand. The reference points on the paradigmatic handph (red dots) allows to define the virtual sphere. Activating thehuman hand synergies, the sphere is moved and strained; itsmotion and strain can be evaluated from the velocities of thereference points ph. This motion and strain, scaled by a factordepending on the virtual sphere radii ratio, is then imposed tothe virtual sphere relative to the robotic hand, defined on thebasis of the reference points pr (yellow dots).

synergies onto robotic hands using the object-based algorithmpresented in [38].

Let us consider the human hand model defined throughSGparadigmatic, and a robotic hand, e.g. the SG3Fingered.Consider also two sets of reference points ph and pr arbitrarilyplaced on the human and the robotic hand, respectively. In thefollowing we will consider the fingertips as reference points.Other choices are possible as, for example, in the intermediatephalanges or in the hand palm since the number of referencepoints can be arbitrarily set [16], [38]. Two virtual objectscan be defined as the minimum volume spheres containingthe reference points in the respective hands. The functionminboundsphere() provided within the toolbox solves thisissue. The activation of a synergy (SGactivateSynergies())on the paradigmatic hand results in a motion of the referencepoints and consequently of the virtual sphere. The wholemotion of the hand can be thus described as:

• a rigid-body motion, defined by the linear and angularvelocities of the sphere center oh and ωh, respectively;

• a non-rigid strain represented by the radius variation rhof the sphere.

The main idea of the mapping is to impose that the virtualsphere defined on the robotic hand moves according to thevelocities oh and ωh and changes its radius according torh, apart from a scaling factor introduced to deal with thepossible differences on the workspace dimension (see Fig. 6).Then, through inverse kinematics techniques, it is possible tocompute the joint values on the robotic hand. What we obtainis a way of controlling the reference joint variables qr ∈ℜnqr

of the robotic hand using the vector of synergies z of theparadigmatic hand. In other terms we design a map Sr to steerthe robotic joint reference variables as

qr = Sr z, (13)

where map Sr depends on the synergy matrix Sh and othervariables as explained in the following.

To define the mapping we assume that both the humanand the robotic hands are in given configurations q0h andq0r (Fig. 6). Representing the motion of the hand through thevirtual object, the velocity of the generic reference point pihcan be expressed as

pih = oh +ωh× (pih−oh)+ rh (pih−oh) . (14)

Grouping all the reference point we obtain

ph = Ah

ohωhrh

, (15)

where matrix Ah ∈ℜnch×7 is defined as

Ah =

I −s(p1h−oh) (p1h−oh)· · · · · · · · ·I −s(pih−oh) (pih−oh)· · · · · · · · ·

(16)

and s() is the skew operator. The SynGrasp function map-ping A() computes the matrix Ah for a given set of referencepoints. The virtual sphere motion and deformation is thencomputed as a function of the synergy vector velocity z ofthe paradigmatic hand oh

ωhrh

= A#h ph = A#

hJhShz, (17)

where A#h denotes the pseudo-inverse of matrix Ah. Let us

define the virtual object scaling factor as the ratio betweenthe sphere radii ksc =

rrrh

. This factor is necessary to scale thevelocities from the human to the robotic hand workspaces.Note that the scaling factor depends on the dimensions of thehands, but also on their configuration.

Then, the motion and deformation of the virtual spheregenerated by the paradigmatic hand are scaled and trackedby the virtual sphere referred to the robotic hand

orωrrr

= Kc

ohωhrh

, (18)

where the scale matrix Kc ∈ℜ7×7 is defined as

Kc =

kscI3,3 03,3 03,103,3 I3,3 03,101,3 01,3 1

. (19)

According to eq. (15), the corresponding robot reference pointvelocity pr is given by

pr = Ar

orωrrr

, (20)

where matrix Ar ∈ℜncr×7 is defined as in eq. (16). Recallingeq. (17) and (18) we can express the robotic hand referencepoint velocities pr as a function of the synergy velocities z

pr = ArKcA#hJhShz (21)

and, considering the robot hand differential kinematics pr =Jrqr, where Jr ∈ℜncr×nqr is its Jacobian matrix, the following

Page 10: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

10

Fig. 7: Example of an underactuated six DoFs robotic hand,actuated by three elastic tendons, with three passive elasticelements (in gray in the scheme). For the sake of simplicity,only two of the three fingers are shown in the scheme.

relationship between robot hand joint velocities and synergyvelocities is defined as

qr = J#r ArKcA#

hJhShz. (22)

Finally the synergy mapping Sr in (13) for the robotic handis computed as

Sr = J#r ArKcA#

hJhSh, (23)

where J#r is the pseudoinverse of the Jacobian of the robotic

hand and Jh is the Jacobian of the human hand model. Thesynergy matrix is then assigned to the robotic hand using thefunction SGdefineSynergies().

C. Modeling and analysis of underactuated hands

Tendon driven handThe underactuated hand considered in this example has

three fingers and each finger has two phalanges with thesame length for a total of 6 DoFs. The gripper is sketchedin Fig. 7. For the sake of simplicity, only two of the threefingers are shown in the scheme. Let J1, · · · ,J6 be six referencepoints on the joint axes, and let θ1, · · · ,θ6 be the jointangles. The structure of the hand is defined in the SynGraspfile SGunderActuated1, while the whole example can befound on SGexampleUnderactuated. The main aspect tobe considered in this example is the coupling between thejoint realized through the pulley-tendon system. This couplingis modeled through the definition of S matrix in the fileSGexampleUnderactuated, whose elements depend on pulleyradii.

We assume that the robotic hand is grasping an object withits fingertips, with contact points in C1, C2, and C3. The origin

of the local object reference frame is on the centroid of thecontact points, the local x axis is parallel to C1C2 direction, andthe local z direction is orthogonal to the plane defined by thecontact points. The contact points are added to the model withthe function SGaddFtipContact. The contact model assumedin this example is the hard finger. The object displacementis defined with respect to the base reference system by thevector u∈ℜ6. We consider a reference configuration in whichthe external load w0 is zero, the contact forces are λ01, λ02,and λ03, applied at the points C1, C2 and C3, respectively. Thecontact vector is then defined as λ0 = [λ T

01 λ T02 λ T

03]T ∈ℜ9.

Once the hand structure, the hand configuration, and thecontact points are defined, the grasp matrix and the Jacobianmatrix can be evaluated with the functions SGjacobianMatrixand SGgraspMatrix previously described. A first numericalanalysis was devoted to evaluate the total grasp stiffness [22].We considered a reference configuration in which: θ1 = θ3 =θ5 =

π

4 rad, θ2 = θ4 = θ6 =π

2 rad, w0 = 0 N, λ01 = λ02 = λ03 =0 N. The phalanx length a was set to 0.035 m. The stiffnessmatrices were Kc = kcI6,6, Kq = kqI6,6, where kc = 1000 N/m,kq = 100 Nm/rad.

Let us assume that each finger is driven by a tendonas shown in Fig. 7. This actuation system is a simplifiedillustrative example inspired by the work presented in [41].The system has still six degrees of freedom, but only threeactuators. We can define the Lagrangian variable vector asz = [z1 z2 z3 q2 q4 q6]

T, in which z1, z2, and z3 representtendon displacements and are actively controlled, while q2,q4 and q6 are passive. From the kinematic analysis of themechanism it results that

S =

1r1

0 0 − r2r1

0 00 0 0 1 0 00 1

r10 0 − r2

r10

0 0 0 0 1 00 0 1

r10 0 − r2

r10 0 0 0 0 1

,

where r1 and r2 are the pulley radii on the joints J1− J3− J5and J2−J4−J6, respectively. In this case S is constant. Sincethe hand is underactuated, only the first three componentsof the Lagrangian variable vector reference values zr arecontrollable, the others will be null or constant, since theyrepresent passive degrees of freedom. So, we will consider∆zr = [∆z1 ∆z2 ∆z3 0 0 0]T in the modeling. The stiffnessmatrix Kz is defined as Kz = diag(ka,ka,ka,kp,kp,kp), whereka is the tendon stiffness, expressed in N/m, while kp is thepassive joint stiffness, expressed in Nm/rad.

The resulting total grasp stiffness matrix K expresses therelationship between the object wrench and displacement, i.e.,can be easily evaluated using SynGrasp function SGgraspS-tiffness, and its values are

K =

[Kt 00 Kr

],

where

Kt =

1027 0 00 2014 00 0 195

N/m

Page 11: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

11

Fig. 8: Underactuated hand with passive joints, kinematics ofone of the fingers.

Kr =

116 0 00 298 00 0 582

Nm/rad.

The function SGquasistatic() can be adopted also in thisexample to solve the linearized grasp system for the assignedgrasp configuration and for a given variation of the tendonreference displacements. Since only three DoFs are control-lable, the subspace of controllable internal force dimension isthree and a basis of such subspace is given by the matrix Pobtained by applying the function SGquasistaticMaps() andconsidering the first three columns

P =

−0.0719 0.0 −0.00150.0381 0.0365 −0.0381

0.0 −0.0 0.00.0704 −0.0000 −0.0704

0.0 −0.0729 0.00.0 0.0 0.0

0.0015 0.0 0.0719−0.0381 0.0365 0.0381

0.0 0.0 0.0

.

A six DoFs hand actuated with two four linkages mechanismsLet us again consider a three fingered robotic hand, whose

kinematic structure is described by the same SynGrasp fileSGunderActuated1. In this case, we assume that each fingeris actuated according to a articulated mechanism schematicallyshown in Fig. 8, inspired by [42]. Each finger in this casepresents four joints, defining a parallel kinematic structure.In this analysis, we assume that the contact points are onthe links a1 and a5, only two joint angles are considered ingrasp analysis, namely, for the first finger, the angles q1 andq2 shown in Fig. 8. Each finger of the gripper has two degreesof freedom, but it is actuated by only one motor, that movesthe link indicated with a2. Another variable is necessary todescribe the finger configuration. We choose the angle betweenlinks a1 and a4, indicated with zp. Then, for each finger wehave zi = [za,zp]

T, the joint variable are q1 and q2. We observethat

q2 = α + zp−π

where α is the angle between links a5 and a4, constant.

Furthermore we observe that

q1 = za + γ γ = γ1 + γ2,

γ1 = arccos(

a21 +d2−a4

42a1d

)γ2 = arccos

(a2

2 +d2−a43

2a2d

),

d =√

a21 +a2

4−2a1a4 coszp.

The synergy matrix S can be evaluated as

S =

Si 0 00 Si 00 0 Si

,with

S =

[∂q1∂ za

∂q1∂ zp

∂q2∂ za

∂q2∂ zp

]=

[1 dγ

dzp

0 1

].

Fig. 9 shows, for three values of za and zp (arbitrarilyselected, the same values were assumed for the three fingers),the corresponding hand configuration and the numerical valueof the non–linear term in the synergy matrix. Also in theunderactuated case, the linearized grasp system can be easilysolved using SynGrasp functions, in particular, the matrix Pthat maps input references variables ∆za to contact forces ∆λ

in this case has dimensions 9×3.

D. Grasp planner

The example SGgraspPlannerExample reports how theSynGrasp function SGgraspPlanner() can be used to obtaina stable grasp. As first step, the user can select the type ofhand between the SGparadigmatic, the SG3Fingered and theSGmodularHand. The next step is the selection of the numberof pregrasp positions that will be tested by the grasp planner.Then, the user can select the object to grasp between a sphere,a cylinder and a cube. The object are then created using thespecific function SGsphere(), SGcylinder() and SGcube().Finally, it is required to select the quality measure to be usedfor the grasp selection. The grasp planner is now called andthe best resulting grasp plotted.

Tab. II reports the results for the SG3Fingered hand graspinga cube with 50mm edge. Ten different starting positions areconsidered. The table shows the obtained quality indexesusing the available quality measures, where MEV stands formanipulability ellipsoid volume quality index, GII is the graspisotropy index, MSVG represents the minimum singular valueof the matrix G, DSTC is the distance from the singularconfiguration and UOT is the uniformity measure. In Fig. 2 thebest obtained grasp using the SGdistSingularConfiguration()quality measure is shown.

In Fig. 10 three possible outputs of the grasp planning algo-rithm are represented. We ran the grasp planner on the three-fingered hand model in order to generate suitable grasps ofthe three different objects available in SynGrasp. Ten possiblegrasps were computed for each of the three objects, and thebest configurations were selected among them, according tothe grasp isotropy index (GII) metric.

Page 12: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

12

za = π/10, zp = 3/4π za = π/4, zp = 2/3π za = 0, zp = π/2

dzp=−0.7369 dγ

dzp=−0.7647 dγ

dzp=−0.7435

Fig. 9: Example of underactuated hand with four bar system coupling between joints. Evaluation of the non linear element ofS matrix, dγ

dzpin three configurations.

TABLE II: Quality index for ten different starting positions. The 3Fingered hand is tested on a cube and all the resultingquality measures are reported.

Quality measure Quality index for each starting positionMEV 5.5e03 5.2e03 4.6e03 4.2e03 4.1e03 3.4e03 2.4e03 2.3e03 1.7e03 0.1e03GII 0.0329 0.0321 0.0319 0.0315 0.0311 0.0311 0.0306 0.0305 0.0285 0.0258

MSVG 1.7316 1.7301 1.7278 1.7172 1.7127 1.7094 1.7000 1.6992 1.6733 1.6580DTSC 0.3001 0.2785 0.2699 0.2503 0.2428 0.2288 0.2057 0.1923 0.1787 0.1579UOT 5.6e09 220.95 218.95 201.93 180.40 178.94 175.03 170.70 154.20 141.90

(a) (b) (c)

Fig. 10: Grasps obtained running the grasp planner with the three-fingered hand and the three different objects modeled in thetoolbox: a sphere (a), a cube (b) and a cylinder (c).

IV. APPLICATIONS

In this section, we report some practical applications of theproposed toolbox. In particular, we describe how the object-based mapping able to transfer human hand synergies ontorobotic hand, described in Section III-B, has been validated inan experimental setup. Starting from the simulation obtainedusing SynGrasp, the capability of reproducing object motionsand exerted grasping forces has been considered. All theexperiments have been performed on two robotic hands: theDLR-HIT Hand II and the modular hand.

It is worth noting that methods and results described in thefollowing does not represent an experimental validation of thetools provided in SynGrasp. This section is rather intendedto show how the toolbox can be used to simulate graspingand manipulation tasks and to generate trajectories for robotichands, exploiting MATLAB tools for hardware/software inte-gration.

A. Object motion evaluationIn this experiment, we compared the trajectory of the center

of a virtual grasped object moved by the paradigmatic hand

in SynGrasp and the trajectory of a real object grasped andmoved by the robotic hands. We tracked the grasped objectusing a camera and the ARToolkit library [43], [44], whichconsent to track the motion of a defined marker. In Fig. 11the setup of the experiment is showed.

We considered a cube as grasped object. Only the firstfour synergies were activated on the paradigmatic hand model.Given this underactuation condition, for each configuration ofthe hand, only one feasible rigid body motion of the cubeexists, corresponding to a particular combination of the foursynergies [9]. This particular combination was activated on thesimulated paradigmatic hand at each time step, resulting in anobject movement that is represented by the blue line in Fig. 12.The resulting motion of the paradigmatic hand was mappedon the two considered robotic hands. The mapping algorithmpresented in [38] was applied in the two cases using SynGraspfunctions, as described in Section III-B. The joint anglesobtained as output of the mapping procedure were directly sentto the robotic hands using a serial connection (for the modular

Page 13: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

13

Fig. 11: The experiment setup for object motion evaluation.The camera measures the movement of the marker placed onthe grasped object.

Fig. 12: Object trajectories obtained during the experiments.

hand) or via UDP (for the DLR-HIT hand II case). Themapped movement produced an object displacement and theresulting trajectories are represented in Fig. 12. We performed20 trials for each robotic hand. The plotted trajectories that weconsidered to analyze the performances have been computedas the average of the 20 obtained trajectories.

We can observe that the three paths have different lengths.This is due to the scaling factor that we introduced in themapping algorithm. Considering the module of the trajectory,the paradigmatic hand performed a 5.9 mm movement. Themodular hand performed a 3.61 mm movement correspondingto the scaling factor ksc = 0.61 computed by the mappingalgorithm. The DLR-HIT Hand II, with a scaling factor ofksc = 1.3, produced an object displacement of 7.69 mm. Notethat the DLR-HIT Hand II obtained better results in replicatingthe object motion trajectory. This is due to its higher number ofavailable DoFs and, thus, to the higher dexterity. The modularhand failed to finely reproduce the movement, given its simplekinematic structure. However the mapping algorithm, withits pseudoinverse computation, produced the closest feasibletrajectory for this hand.

For both robotic hands, we computed also the average

angular distance between the linear velocity vector of theparadigmatic hand (compute with SynGrasp) and the robotichands (experimental data) at each time step. For the modularhand this error was 7.4 degrees, while for the DLR-HIT HandII it was practically zero.

B. Internal forces evaluationIn order to evaluate the performance of the mapping algo-

rithm in grasping and manipulation tasks, we focused on thecomputation of the exerted internal forces. Internal forces arethose forces that do not affect the object static equilibrium,and play an important role in the grasp stability [28]. Inthis experiment, we compared the internal forces obtainedsimulating the paradigmatic hand grasping a virtual objectin SynGrasp with the forces measured with an instrumentedobject grasped by the two robotic hands. The core of theinstrumented object is a cube in which each of its facescontains a 6 axis force torque sensor. An external interactionface can be mounted at the center of each face. The externalsurfaces are interchangeable and with different shapes so thatit is possible to create a cube, a sphere and a cylinder. Detailson this device can be find in [45]. The experimental setup isreported in Fig. 13.

For the sake of simplicity, only the results obtained with thecubic and the spherical configuration of the object are reported.We adopted a measure of the whole object deformation energyproduced by the activation of a combination of synergies toevaluate and compare the performance of the analyzed map-ping procedure. This allows overcoming possible differencesin terms of number of contact points, which makes impossiblea direct comparison between the exerted forces. A variationof the internal forces δλ is obtained activating a combinationof synergies on the paradigmatic hand.

Fig. 13: Internal force evaluation setup. On the left, theinstrumented object graphical interface.

Considering the model of soft synergies described in [17],the contact force variation can be computed considering theassociated compliance. Let indicate with δx the vector con-taining the deformation components of each contact pointevaluated as δx = K−1

s δλ , where Ks is a contact stiffnessmatrix. The elastic energy variation produced by the activationof synergies can be computed as

δEel =12

Ks‖(δx)2‖= 12

K−1s ‖(δλ )2‖. (24)

Page 14: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

14

The δλ values were computed in SynGrasp for the paradig-matic hand, while they were read directly from the forcesensors of the object for the robotic hands (see Fig. 13). Weconsidered the same Ks value for the two hands. We computedthe energy variation index expressed in (24) considering theactivation of the first three synergies and we evaluated thepercentage difference between the paradigmatic (simulated)and the robotic hand. In Fig. 14 is represented the SynGraspmodel of the paradigmatic hand used for the simulations.Values obtained in simulation activating separately the first

Fig. 14: The Paradigmatic Hand model grasping the cube inSynGrasp.

three synergies were compared with energy variations obtainedby the robotic hands. The object was kept in a fixed referenceposition. This allows to compensate the gravity effects. InFig. 15 the robotic hands grasping the instrumented objectin “cube-configuration” are shown, while in Fig. 16 the DLR-HIT Hand II grasping the object in “sphere-configuration” isreported.

We performed 20 trials with both the two robotic hands andthe two object configurations and we computed the averagepercentage error obtained by the robotic hands with respectto the total amount of energy variation produced by theparadigmatic hand. Results are summarized in Tables III andIV.

Note that, as expected, the DLR-HIT Hand II achieves bestperformances also in terms of energy. The worst performances

Fig. 15: The two robotic hands grasping the sensorized objectin the reference positions.

Fig. 16: The DLR-HIT Hand II grasping the instrumentedobject in the sphere configuration

TABLE III: Energy variation error for the Modular Hand -Cubic and spherical object

Synergies % Error Cubic Obj. % Error Spherical Obj.Syn 1 21% 18%Syn 2 10% 5%Syn 3 50% 45%

TABLE IV: Energy variation error for the DLR-HIT Hand II- Cubic and spherical object

Synergies % Error Cubic Obj. % Error Spherical Obj.Syn 1 1% 1%Syn 2 26% 22%Syn 3 10% 8%

that we obtained correspond to the third synergy mapped onthe modular hand. This can be explained considering thatthe third synergy is substantially a movement that constrainsthe fingers of the paradigmatic hand to spread out mainlyusing the adduction/abduction joints. This kind of movementcan not be reproduced on the modular hand because it hasnot adduction/abduction joints and thus also the total energyvariation can not be reproduced.

V. CONCLUSION

The paper presents the main features of SynGrasp, a MAT-LAB toolbox for the analysis of human and robotic graspsin presence of underactuation and compliance. The toolboxfunctions were developed to allow a simple and intuitiveanalysis of the grasp properties, e.g. controllable force andmotion, manipulability and grasp quality measures, in bothfully and underactuated robotic hands. The tool is designedto integrate in the hand model a kinematic coupling betweenjoints, as those provided in the synergistic organization of thehuman hand or due to the mechanical or control constraintsimplemented in the design of robotic hands. Possible appli-cations of the SynGrasp toolbox range from the analysis ofthe human hand for studies in neuroscience, to the design andoptimization of robot hands. The toolbox is developed as acollection of MATLAB functions and does not require anyexternal packages to be used. Its structure is suitable for theintegration with other tools, e.g. optimization, data analysis,dynamic simulations, 3D representation and animation. The

Page 15: SynGrasp: A Matlab Toolbox for Underactuated and Compliant ...sirslab.dii.unisi.it/papers/2015/Malvezzi.RAM.2015.Grasping.Fin.pdf · SynGrasp: A Matlab Toolbox for Underactuated and

15

toolbox provides several utility functions for a simple graphi-cal representation of the hand, the object, and the main analysisresults.

REFERENCES

[1] M. Ciocarlie and P. Allen, “A design and analysis tool for underactuatedcompliant hands,” in Intelligent Robots and Systems, 2009. IROS 2009.IEEE/RSJ International Conference on, pp. 5234–5239, IEEE, 2009.

[2] A. Bicchi and D. Prattichizzo, “Analysis and optimization of tendi-nous actuation for biomorphically designed robotic systems,” Robotica,vol. 18, no. 1, pp. 23–31, 2000.

[3] J. Butterfass, M. Grebenstein, H. Liu, and G. Hirzinger, “DLR-handII: next generation of a dextrous robot hand,” in Proc. IEEE Int. Conf.Robot. Automat, vol. 1, pp. 109–114, 2001.

[4] A. M. Dollar and R. D. Howe, “Joint coupling design of underactu-ated grippers,” in 30th Annual Mechanisms and Robotics Conference,pp. 903–911, 2006.

[5] M. Santello, M. Flanders, and J. F. Soechting, “Postural hand synergiesfor tool use,” The Journal of Neuroscience, vol. 18, pp. 10105–10115,December 1998.

[6] C. Y. Brown and H. H. Asada, “Inter-finger coordination and posturalsynergies in robot hands via mechanical implementation of principalcomponents analysis,” in Proc. IEEE/RSJ Int. Conf. Intel. Robots Syst,pp. 2877–2882, IEEE, 2007.

[7] M. Ciocarlie, C. Goldfeder, and P. Allen, “Dimensionality reduction forhand-independent dexterous robotic grasping,” in Proc. IEEE/RSJ Int.Conf. Intel. Robots Syst, pp. 3270–3275, 2007.

[8] D. Prattichizzo, M. Malvezzi, and A. Bicchi, “On motion and force con-trollability of grasping hands with postural synergies,” in Proceedingsof Robotics: Science and Systems, (Zaragoza, Spain), June 2010.

[9] D. Prattichizzo, M. Malvezzi, M. Gabiccini, and A. Bicchi, “On motionand force controllability of precision grasps with hands actuated by softsynergies,” IEEE Transactions on Robotics, vol. 29, no. 6, pp. 1440–1456, 2013.

[10] M. Malvezzi, G. Gioioso, G. Salvietti, D. Prattichizzo, and A. Bicchi,“Syngrasp: a matlab toolbox for grasp analysis of human and robotichands,” in Proc. IEEE Int. Conf. Robot. Automat, (Karlsruhe, Germany),2013.

[11] A. Miller and P. Allen, “GraspIt!: A Versatile Simulator for RoboticGrasping,” IEEE Robot. Autom. Mag., vol. 11, no. 4, pp. 110–122, 2004.

[12] B. Leon, S. Ulbrich, R. Diankov, G. Puche, M. Przybylski, A. Morales,T. Asfour, S. Moisio, J. Bohg, J. Kuffner, et al., “Opengrasp: a toolkitfor robot grasping simulation,” Simulation, Modeling, and Programmingfor Autonomous Robots, pp. 109–120, 2010.

[13] R. Diankov and J. Kuffner, “Openrave: A planning architecture forautonomous robotics,” Robotics Institute, Pittsburgh, PA, Tech. Rep.CMU-RI-TR-08-34, 2008.

[14] MATLAB and Simulink for Technical Computing, [Online]: http://www.mathworks.com/.

[15] M. Malvezzi, G. Gioioso, G. Salvietti, and D. Prattichizzo, “Syngrasp:A matlab toolbox for underactuated and compliant hands, user’s guide,”2014. [Online]: http://sirslab.dii.unisi.it/syngrasp.

[16] G. Gioioso, G. Salvietti, M. Malvezzi, and D. Prattichizzo, “An object-based approach to map human hand synergies onto robotic hands withdissimilar kinematics,” in Robotics: Science and Systems VIII, Sidney,Australia: The MIT Press, July 2012.

[17] M. Gabiccini, A. Bicchi, D. Prattichizzo, and M. Malvezzi, “On the roleof hand synergies in the optimal choice of grasping forces,” AutonomousRobots, vol. 31, no. 2, pp. 235–252, 2011.

[18] B. Siciliano, L. Sciavicco, L. Villani, and G. Oriolo, Robotics: Mod-elling, Planning and Control. Advanced Textbooks in Control and SignalProcessing, Springer, 2008.

[19] D. Prattichizzo and J. Trinkle, “Chapter 28: Grasping,” in Handbookon Robotics (B. Siciliano and O. Kathib, eds.), pp. 671–700, Springer,2008.

[20] R. Murray, Z. Li, and S. Sastry, A mathematical introduction to RoboticManipulation. CRC Press, 1994.

[21] S. Chen and I. Kao, “Conservative congruence transformation for jointand cartesian stiffness matrices of robotic hands and fingers,” Theinternational Journal of Robotics Research, vol. 19, pp. 835–847, sep2000.

[22] M. Cutkosky and I. Kao, “Computing and controlling the compliance ofa robotic hand,” IEEE Transaction on Robotics and Automation, vol. 5,no. 2, pp. 151–165, 1989.

[23] D. Prattichizzo, M. Malvezzi, M. Gabiccini, and A. Bicchi, “On the ma-nipulability ellipsoids of underactuated robotic hands with compliance,”Robotics and Autonomous Systems, Elsevier, 2012.

[24] M. Malvezzi and D. Prattichizzo, “Evaluation of grasp stiffness in un-deractuated compliant hands,” in Proc. IEEE Int. Conf. Robot. Automat,2013.

[25] J. Salisbury and J. J. Craig, “Articulated hands, force control andkinematic issues,” The International Journal of Robotics Research,vol. 1, pp. 4–17, June 1982.

[26] T. Yoshikawa, “Manipulability of robotic mechanisms,” The Interna-tional Journal of Robotics Research, vol. 4, pp. 3–9, June 1985.

[27] A. Bicchi and D. Prattichizzo, “Manipulability of cooperating robotswith passive joints,” in Proc. IEEE Int. Conf. Robot. Automat, (Leuven,Belgium), pp. 1038–1044, May 1998.

[28] A. Bicchi, “On the closure properties of robotic grasping,” The Int. J.of Robotics Research, vol. 14, no. 4, pp. 319–334, 1995.

[29] G. Baud-Bovy, D. Prattichizzo, and N. Brogi, “Does torque minimizationyield a stable human grasp?,” in Multi-Point Physical Interaction withReal and Virtual Objects (F. Barbagli, D. Prattichizzo, and K. Salisbury,eds.), STAR, Springer Tracts in Advanced Robotics, Springer, 2005.

[30] R. Suarez, J. Cornella, and M. R. Garzon, Grasp quality measures.Institut d’Organitzacio i Control de Sistemes Industrials, 2006.

[31] Z. Li and S. S. Sastry, “Task-oriented optimal grasping by multifingeredrobot hands,” IEEE Trans. Robot., vol. 4, no. 1, pp. 32–44, 1988.

[32] K. B. Shimoga, “Robot grasp synthesis algorithms: A survey,” Int. J.Robot. Res., vol. 15, no. 3, pp. 230–266, 1996.

[33] C. A. Klein and B. E. Blaho, “Dexterity measures for the design andcontrol of kinematically redundant manipulators,” Int. J. Robot. Res.,vol. 6, no. 2, pp. 72–83, 1987.

[34] J. K. Salisbury and J. J. Craig, “Articulated hands force control andkinematic issues,” Int. J. Robot. Res., vol. 1, no. 1, pp. 4–17, 1982.

[35] B.-H. Kim, S.-R. Oh, B.-J. Yi, and I. H. Suh, “Optimal grasping basedon non-dimensionalized performance indices,” in Proc. IEEE/RSJ Int.Conf. Intel. Robots Syst, vol. 2, pp. 949–956, IEEE, 2001.

[36] T. Wimbock, B. Jahn, and G. Hirzinger, “Synergy level impedancecontrol for multifingered hands,” in Proc. IEEE/RSJ Int. Conf. Intel.Robots Syst, pp. 973–979, IEEE, 2011.

[37] G. Palli, C. Melchiorri, G. Vassura, U. Scarcia, L. Moriello, G. Berselli,A. Cavallo, G. De Maria, C. Natale, S. Pirozzi, et al., “The dexmarthand: Mechatronic design and experimental evaluation of synergy-basedcontrol for human-like grasping,” Int. J. Robot. Res., vol. 33, no. 5,pp. 799–824, 2014.

[38] G. Gioioso, G. Salvietti, M. Malvezzi, and D. Prattichizzo, “Mappingsynergies from human to robotic hands with dissimilar kinematics: anapproach in the object domain,” IEEE Trans. Robot., 2013.

[39] J. Shim, A. Hooke, Y. Kim, J. Park, S. Karol, and Y. Kim, “Handwriting:Hand–pen contact force synergies in circle drawing tasks,” Journal ofbiomechanics, vol. 43, no. 12, pp. 2249–2253, 2010.

[40] F. Freeman, The Handwriting Movement: A Study of the Motor Factorsof Excellence in Penmanship. The University Press, 1918.

[41] L. U. Odhner and A. Dollar, “Dexterous manipulation with underactu-ated robotic hands,” in Proc. IEEE Int. Conf. Robot. Automat, (Shanghai.China), 2011.

[42] L. Birglen, T. Laliberte, and C. Gosselin, Underactuated Robotic Hands,vol. 40 of Springer Tracts in Advanced Robotics. Springer, 2008.

[43] A. library for Augmented Reality. [Online]: http://www.hitl.washington.edu/artoolkit/.

[44] H. Kato and M. Billinghurst, “Marker Tracking and HMD Calibrationfor a Video-Based Augmented Reality Conferencing System,” in Proc.IEEE ACM Int. Workshop on Augmented Reality, 1999.

[45] G. Salvietti, G. Gioioso, M. Malvezzi, D. Prattichizzo, A. Serio,E. Farnioli, M. Gabiccini, A. Bicchi, I. Sarakoglou, N. Tsagarakis,and D. Caldwell, “Hands.dvi: A device-independent programming andcontrol framework for robotic hands,” in Gearing up and acceleratingcross-fertilization between academic and industrial robotics research inEurope - Technology transfer experiments from the ECHORD project,pp. 197–215, Springer Tracts in Advanced Robotics, Springer, 2014.