SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and...

6
SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and Robotic Hands Monica Malvezzi 1 , Guido Gioioso 1,2 , Gionata Salvietti 2 , Domenico Prattichizzo 1,2 , and Antonio Bicchi 2,3 Abstract—SynGrasp is a MATLAB toolbox developed for the analysis of grasping, suitable both for robotic and human hands. It includes functions for the definition of hand kinematic structure and of the contact points with a grasped object. The coupling between joints induced by an underactuated control can be modeled. The hand modeling allows to define compliance at the contact, joint and actuator levels. The provided analysis functions can be used to investigate the main grasp properties: controllable forces and object displacement, manipulability analysis, grasp quality measures. Functions for the graphical representation of the hand, the object and the main analysis results are provided. I. INTRODUCTION MATLAB is a programming environment for algorithm development, data analysis, visualization, and numerical computation [1]. Specific toolboxes (i.e., collections of ded- icated MATLAB functions) have been developed in the past years as support for research and teaching in almost every branch of engineering, such as telecommunications, electronics, aerospace, mechanics and control. As far as robotics is concerned, several toolboxes have been presented for the modelling and control of robot systems [2], [3], [4]. However, to the best of our knowledge, a specific toolbox for grasping evaluation is still missed [5]. The analysis of the interaction forces, hand postures, contact point position planning and fine manipulation are typical issues related to hand grasping common to different fields ranging from anatomy [6] and neuroscience [7] to robotics [5]. Differently from other simulators like GraspIt! [8] and Opengrasp [9], SynGrasp has been developed entirely in MATLAB and offers an easy and intuitive script program- ming. The main advantage of this programming environment is that it can be easily integrated with specific tools and built-in math functions enabling the exploration of multiple approaches and the integration with other analysis tools, e.g. statistical elaboration of experimental data, optimization, dynamic models and simulations etc.. The SynGrasp tool- box has been developed in the context of the EU Project “THE - The Hand Embodied” that aims to study how the This work was partially supported by the European Commission with the Collaborative Project no. 248587, THE Hand Embodied, within the FP7-ICT- 2009-4-2-1 program Cognitive Systems and Robotics and the Collaborative EU-Project Hands.dvi in the context of ECHORD (European Clearing House for Open Robotics Development) 1 Universit` a degli Studi di Siena, Dipartimento di Ingegneria dell’Informazione, Via Roma 56, 53100 Siena, Italy. {malvezzi, gioioso, prattichizzo}@dii.unisi.it 2 Department of Advanced Robotics, Istituto Italiano di Tecnologia, via Morego 30, 16163 Genova, Italy. [email protected] 3 Interdept. Research Center E. Piaggio, Via Diotisalvi 2, University of Pisa, Pisa, Italy. [email protected] Fig. 1. Visualization of the SynGrasp model of an anthropomorphic hand grasping an object. embodied characteristics of the human hand and its sensors, the sensorimotor transformations, and the very constraints they impose, affect and determine the learning and control strategies we use for such fundamental cognitive functions as exploring, grasping and manipulating [10]. For this reason, the toolbox provides several functions for human and robot grasping evaluation including specific functions for human hand synergies evaluation [11], [12]. Other toolboxes were developed within the THE Con- sortium to cover different issues related to hand modeling and analysis. In particular, The Robotic Grasp Toolbox [13] and SynGrasp shares some function and some utilities, since they both were designed to deal with grasping evaluation of human hands and underactuated robotic hand models. SynGrasp is based on the grasping model presented in [12] and [14]. In this paper, a preliminary version of the toolbox is pre- sented. Its main features are here summarized: Hand modeling. New hand models can be easily defined in addiction to the models already included in the toolbox. In particular, the toolbox provides a kinematic and dynamic model, inspired by the human hand, that does not closely copy the properties of one specific human hand as for instance those presented in [15], but rather represents a trade-off between the complexity of the human hand model accounting for the synergistic organization of the sensorimotor system and the sim- plicity and accessibility of the models of robotic hands available on the market. Denavitt-Hartenberg parameters have been chosen as default notation to define hand

Transcript of SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and...

Page 1: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

SynGrasp: a MATLAB Toolbox for Grasp Analysisof Human and Robotic Hands

Monica Malvezzi1, Guido Gioioso1,2, Gionata Salvietti2, Domenico Prattichizzo1,2, and Antonio Bicchi 2,3

Abstract— SynGrasp is a MATLAB toolbox developed forthe analysis of grasping, suitable both for robotic and humanhands. It includes functions for the definition of hand kinematicstructure and of the contact points with a grasped object. Thecoupling between joints induced by an underactuated controlcan be modeled. The hand modeling allows to define complianceat the contact, joint and actuator levels. The provided analysisfunctions can be used to investigate the main grasp properties:controllable forces and object displacement, manipulabilityanalysis, grasp quality measures. Functions for the graphicalrepresentation of the hand, the object and the main analysisresults are provided.

I. INTRODUCTION

MATLAB is a programming environment for algorithmdevelopment, data analysis, visualization, and numericalcomputation [1]. Specific toolboxes (i.e., collections of ded-icated MATLAB functions) have been developed in thepast years as support for research and teaching in almostevery branch of engineering, such as telecommunications,electronics, aerospace, mechanics and control. As far asrobotics is concerned, several toolboxes have been presentedfor the modelling and control of robot systems [2], [3], [4].However, to the best of our knowledge, a specific toolboxfor grasping evaluation is still missed [5].

The analysis of the interaction forces, hand postures,contact point position planning and fine manipulation aretypical issues related to hand grasping common to differentfields ranging from anatomy [6] and neuroscience [7] torobotics [5]. Differently from other simulators like GraspIt![8] and Opengrasp [9], SynGrasp has been developed entirelyin MATLAB and offers an easy and intuitive script program-ming. The main advantage of this programming environmentis that it can be easily integrated with specific tools andbuilt-in math functions enabling the exploration of multipleapproaches and the integration with other analysis tools,e.g. statistical elaboration of experimental data, optimization,dynamic models and simulations etc.. The SynGrasp tool-box has been developed in the context of the EU Project“THE - The Hand Embodied” that aims to study how the

This work was partially supported by the European Commission withthe Collaborative Project no. 248587, THE Hand Embodied, within theFP7-ICT- 2009-4-2-1 program Cognitive Systems and Robotics and theCollaborative EU-Project Hands.dvi in the context of ECHORD (EuropeanClearing House for Open Robotics Development)

1Universita degli Studi di Siena, Dipartimento di Ingegneriadell’Informazione, Via Roma 56, 53100 Siena, Italy. {malvezzi,gioioso, prattichizzo}@dii.unisi.it

2 Department of Advanced Robotics, Istituto Italiano di Tecnologia, viaMorego 30, 16163 Genova, Italy. [email protected]

3 Interdept. Research Center E. Piaggio, Via Diotisalvi 2, University ofPisa, Pisa, Italy. [email protected]

Fig. 1. Visualization of the SynGrasp model of an anthropomorphic handgrasping an object.

embodied characteristics of the human hand and its sensors,the sensorimotor transformations, and the very constraintsthey impose, affect and determine the learning and controlstrategies we use for such fundamental cognitive functions asexploring, grasping and manipulating [10]. For this reason,the toolbox provides several functions for human and robotgrasping evaluation including specific functions for humanhand synergies evaluation [11], [12].

Other toolboxes were developed within the THE Con-sortium to cover different issues related to hand modelingand analysis. In particular, The Robotic Grasp Toolbox [13]and SynGrasp shares some function and some utilities, sincethey both were designed to deal with grasping evaluationof human hands and underactuated robotic hand models.SynGrasp is based on the grasping model presented in [12]and [14].In this paper, a preliminary version of the toolbox is pre-sented. Its main features are here summarized:• Hand modeling. New hand models can be easily defined

in addiction to the models already included in thetoolbox. In particular, the toolbox provides a kinematicand dynamic model, inspired by the human hand, thatdoes not closely copy the properties of one specifichuman hand as for instance those presented in [15], butrather represents a trade-off between the complexity ofthe human hand model accounting for the synergisticorganization of the sensorimotor system and the sim-plicity and accessibility of the models of robotic handsavailable on the market. Denavitt-Hartenberg parametershave been chosen as default notation to define hand

Page 2: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

models. A matrix describing the joint coupling definedby the kinematic structure of the hand linkages and/orthe synergistic organization of hand joints can be as-sociated to each hand. This matrix describes the jointcoordinated motion as for the sensorimotor synergiesdefined for the human hand [14]. Within the toolbox, thematrix can be manually set or dynamically calculatedand can be used for the actuation either of rigid or softsynergies, according to the definition given in [14].

• Grasp definition. The grasping hand configuration, con-tact points, Grasp and Jacobian matrices can be evalu-ated in order to analyse grasping performances. Control-lable internal force subspace, rigid-body object motions,manipulability ellipsoids can be evaluated.

• Grasp analysis and optimization. Different grasp qualitymeasures are available in the toolbox together with toolsfor the evaluation of the optimal values of graspingforces. In particular, for a given grasp configuration,the set of contact forces that allows minimizing suitablecost functions can be computed [16], [17] . The toolboxallows to perform kinematic and force manipulabilityanalysis, taking into account the joint coupling inducedby the underactuation and hand compliance [18], [19].

• Graphics. A set of functions allows the user to havea simple graphical representation of the manipulator.These functions can be used together with built-in MAT-LAB functions in order to plot the hand in contact withobjects of arbitrary shapes (Fig 1). Moreover, motiondue to synergies activation can be visualized.

The paper is organized as it follows. In Section II themain functions of the toolbox are presented. Section IIIsummarizes the proposed work, draws some conclusions andindicates the directions of future development of the toolbox.The toolbox, all the relative documentation, and some exam-ples can be downloaded from http://SynGrasp.dii.unisi.it.

II. OVERVIEW OF THE TOOLBOX

In this section the principal toolbox functions, summarizedin Table I, are introduced.

A. Hand Modeling

Hand Modeling section groups all the functions neededto describe the kinematic structure of the hand, in termsof fingers, links, joints and reference frames. Denavitt-Hartenberg (DH) parameters have been chosen as defaultnotation to define hand kinematics. A table containing theDH parameters of each finger has to be provided to describe ahand. Four hand models are already available in the toolbox:a three finger hand, inspired by the Barrett hand, the DLR-HIT II hand [20], a three fingered modular hand [21], anda 20 DoF model of an anthropomorphic hand, referred asparadigmatic hand in [14] (Fig. 2).

Since the toolbox can be used to investigate the propertiesof hands in which the joint displacements are coupled(mechanically or by means of a suitable control algorithm), asynergy matrix can be associated to each hand [12]. For the

FunctionHand ModelingSGmakehand 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 synergiesGrasp definitionSGaddcontact define a contact pointSGcontact structure with object contact propertiesSGadd ftip contact add a contact at the fingertipsSGselectionmatrix define selection matrixSGgraspmatrix define grasp matrixSGjacobianmatrix define the Jacobian matrixSGcontactstiffness define the contact stiffness matrixSGjointstiffness define the joint stiffness matrixSGsynergystiffness define the synergy stiffness matrixGrasp analysisSGquasistatic solve the quasi–static grasp linear systemSGquasistatic maps evaluates the linear i/o mapping matricesSGgraspanalysis internal force and motion subspacesSGrbmotions evaluate the object rigid body motionsSGkinematicmanipulability performs kinematic manipulability analysisSGforcemanipulability performs force manipulability analysisSGquasistatic hsolution 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 effortGraphicsSGplothand draw the hand in a selected configurationSGplotsyn shows the motion generated by a synergySGplotlink plot a cylindrical linkSGplotobject plot an object and the contact points

TABLE ILIST OF THE MAIN FUNCTIONS IN SYNGRASP.

20 DoF model of the human hand available in the toolbox,the synergy matrix computed by Santello et. al in [11] isprovided.

In SynGrasp, the function SGmakehand() defines a handstructure, whose arguments are defined by the functionSGmakefinger().

hand = SGmakehand(F)Arguments:F = array of finger structures definedby SGmakefinger.

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

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

T ∈ℜnq . The user can modify the hand configu-ration through the function SGmovehand().

new_hand = SGmovehand(hand,q)

SynGrasp toolbox is designed to model underactuation nomatters what type of grasp, human or robotic, is considered.

Page 3: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

−150−100−50050 −100 0 100−90

−80

−70

−60

−50

−40

−30

−20

−10

0

10

y (mm)x (mm)

z (m

m)a)

b)

c)

d)

Fig. 2. Some examples of hand models created with SynGrasp a) threefingered hand, b) modular hand, c) DLR hand II, d) anthropomorphic hand.

Underactuation is represented as a joint displacement aggre-gation corresponding to a reduced dimension representationof hand movements according to a compliant model of jointtorques. In the following the synergies underactuation of thehuman hand is considered.When the hand is activated through the synergies, its config-uration is described by a vector z ∈ℜnz of input parameters,with nz ≤ nq.

Due to the compliant actuation model, when the systemis subject to a load, the input synergies are kinematicallyrelated to the reference joint variables qr, rather than theactual ones q, that include the effect of structural stiffnessof hand links and joints.

The kinematic relationship between synergies and jointreference values, expressed in terms of variations with re-spect to an initial reference configuration, is given by thefollowing linear equation

∆qr = S∆z (1)

where S is the synergy matrix.The SynGrasp function SGdefinesynergies() associate to

a specific hand model, the relative synergy matrix, that

can be defined, for instance directly by the user, derivedfrom the linearization of the forward kinematic relationships,depending on hand mechanical structure, or obtained fromthe elaboration of experimental data.hand = SGdefineSynergies(hand,S)

Arguments:hand = the hand structure on which theuser is defining the synergy matrixS = the synergy matrix

The function SGactivateSynergies() activates a synergy or acombination of synergies on the hand: it allows to move thehand given as argument along a synergy or a combinationof synergies.hand = SGactivateSynergies(hand,z)

Arguments:hand = the hand on which the synergiesspecified in z must be activatedz = the synergy activation vector

B. Grasp Definition

A set of functions has been defined to specify the contacttype [5] and Grasp and Jacobian matrices.

Object configuration with respect to an inertial frame {N}fixed in the workspace, is described by a frame {B} fixedto the object. Let u ∈ℜ6 denote the vector representing theposition and orientation of {B} relative to {N}.

Let nc be the number of contact points. In order to definethe constraints and the contact forces imposed by the contactbetween the hand and the object, a suitable contact modelhas to be introduced [5]. For each contact point i, the contactmodel selects the contact force λi ∈ℜli components, whereli value depends on the type of contact (e.g li=3 for hardfinger model [5]).

SynGrasp allows the definition of the contact points withrespect to the hand. Contact points can be defined on thefingertips and/or in any other point of the finger. The functionSGaddcontact() define a contact point on a specific point ofa specific link of the hand.new_hand = SGaddcontact(hand,type,cwhere,link,alpha)

Arguments:hand = hand structuretype = type of contact

0 - single point without friction1 - hard finger2 - soft finger

cwhere = finger indexlink = link indexalpha = distance from the link ref origin

The function SGcontact() defines a structure for the graspedobject containing the object center, contact points and contactnormal unitary vectors. These values can be manually definedby the user, imported from other elaborations (e.g. as a resultof a grasp planning algorithm or from experimental data),or automatically defined by SynGrasp. The utility functionSGadd ftip contact() adds contact points on the fingertips.

Within SynGrasp the evaluation of the selection matrixH, that extract from the contact point twists the componentsconstrained by the specified contact model, is performed bythe function SGselectionmatrix()

Page 4: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

H = SGselectionmatrix(grasp)Arguments:grasp = the hand structure whose Selectionmatrix you want to calculate

The SynGrasp function SGgraspmatrix() allows to eval-uate, for a given grasp, the value of Grasp matrix G

G = SGgraspmatrix(grasp)Arguments:grasp = the hand structure whose Graspmatrix you want to calculate.

The hand Jacobian matrix can be evaluated by means ofthe function SGjacobianmatrix().

J = SGjacobianmatrix(grasp).Arguments:grasp= the hand structure whose Jacobianmatrix you want to calculate.

More details on the evaluation of grasp matrix and handJacobian matrix can be found in [22] and in [5].

According to a compliant contact model [23] and fromthe definition of grasp matrix and hand Jacobian matrix, avariation of contact force with respect to a reference initialcondition can be expressed as

∆λ = Kc(J∆q−GT∆u) (2)

where Kc ∈ ℜnl×nl is the contact compliance matrix, sym-metric and positive definite.

Furthermore, within SynGrasp, also the structural stiffnessof the links and the controllable servo compliance of thejoints can be modeled [24]. The joint torque variation ∆τ ∈ℜnq is proportional to the difference between a reference ∆qrand the actual ∆q variations of the joint displacements

∆τ = Kq(∆qr−∆q) (3)

where Kq ∈ ℜnq×nq is the joint stiffness matrix, symmetricand positive definite.

Finally, SynGrasp is able to assume compliant model forthe joint aggregation inputs defined by synergies (referred assoftly underactuated model in [14])

∆σ = Kz(∆zr−∆z) (4)

where Kz ∈ℜnz×nz is a symmetric and positive definite matrixthat defines the synergy stiffness.

Within SynGrasp, the contact stiffness can be defined bythe user with the function SGcontactstiffness(), the jointmatrix is defined by the function SGjointstiffness() and thesynergy stiffness matrix by SGsynergystiffness().

C. Grasp Analysis

In [12] the grasp properties with synergy actuated handswere analyzed by performing the linearization of kinematicand compliance equations in the neighbour of an initialstatic equilibrium configuration. Starting from an equilibriumconfiguration and applying a small variation to the input syn-ergy reference values ∆zr, in the hypotheses that the system

reaches a new equilibrium configuration, the following linearequations 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

(5)

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

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

∆λ = P∆zr (9)

where the transfer matrices V , Q, Y and P depend on graspcharacteristics.

SynGrasp provides a function, named SGquasistatic()that, for a given grasp and for a given variation of referencesynergy values, solves the linear system in eq. (5), andevaluates the corresponding variation of grasp configura-tion, according to eq. (6)-(9). It uses the function SGqua-sistatic maps(), that evaluates the matrices mapping theinput variation ∆zr to the outputs.

From eq. (9), a basis matrix Es for the subspace ofcontrollable internal forces, i.e. the internal forces ∆λ thatcan be produced by activating the synergy references ∆zr[12], can be defined as

Es = R (P) (10)

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 [25], [12].

SynGrasp function SGgraspanalysis() analyzes the givengrasping configuration in terms of internal forces and objectmotions.

[E] = SGgraspanalysis(grasp)Returns:E = matrix of controllable internal forcesArguments:grasp = the hand to analyse

Eq. (6) shows how the object displacements ∆u are con-trolled from one equilibrium configuration to another bysynergy small variations ∆zr.

Among all the possible object motions, rigid-body motionsare those that do not involve visco-elastic deformations in thecontact points. Rigid-body motions that can be controllableby synergies has to be compatible with contact constraint (2)and with eq. (7), which relates controlled postural synergiesand joint displacements. The synergy reference values thatmodify hand and object configuration without modifying thecontact force values belong to the P matrix nullspace, i.e.∆zrh ∈ N (P). The corresponding object displacement and

Page 5: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

−40−20

020 0

2040

6080

100

−80

−60

−40

−20

0

Fig. 3. Analysis of the 20 DoFs anthropomorphic hand, kinematicmanipulability ellipsoid.

hand configuration variation, according to eq. (6) and (7)are given by ∆uh =V ∆zrh and ∆qh = Q∆zrh, respectively.

SynGrasp function SGrb motions() evaluates, for a givengrasp configuration, the subspace of hand and object rigidbody motions.

In [19] the manipulability analysis, originally proposed in[26], [18], and widely common in robotics to analyze therobot performance in the task space, has been extended tosynergy actuated hands, including the effect of system com-pliance. Manipulability allows to investigate how a unitaryvariation in the input space is reproduced in the task space.The kinematic manipulability index, in terms of differentialmotions, is defined as

Rk =∆uTWu∆u∆zTWz∆z

, (11)

The analysis of which directions in the task space (and corre-sponding directions in the actuated joint space) maximize orminimize Rk, can be solved once a correspondence betweenthe numerator and denominator variables, namely ∆u and∆z, in (11), is established. The force manipulability index issimilarly defined in the force space.

The complete discussion on how to find a one–to–one mapbetween the numerator and denominator in robotic handsactivated by synergies is presented in [19] and detailed in[27].

Within SynGrasp, the functions SGkinmanipulability()and SGforcemanipulability() perform manipulability analy-sis evaluating the directions along which the kinematic andforce manipulability indexes are maximized and minimized.Fig. 3 shows the kinematic manipulability ellipsoids for thehuman hand model.

kinmanipulability = SGkinmanipulability(Gamma,in_col, Wu,Wz)Inputs:Gamma = solution of the homogeneous q.s. problem,obtained by the function SGquasistatic_hsolutionin_col = column interval to be considered in theevaluation

Wu = object displacement weight matrixWz = synergy weight matrixReturns: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 [19] and [27], and can be evaluated with thefunction SGquasistatic hsolution().

Gamma = SGquasistatic_hsolution(hand, object)Inputs: hand and object structures defined bySGmakehand and SGmakeobjectReturns: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 proper-ties. Within this subset, the vector of linear coefficient y canbe chosen in order to optimize some cost functions.

In [16] an efficient algorithm to find the internal force set,maximizing the distance from the friction limit boundary, hasbeen provided. In [28] the algorithm was furthermore gen-eralized for tendinous actuated hands. In [14] the algorithmwas adopted to analyze the role of synergies in the choiceof grasp forces in the human hand.

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).

y = argmin(V (y)) (12)

The SynGrasp function SGVcost() evaluates, for a givengrasp 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 loadpG =grasp matrix pseudoinverseE =controllable internal force subspacen =contact normal (matrix 3xnc)alpha =cosine of the friction anglefmin =minimum normal componentfmax =maximum contact force normk =positive marginReturns: 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,evaluates a cost function that takes into account the torqueapplied on hand joints. The value of y that minimizes

Page 6: SynGrasp: a MATLAB Toolbox for Grasp Analysis of Human and ...sirslab.dii.unisi.it/papers/2013/Malvezzi.ICRA.2013.Grasping.Fin.pdf · Abstract—SynGrasp is a MATLAB toolbox developed

this function corresponds to the set of internal forces thatminimize the hand joint effort [17].

D. Graphics

The function SGplothand() draws the hand in the config-uration specified by the user defining joint variable values q.The function SGplotsyn() draws the movement correspond-ing to the activation of one synergy. It draws on the samediagram the hand in the initial reference configuration andin the posture obtained activating one or more synergies.SGplotlink() is an utility function used by other functionsto draw the hand links. The links are drawn as cylinders, theradius can be modified by the user. SGplotobject() drawsa generic object between the contact points defined in themodeling phase. The shape of the object is in this case onlyindicative and depends on the location of contact points.

III. CONCLUSIONS

The paper presents the main features of SynGrasp, aMATLAB toolbox for the analysis of grasp with humanand robotic hands. The toolbox functions were developedto allow a simple and intuitive analysis of the main graspproperties, e.g. controllable force and motion, manipulability,grasp quality measures.

The tool is designed to integrate in the hand model akinematic coupling between joints, as those provided in thesynergistic organization of human hand or due to the me-chanical or control constraints realized on the robotic hands.The tool is quite general and its possible applications spacesfrom the analysis of human hand from a neuroscientific pointof view, to the design and optimization of robot hands.

The toolbox is developed with standard MATLAB func-tions and basically works without the need of externalpackages. However, its structure is suitable for the integrationwith other tools, e.g. optimization, data analysis, dynamicsimulations, 3D representation and animation. Some utilityfunctions allow a simple graphical representation of the hand,the object, and the main analysis results.

Further developments are currently in progress and includethe analysis of system stiffness, the integration with othergrasp quality measures available in the literature, underactua-tion and passive joint modeling, the integration with dynamicsimulation environments (e,g, Simulink), the realization of aneasy and intuitive GUI and the possibility to select a suitablegrasp through an automated grasp planner.

REFERENCES

[1] MATLAB and S. for Technical Computing, “The MathWorks Inc.,USA,” [Online]: http://www.mathworks.com/.

[2] F. Chinello, S. Scheggi, F. Morbidi, and D. Prattichizzo, “Kuka controltoolbox,” Robotics & Automation Magazine, IEEE, vol. 18, no. 4, pp.69–79, 2011.

[3] P. Corke, “A Robotics Toolbox for MATLAB,” IEEE Rob. Autom.Mag., vol. 3, no. 1, pp. 24–32, 1996.

[4] G. Mariottini and D. Prattichizzo, “EGT for Multiple View Geometryand Visual Servoing: Robotics and Vision with Pinhole and PanoramicCameras,” IEEE Robot. Autom. Mag., vol. 12, no. 4, pp. 26–39, 2005.

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

[6] J. Napier, “The prehensile movements of the human hand,” Journalof bone and joint surgery, vol. 38, no. 4, pp. 902–913, 1956.

[7] A. Wing, P. Haggard, and J. Flanagan, Hand and brain: the neuro-physiology and psychology of hand movements. Academic Pr, 1996.

[8] A. Miller and P. Allen, “Graspit! a versatile simulator for roboticgrasping,” Robotics & Automation Magazine, IEEE, vol. 11, no. 4,pp. 110–122, 2004.

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

[10] “The - the hand embodied,” [On-line]: www.thehandembodied.eu.[11] M. Santello, M. Flanders, and J. F. Soechting, “Postural hand synergies

for tool use,” The Journal of Neuroscience, vol. 18, no. 23, pp. 10 105–10 115, December 1998.

[12] D. Prattichizzo, M. Malvezzi, and A. Bicchi, “On motion and forcecontrollability of grasping hands with postural synergies,” in Proceed-ings of Robotics: Science and Systems, Zaragoza, Spain, June 2010.

[13] “The grasp robotic toolbox,” [On-line]: http://rtss.hg.sourceforge.net/hgweb/rtss/matlab/ http://rtss.hg.sourceforge.net/hgweb/rtss/scilabthe/.

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

[15] G. Stillfried and P. van der Smagt, “Movement model of a humanhand based on magnetic resonance imaging (mri),” in InternationalConference on Applied Bionics and Biomechanics (ICABB), Venice,Italy, October 2010.

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

[17] G. Baud-Bovy, D. Prattichizzo, and N. Brogi, “Does torque minimiza-tion yield a stable human grasp?” in Multi-Point Physical Interactionwith Real and Virtual Objects, ser. STAR, Springer Tracts in Ad-vanced Robotics, F. Barbagli, D. Prattichizzo, and K. Salisbury, Eds.Springer, 2005.

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

[19] D. Prattichizzo, M. Malvezzi, M. Gabiccini, and A. Bicchi, “Onthe manipulability ellipsoids of underactuated robotic hands withcompliance,” Robotics and Autonomous Systems, Elsevier, 2012.

[20] J. Butterfass, M. Grebenstein, H. Liu, and G. Hirzinger, “DLR-hand II:next generation of a dextrous robot hand,” in Robotics and Automation,2001. Proceedings 2001 ICRA. IEEE International Conference on,vol. 1, 2001, pp. 109–114.

[21] 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.

[22] R. Murray, Z. Li, and S. Sastry, A mathematical introduction to RoboticManipulation, C. Press, Ed., 1994.

[23] 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, no. 9, pp. 835–847, sep 2000.

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

[25] A. Bicchi, “Hands for dextrous manipulation and robust grasping:a difficult road towards simplicity,” IEEE Trans. on Robotics andAutomation, vol. 16, no. 6, pp. 652–662, December 2000.

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

[27] M. Gabiccini, E. Farnioli, and A. Bicchi, “Grasp and manipulationanalysis for synergistic underactuated hands under general loadingconditions,” in Proc. IEEE Int. Conf. on Robotics and Automation,St Paul, Minnesota, USA, 2012.

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