Anda di halaman 1dari 99

2

SynGrasp: A Matlab Toolbox


for Underactuated and Compliant Hands
Version 2.2

User Guide

Monica Malvezzi, Gionata Salvietti,


Guido Gioioso, and Domenico Prattichizzo

September 24, 2015


Contents

1 Introduction 6
1.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.2 Related works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Contacts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.4 How to get the software . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Installation, Matlab version issues . . . . . . . . . . . . . . . . . . . 7
1.6 License and copyright . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.7 Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.8 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Overview of the toolbox 10


2.1 Toolbox organization . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.1 Hand modeling . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.1.2 Grasp planning . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.1.3 Grasp analysis and optimization . . . . . . . . . . . . . . . . 11
2.1.4 Graphics and GUI . . . . . . . . . . . . . . . . . . . . . . . 11
2.2 How to use SynGrasp . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.3 Hand Modelling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.1 Hand structure . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.3.2 Hand joint coupling . . . . . . . . . . . . . . . . . . . . . . 14
2.4 Grasp Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.5 Grasp analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18

3 Tutorial and examples 23


3.1 A first example with the paradigmatic hand . . . . . . . . . . . . . . 23
3.1.1 How to define a hand . . . . . . . . . . . . . . . . . . . . . . 23
3.1.2 How to load a hand model . . . . . . . . . . . . . . . . . . . 25
3.1.3 How to define a grasp . . . . . . . . . . . . . . . . . . . . . 26
3.1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
3.2 Analysis of a tripod grasp . . . . . . . . . . . . . . . . . . . . . . . . 28
3.2.1 Grasp definition . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.2.2 Quasi–static analysis of the grasping . . . . . . . . . . . . . . 30
3.2.3 Rigid body motions . . . . . . . . . . . . . . . . . . . . . . . 31
3.2.4 Grasp force optimization . . . . . . . . . . . . . . . . . . . . 31

1
CONTENTS 2

3.2.5 Manipulability analysis . . . . . . . . . . . . . . . . . . . . . 32


3.3 Hand writing modeling and evaluation . . . . . . . . . . . . . . . . . 32
3.4 Mapping human hand synergies onto robotic hands . . . . . . . . . . 34
3.5 Modeling and analysis of underactuated hands . . . . . . . . . . . . . 38
3.6 Grasp planner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4 Useful readings 44
4.1 On Motion and Force Control of Grasping Hands with Postural Synergies 44
4.2 On the Role of Hand Synergies in the Optimal Choice of Grasping Forces 44
4.3 On Motion and Force Controllability of Precision Grasps with Hands
Actuated by Soft Synergies . . . . . . . . . . . . . . . . . . . . . . . 45
4.4 On the manipulability ellipsoids of underactuated robotic hands with
compliance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.5 Internal force control with no object motion in compliant robotic grasps 46
4.6 Mapping synergies from human to robotic hands with dissimilar kine-
matics: an object based approach . . . . . . . . . . . . . . . . . . . . 46
4.7 Object motion-decoupled internal force control for a compliant multi-
fingered hand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.8 On the Use of Homogeneous Transformations to Map Human Hand
Movements onto Robotic Hands . . . . . . . . . . . . . . . . . . . . 47
4.9 Evaluation of grasp stiffness in underactuated compliant hands . . . . 48
4.10 An object-based mapping algorithm to control wearable robotic extra-
fingers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.11 Digital Handwriting with a Finger or a Stylus: a Biomechanical Com-
parison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
4.12 Modeling Compliant Grasps Exploiting Environmental Constraints . . 49

5 List of Functions 50
5.1 Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
5.1.1 SGcheckFriction() . . . . . . . . . . . . . . . . . . . . . . . 50
5.1.2 SGforceManipulability() . . . . . . . . . . . . . . . . . . . . 51
5.1.3 SGgraspAnalysis() . . . . . . . . . . . . . . . . . . . . . . . 51
5.1.4 SGgraspStiffness() . . . . . . . . . . . . . . . . . . . . . . . 52
5.1.5 SGkinManipulability() . . . . . . . . . . . . . . . . . . . . . 52
5.1.6 SGquasistatic() . . . . . . . . . . . . . . . . . . . . . . . . . 53
5.1.7 SGquasistaticHsolution() . . . . . . . . . . . . . . . . . . . . 53
5.1.8 SGquasistaticMaps() . . . . . . . . . . . . . . . . . . . . . . 54
5.1.9 SGrbMotions() . . . . . . . . . . . . . . . . . . . . . . . . . 54
5.1.10 SGslide() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.1.11 SGVcost() . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
5.2 Graphics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2.1 SGhandFrames() . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2.2 SGplotBase() . . . . . . . . . . . . . . . . . . . . . . . . . . 57
5.2.3 SGplotContactForces() . . . . . . . . . . . . . . . . . . . . . 57
5.2.4 SGplotContactPoints() . . . . . . . . . . . . . . . . . . . . . 58
5.2.5 SGplotframe() . . . . . . . . . . . . . . . . . . . . . . . . . 58
CONTENTS 3

5.2.6 SGplotGripper() . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2.7 SGplotHand() . . . . . . . . . . . . . . . . . . . . . . . . . . 58
5.2.8 SGplotjoint() . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2.9 SGplotLink() . . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2.10 SGplotObject() . . . . . . . . . . . . . . . . . . . . . . . . . 59
5.2.11 SGplotPalm() . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.2.12 SGplotPalmGripper() . . . . . . . . . . . . . . . . . . . . . . 60
5.2.13 SGplotSyn() . . . . . . . . . . . . . . . . . . . . . . . . . . 60
5.3 Grasp definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.3.1 SGaddContact() . . . . . . . . . . . . . . . . . . . . . . . . . 61
5.3.2 SGaddFtipContact() . . . . . . . . . . . . . . . . . . . . . . 61
5.3.3 SGcontact() . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
5.3.4 SGgraspMatrix() . . . . . . . . . . . . . . . . . . . . . . . . 62
5.3.5 SGjaacobianMatrix() . . . . . . . . . . . . . . . . . . . . . . 62
5.3.6 SGremoveContact() . . . . . . . . . . . . . . . . . . . . . . 63
5.3.7 SGselectionMatrix() . . . . . . . . . . . . . . . . . . . . . . 63
5.4 Grasp quality metrics . . . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.1 SGdistSingularConfiguration() . . . . . . . . . . . . . . . . . 64
5.4.2 SGferrariCanny() . . . . . . . . . . . . . . . . . . . . . . . . 64
5.4.3 SGgraspIsotropyIndex() . . . . . . . . . . . . . . . . . . . . 65
5.4.4 SGmanipEllisoidVolume() . . . . . . . . . . . . . . . . . . . 65
5.4.5 SGminSVG() . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.4.6 SGunifTransf . . . . . . . . . . . . . . . . . . . . . . . . . . 66
5.5 Grasp planner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.5.1 SGcloseHand () . . . . . . . . . . . . . . . . . . . . . . . . . 67
5.5.2 SGevaluateOffset () . . . . . . . . . . . . . . . . . . . . . . . 67
5.5.3 SGgraspPlanner . . . . . . . . . . . . . . . . . . . . . . . . 67
5.6 Modeling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6.1 SGactivateSynergies() . . . . . . . . . . . . . . . . . . . . . 69
5.6.2 SGblockJoints() . . . . . . . . . . . . . . . . . . . . . . . . 69
5.6.3 SGcontactStiffness() . . . . . . . . . . . . . . . . . . . . . . 70
5.6.4 SGdefineSynergies() . . . . . . . . . . . . . . . . . . . . . . 70
5.6.5 SGfingertips() . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5.6.6 SGjointStiffness() . . . . . . . . . . . . . . . . . . . . . . . 71
5.6.7 SGmakeFinger() . . . . . . . . . . . . . . . . . . . . . . . . 72
5.6.8 SGmakeHand() . . . . . . . . . . . . . . . . . . . . . . . . . 72
5.6.9 SGmakeObject() . . . . . . . . . . . . . . . . . . . . . . . . 72
5.6.10 SGmoveHand() . . . . . . . . . . . . . . . . . . . . . . . . . 73
5.6.11 SGsynergyStiffness() . . . . . . . . . . . . . . . . . . . . . . 73
5.6.12 SGunblockjoints() . . . . . . . . . . . . . . . . . . . . . . . 74
5.6.13 SGwristStiffness() . . . . . . . . . . . . . . . . . . . . . . . 74
5.7 Sample hands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.7.1 SG3Fingered() . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.7.2 SGDLRHandII() . . . . . . . . . . . . . . . . . . . . . . . . 76
5.7.3 SGhuman24() . . . . . . . . . . . . . . . . . . . . . . . . . . 77
5.7.4 SGmodularHand() . . . . . . . . . . . . . . . . . . . . . . . 77
CONTENTS 4

5.7.5 SGparadigmatic() . . . . . . . . . . . . . . . . . . . . . . . . 77
5.7.6 SGunderActuated1() . . . . . . . . . . . . . . . . . . . . . . 78
5.8 Utils . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.8.1 SGCFtau() . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
5.8.2 SGcheckAngle() . . . . . . . . . . . . . . . . . . . . . . . . 79
5.8.3 SGcontactDetection() . . . . . . . . . . . . . . . . . . . . . . 80
5.8.4 SGcube() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
5.8.5 SGcylinder() . . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.8.6 SGDHMatrix() . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.8.7 SGdrawCube() . . . . . . . . . . . . . . . . . . . . . . . . . 81
5.8.8 SGdrawCylinder() . . . . . . . . . . . . . . . . . . . . . . . 82
5.8.9 SGdrawPen() . . . . . . . . . . . . . . . . . . . . . . . . . . 82
5.8.10 SGdrawSphere() . . . . . . . . . . . . . . . . . . . . . . . . 82
5.8.11 SGfaceDetector() . . . . . . . . . . . . . . . . . . . . . . . . 82
5.8.12 SGgenerateCloud() . . . . . . . . . . . . . . . . . . . . . . . 83
5.8.13 SGgTildeMatrix() . . . . . . . . . . . . . . . . . . . . . . . . 83
5.8.14 SGhMatrix() . . . . . . . . . . . . . . . . . . . . . . . . . . 83
5.8.15 SGindexReduction() . . . . . . . . . . . . . . . . . . . . . . 83
5.8.16 SGintSegCube() . . . . . . . . . . . . . . . . . . . . . . . . 83
5.8.17 SGintSegCyl() . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.8.18 SGintSegSph() . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.8.19 SGisFinger() . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.8.20 SGisHand() . . . . . . . . . . . . . . . . . . . . . . . . . . . 84
5.8.21 SGisMatrix() . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.8.22 SGisObject() . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.8.23 SGisSeg() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.8.24 SGisVector() . . . . . . . . . . . . . . . . . . . . . . . . . . 85
5.8.25 SGjoints() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.8.26 SGlinkIntersection() . . . . . . . . . . . . . . . . . . . . . . 86
5.8.27 SGplotCube() . . . . . . . . . . . . . . . . . . . . . . . . . . 86
5.8.28 SGplotCylinder() . . . . . . . . . . . . . . . . . . . . . . . . 86
5.8.29 SGplotSeg() . . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.8.30 SGplotSolid() . . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.8.31 SGplotSphere() . . . . . . . . . . . . . . . . . . . . . . . . . 87
5.8.32 SGpointInCube() . . . . . . . . . . . . . . . . . . . . . . . . 87
5.8.33 SGpointInCylinder() . . . . . . . . . . . . . . . . . . . . . . 88
5.8.34 SGpointInSphere() . . . . . . . . . . . . . . . . . . . . . . . 88
5.8.35 SGrotx() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88
5.8.36 SGroty() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.8.37 SGrotz() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
5.8.38 SGsantelloSynergies() . . . . . . . . . . . . . . . . . . . . . 89
5.8.39 SGsegment() . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.8.40 SGskew() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.8.41 SGsphere() . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
5.8.42 SGtransl() . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
CONTENTS 5

6 Conclusion 93
Chapter 1

Introduction

1.1 Summary
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 kine-
matic 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.

1.2 Related works


The availability of tools for the analysis of hand grasping is useful to several research
topics, ranging from ranging from anatomy [1] and neuroscience [2] to robotics [3].
The control of the forces exerted at the contact points, planning of contact point po-
sitioning and fine manipulation techniques have been largely studied in the last three
decades particularly concerning robotic hands.
Together with mathematical foundations of grasp theory [4] and many attempts to
realize reliable robotic hands [5], simulation tools have been developed for the demon-
stration of algorithms and techniques especially in grasp planning.
Syngrasp is mainly focused on grasp analysis. For a given hand and a given grasp,
the software includes functions allowing the evaluation of the subspace of feasible
contact forces, object motions. Furthermore, we included grasp properties evaluation,
as for instance grasp quality measures, grasp stiffness, manipulability indexes and cost
functions [6].
Differently from other simulators, SynGrasp has been developed entirely in MAT-
LAB, and offers an easy and intuitive script programming as well as a functional GUI.
MATLAB is a programming environment for algorithm development, data analysis,

6
CHAPTER 1. INTRODUCTION 7

visualization, and numerical computation [7]. Specific toolboxes (i.e., collections of


dedicated MATLAB functions) have been developed in the past years as support for
research and teaching in almost every branch of engineering, such as telecommunica-
tions, electronics, aerospace, mechanics and control. As far as robotics is concerned,
several toolboxes have been presented for the modelling and control of robot systems
[8, 9, 10].
The main advantage of this programming environment is that it can be easily inte-
grated with specific tools and built-in math functions enabling the exploration of multi-
ple approaches and the integration with other analysis tools, e.g. statistical elaboration
of experimental data, optimization, dynamic models and simulations etc..
The SynGrasp toolbox has been developed in the context of the EU Project “THE
- The Hand Embodied” that aims to study how the 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 [11]. For this
reason, the toolbox provides several functions for human and robot grasping evaluation
including specific functions for human hand synergies evaluation [12, 13].
Other toolboxes were developed within the THE Consortium to cover different is-
sues related to hand modeling and analysis. In particular, The Robotic Grasp Toolbox
[14] and SynGrasp shares some function and some utilities, since they both were de-
signed to deal with grasping evaluation of human hands and underactuated robotic hand
models.

1.3 Contacts
The Toolbox home page is at
http://SynGrasp.dii.unisi.it
This page will always list the current released version number as well as bug fixes and
new code in between major releases.
Users’ comments and questions are welcome and can be sent at the following email
address: SynGrasp@dii.unisi.it. Users’ contributions are welcome as well.

1.4 How to get the software


The SynGrasp Toolbox is freely available from the Toolbox home page at
http://SynGrasp.dii.unisi.it
The files are available in zip format (.zip).
The file SGguide.pdf is a comprehensive manual with a tutorial introduction and
details of each Toolbox function.

1.5 Installation, Matlab version issues


The Toolbox works with MATLAB version 6 and greater and has been tested on a PC
with version 6.
CHAPTER 1. INTRODUCTION 8

1.6 License and copyright


The repository can be explored and its data can be used under the conditions of the:
Creative Commons Attribution Non Commercial 3.0 Unported License.
Copyright (c) 2013, M. Malvezzi, G. Gioioso, G. Salvietti, D. Prattichizzo. All
rights reserved.
Redistribution and use with or without modification, are permitted provided that
the following conditions are met:
• Redistributions of source code must retain the above copyright notice, this list of
conditions and the following disclaimer.
• Redistributions in binary form must reproduce the above copyright notice, this
list of conditions and the following disclaimer in the documentation and/or other
materials provided with the distribution.
• Neither the name of the University of Siena nor the names of its contributors
may be used to endorse or promote products derived from this software without
specific prior written permission.
This software is provided by M. Malvezzi, G. Gioioso, G. Salvietti, D. Prat-
tichizzo, “as is” and any express or implied warranties, including, but not limited
to, the implied warranties of merchantability and fitness for a particular purpose
are disclaimed. In no event shall M. Malvezzi, G. Gioioso, G. Salvietti, D. Prat-
tichizzo be liable for any direct, indirect, incidental, special, exemplary, or conse-
quential damages (including, but not limited to, procurement of substitute goods
or services, loss of use, data or profits; or business interruption) however caused
and on any theory of liability, whether in contract, strict liability, or tort (includ-
ing negligence or otherwise) arising in any way out of the use of this software, even
if advised of the possibility of such damage.

1.7 Support
The authors are thankful to all the people providing genuine bugs or deficiencies in the
Toolbox, or who have suggestions about ways to improve its functionality. Users can
contact us writing at the following email address
syngrasp diism.unisi.it
If you plan to duplicate this document for class use then every copy must include the
front page. If you want to cite the Toolbox please use
@article{MaGiSaPr-RAM15,
Author = {Malvezzi, M. and Gioioso, G. and Salvietti, G. and Prattichizzo, D.}
Title = {SynGrasp: A Matlab Toolbox for Underactuated and Compliant Hands},
Journal = {Robotics Automation Magazine, IEEE},
Volume = {in press},
Number = {0},
Year = {2015}
}
CHAPTER 1. INTRODUCTION 9

and
@inproceedings{malvezzi2013ICRA-syngrasp,
title={SynGrasp: a MATLAB Toolbox for Grasp Analysis
of Human and Robotic Hands},
author={Malvezzi, M. and Gioioso, G. and
Salvietti, G. and Prattichizzo, D. and Bicchi, A.},
booktitle=ICRA,
year={2013},
address= {Karlsruhe, Germany}
}

1.8 Acknowledgments
The research leading to this toolbox has received funding from
• the European Commission Collaborative Project 248587 and The Hand Embod-
ied, within the FP7-ICT-2009-4-2-1 Program Cognitive Systems and Robotics;
• the Collaborative EU- Project Hands.dvi in the context of ECHORD (European
Clearing House for Open Robotics Development)
• the European Union Seventh Framework Programme FP7/2007- 2013 under grant
agreement 601165 of the project WEARHAP;
• the Italian Ministry of Education, Universities and Research, Futuro in Ricerca
2012 Programme, with the MODELACT project (Code RBFR12C608).

The authors would like to thank all the researchers and students that with their work
contribute to this toolbox.
Chapter 2

Overview of the toolbox

2.1 Toolbox organization


SynGrasp is based on the grasping model presented in [13], [15].

2.1.1 Hand modeling


A set of hand models is provided in the toolbox (Fig. 2.1):
• SGparadigmatic is a 20 DoF model of the human hand;

• SGhuman24DoF is a 24 DoF model of the human hand;


• SGunderActuated1 is a two-finger, 4 DoF planar gripper;
• SG3Fingered is a three-finger, 8 DoF robotic hand, inspired by the structure of
the Barret Hand.

• SGmodularHand is a three-finger, 9 DoF modular robotic hand;


• SGDLRHandII is the model of the DLR Hand II [16].
New hand models can be easily defined in addiction to the models already included
in the toolbox.
Denavitt-Hartenberg parameters have been chosen as default notation to define
hand models. A matrix describing the joint coupling defined by the kinematic structure
of the hand linkages and/or the synergistic organization of hand joints can be associated
to each hand. This matrix describes the joint coordinated motion as for the sensorimo-
tor synergies defined for the human hand [15]. Within the toolbox, the matrix can be
manually set or dynamically calculated and can be used for the actuation either of rigid
or soft synergies, according to the definition given in [15].

10
CHAPTER 2. OVERVIEW OF THE TOOLBOX 11

Figure 2.1: The hand models included in the toolbox.

2.1.2 Grasp planning


The grasping hand configuration, contact points, Grasp and Jacobian matrices can be
evaluated in order to analyse grasping performances. Controllable internal force sub-
space, rigid-body object motions, manipulability ellipsoids can be evaluated.

2.1.3 Grasp analysis and optimization


. Different grasp quality measures are available in the toolbox together with tools for
the evaluation of the optimal values of grasping forces. In particular, for a given grasp
configuration, the set of contact forces that allows minimizing suitable cost functions
can be computed [17, 18] . The toolbox allows to perform kinematic and force manip-
ulability analysis, taking into account the joint coupling induced by the underactuation
and hand compliance [19, 6].

2.1.4 Graphics and GUI


. A set of functions allows the user to have a simple graphical representation of the
manipulator. These functions can be used together with built-in MATLAB functions
CHAPTER 2. OVERVIEW OF THE TOOLBOX 12

Figure 2.2: The SynGrasp GUI.

in order to plot the hand in contact with objects of arbitrary shapes. Moreover, motion
due to synergies activation can be visualized.

2.2 How to use SynGrasp

There are two possible ways to use SynGrasp: scripting mode and Graphical User
Interface (GUI).
The former let the user write Matlab scripts including SynGrasp functions. This
solution is preferred if a customization is needed. The user can add his/her own func-
tions and/or can modify those already existing. A list of the main functions provided
with the toolbox is reported in Table 5.1 and will be detailed in the next chapter.
A set of functions can be used in scripting mode to let the user have a simple graph-
ical representation of the manipulator and the object. The function SGplotHand()
draws the hand in the configuration specified by the user defining joint variable values.
The function SGhandFrames plot a scheme of the hand highlighting joints and local
frames, in this representation the hand links are represented as simple segments.
It is also possible to draw some simple object to be grasped: a sphere, a cylinder and
a cube that can be drawn using SGplotCylinder(), SGplotSphere() and SGplotCube()
respectively. It is possible to use SGplotContactForces() and SGplotContactPoints()
to plot contact forces and contact points location, respectively.
SGplotobject() plots a generic convex object between user defined contact points
as will be better explained in Section 2.4.
The GUI allows the user to load a hand structure and interactively perform hand
and grasp analysis.
Referring to Fig. 2.2, the GUI window is separated in six zones. The main plot is
CHAPTER 2. OVERVIEW OF THE TOOLBOX 13

placed on the center of the GUI window. On the left hand side there are two zones that
take care of placing on the main plot a hand model and an object model, respectively.
It is possible to load either one of the available hand models or a hand model defined
by the user.
Position and orientation of the hand models can be set and modified by the user.
Concerning the object, at the moment it is possible to load simple objects such as a
sphere, a cube or a cylinder. It is possible to set and modify position, orientation and
size of the object. On the bottom zone, there is a set of sliders that can be used to mod-
ify the hand model configuration. The sliders can control either each joint separately
or can coordinately move the joints along a synergy direction. Synergies are already
defined for the human hand model as will be better explained in 2.3. For robotic hands,
synergies can be defined directly by the user, derived from the linearization of the for-
ward kinematic relationships, obtained from the processing of experimental data or
mapped from the human hand as reported in Chapter 3.
The sliders can be used to bring the hand in contact with the object. A contact-
detection algorithm allows to detect contact points on the hand model in order to per-
form grasp analysis. To automatically close the hand around the object, the button
placed in the top-right part of the GUI can be used to perform a “close all” movement
of the hand wrapping it around the object. On the bottom-right there is the area related
to grasp analysis. Once the fingers are in contact with the object, either using the button
“grasp” or moving the hand using the sliders, it is possible to analyse the quality of the
obtained grasp. The desired quality index can be chosen form the drop-down menu.
All the functions described in the following can be used in scripting mode. Most of
them are also embedded on the GUI.

2.3 Hand Modelling


2.3.1 Hand structure
The hand structure is defined in terms of fingers, links and joints. A cell named base,
containing as many elements as the number of fingers, collects in each cell element
a 4 × 4 matrix representing the homogeneous transformation matrix between the wrist
reference frame and a reference frame defined at the beginning of each finger kinematic
chain.
Denavitt-Hartenberg (DH) parameters [20] have been chosen as default notation.
A table containing the DH parameters of each finger has to be provided to describe a
hand.
A cell named DHpars, which has as many elements as the number of fingers,
collects in each element a matrix with four columns and as many rows as the number
of joints of each finger. Each row represents the DH parameters allowing to define the
joint with respect to the preceding one or with respect to the base reference frame.
For each hand finger, a structure is created with the function SGmakefinger, taking
as input the 4×4 homogeneous matrix base, the dhpar matrix containing the Denavitt
Hartenberg parameter table, and the vector q of joint variables. dhpar and q have as
many rows as the number of joints of the finger.
CHAPTER 2. OVERVIEW OF THE TOOLBOX 14

F = SGmakefinger(dhpar, base, q).


Arguments:
dhpar= n (number of joints) x 4 matrix
containing DH parameters for each joint;
base = 4 x 4 homogeneous transformation
matrix for the finger frame;
q = n x 1 vector containing values of
joint variables.

The function SGmakeHand() then defines a hand structure, whose arguments are
defined by the function SGmakeFinger().
hand = SGmakeHand(F)
Arguments:
F = array of finger structures defined
by SGmakeFinger.

Hand configuration is defined by the joint variables q = [q1 · · · qnq ]T ∈ ℜnq . The
user can modify the hand configuration through the function SGmoveHand().
new_hand = SGmoveHand(hand,q)
Arguments:
hand = hand structure;
q = joint values.

2.3.2 Hand joint coupling


One of the main features of the toolbox is that it can be used to investigate the proper-
ties of hands in which the joint displacements are coupled, mechanically or by means
of a suitable control algorithm. In the case of human hand synergies, this coupling has
been described as a synergy matrix associated to hand model [13]. For the 20 DoF
model of the human hand available in the toolbox, the synergy matrix refers to the data
collected by Santello et. al in [12] and it is provided through the function SGsantel-
loSynergies. The function SGdefineSynergies() associates to a specific hand model
the relative coupling matrix.
hand = SGdefineSynergies(hand,S)
Arguments:
hand = the hand structure on which the
user is defining the synergy matrix
S = the synergy matrix

The function SGactivateSynergies() activates a synergy or a combination of synergies


on the hand.
hand = SGactivateSynergies(hand,z)
Arguments:
hand = the hand on which the synergies
specified in z must be activated
z = the synergy activation vector
CHAPTER 2. OVERVIEW OF THE TOOLBOX 15

The function SGplotSyn() draws the movement corresponding to the activation of one
synergy. It draws on the same plot the hand in the initial reference configuration and in
the configuration 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)

2.4 Grasp Definition

The definition of an object and the contact point locations are fundamental for
grasp analysis. Object configuration is described by a frame {B} fixed to the object
with respect to 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. In order to define the constraints and the contact forces
imposed by the contact between the hand and the object, a suitable contact model has
to be introduced [3]. For each contact point i, the contact model selects the contact
force λi ∈ ℜli components, where li value depends on the type of contact (e.g., li =3 for
hard finger model [3]).
Together with the contact type, to define a grasp it is needed:
• the location and orientation of the object frame {B} with respect to the wrist
frame {N};
• the contact points on the hand ch ;

• the contact points on the object co ;


• 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 points anywhere on the hand with the function
SGaddContact(), while can use SGaddFtipContact() if the contact point has 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
CHAPTER 2. OVERVIEW OF THE TOOLBOX 16

Given the contact points on the hand, it is possible to create a structure representing the
grasped object through the function SGmakeObject(). The structure for the grasped
object contains the object center, contact points and contact normal versors. These
values can be either automatically computed by the software on the basis of the contact
point locations or manually defined by the user. The function SGplotObject() can be
used to plot a convex object defined by the given contact points. The user can choose
the fillet radius and the number of elements for object representation.
Although grasp synthesis is not the main focus of the toolbox, the second manner
to define a grasp in SynGrasp is using the provided grasp planner. The grasp planner
function SGgraspPlanner() takes as input the hand model, the object to be grasped,
the number of pre-grasp positions and the metric to 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 of the index used for the
evaluation. Additionally, it is possible to access to the whole list of grasps evaluated
and to their respective obtained index. In the following it is described the grasp planner
working principle. The user can decide a number of possible pregrasp positions. To
obtain the pregrasp positions, the hand is initially moved using SGtransl() to the center
of the object with a random orientation of the palm. Then, the hand is moved along the
outgoing direction perpendicular to the palm of an offset computed through SGevalu-
ateOffset() that depends on the object dimension and on the hand finger lengths. The
user can eventually set a different distance from the object if needed. From the pregrasp
position the hand is closed using SGcloseHand(). It is possible to set which joints are
involved in the grasping action and the size of the step used to close the finger around
the object. The function SGcontactDetection() evaluates if the a link of the hand is
contact with the object and eventually stops the relative finger. Once all the fingers are
in contact with the object or have reached the joint limits, the grasp quality is evaluated.
All the computed index are sorted according to the quality index and the best grasp is
returned. In Fig. 2.3 an example of outcome of the grasp planner is reported.
Remark 1 In SynGrasp there are two possibilities to define a grasp. It is possible to
consider an object and close the hand on it to define the contact points or to consider
contact points on the hand and define an object through them. This last solution can
be useful if contact point positions come from real experiments on an robotic or human
hand or if an external grasp planner is used.
Once the grasp is defined, it is possible to compute all the matrices relevant to grasp
analysis. The evaluation of the selection matrix H, that extracts from the contact point
CHAPTER 2. OVERVIEW OF THE TOOLBOX 17

50

20

0
0

−20
z

−50

z
−40

−100
−60

−80
−150

120
150 100

100 80
60 80
50 60
40
40
20 20
0
120 0 0
100
−50 80 y −20
60 x
y 40
20
x

Figure 2.3: Grasp planner output. In the left hand side the pregrasp position and on the
right the obtained grasp.

twists the components constrained by the specified contact model, 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 hand Jacobian matrix
can be evaluated by means of the function SGjacobianMatrix(). More details on the
evaluation of grasp matrix and hand Jacobian matrix can be found in [3] and in [4].
A fundamental role in the definition of grasp properties is played by system com-
pliance, in particular if the hand is underactuated or has a limited number of DoFs. In
SynGrasp we considered a lumped parameter model in which the compliant elements
can be located at the contact points, at the joints and at the synergy actuation level
[21]. Concentrating the object and finger contact deformations at the contact points, a
variation of contact force with respect to a reference initial condition can be expressed
as
∆λ = Kc (J∆q − GT ∆u) (2.1)
where Kc ∈ ℜnl ×nl is the contact compliance matrix symmetric and positive definite, ∆q
is the joint variable variation and ∆u represents a variation on the object reference frame
position. The contact stiffness matrix can be defined in SynGrasp with the function
SGcontactStiffness().
Furthermore, within SynGrasp, also the structural stiffness of the links and the
controllable servo compliance of the joints can be modelled [22]. The joint torque
variation ∆τ ∈ ℜnq is proportional to the difference between a reference ∆qr and the
actual ∆q variations of the joint displacements

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

where Kq ∈ ℜnq ×nq is the joint stiffness matrix, symmetric and positive definite, and
can be defined in Syngrasp with the function SGjointStiffness().
CHAPTER 2. OVERVIEW OF THE TOOLBOX 18

Finally, SynGrasp is able to assume compliant model for the joint aggregation in-
puts defined by synergies (referred as softly underactuated model in [15])

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

where Kz ∈ ℜnz ×nz is a symmetric and positive definite matrix that defines the synergy
stiffness. Within SynGrasp, the synergy stiffness matrix by SGsynergyStiffness().

2.5 Grasp analysis


Grasp analysis is the most important feature of SynGrasp. The functions included are
the results of different studies on both fully and underactuated hand models, consider-
ing compliance at different levels. In this section we report the main results obtained
considering a synergy actuated human hand model. The quasi–static model adopted
to define the main properties of a grasp is obtained by performing a linear approxi-
mation of the kinematic and compliance equations in the neighbour of an initial static
equilibrium configuration. More details of this model can be found in [13], [15], and
[6]. Starting from an equilibrium configuration and applying a small variation to the
input synergy reference values ∆zr , in the hypotheses that the system reaches a new
equilibrium configuration, the following linear equations hold
 
 −G 0
0 0 0 0 0
  ∆λ 
T 0
 J 0 0 −I 0 0   ∆u   0 
 
 0 0 0 ST −I 0   ∆q   0 
 I K GT −K J 0 0 0
  ∆τ  =  . (2.4)
 c c    0 
0 0 Kq I 0 −Kq S ∆σ  
Kz ∆zr
0 0 0 0 I Kz ∆z
0

The solution of this linear system leads to the following mapping between the input
controlled variable, i.e. the synergy reference variation ∆zr , and the output variables

∆u = V ∆zr (2.5)
∆q = XSY ∆zr = Qδ zr (2.6)
∆z = Y ∆zr (2.7)
∆λ = P∆zr (2.8)

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


SynGrasp function SGquasistatic() solves the linear system in eq. (2.4) for a given
grasp and for a given variation of reference synergy values, and evaluates the corre-
sponding variation of grasp configuration, according to eq. (2.5)-(2.8). It uses the func-
tion SGquasistaticMaps(), that evaluates the matrices mapping the input variation ∆zr
to the outputs.
linMaps = SGquasistaticMaps(hand,object)
Arguments:
hand = the hand structure
object = the object structure
Returns:
CHAPTER 2. OVERVIEW OF THE TOOLBOX 19

linMaps.V = object motion


linMaps.P = contact forces
linMaps.Q = hand joint displacements
linMaps.T = joint torques
linMaps.Y = synergy actual values

From eq. (2.8), a basis matrix Es for the subspace of controllable internal forces,
i.e. the internal forces ∆λ that can be produced by activating the synergy references
∆zr [13], can be defined as
Es = R (P) (2.9)
All internal forces controllable by synergy actions can then be parametrized through a
free vector y ∈ ℜnh as ∆λ = Es y, where nh represents the dimension of the controllable
internal force subspace [4].
SynGrasp function SGgraspAnalysis() analyses the given grasping configuration
in terms of internal forces and object motions.
[E] = SGgraspAnalysis(grasp)
Returns:
E = matrix of controllable internal forces
Arguments:
grasp = the hand to analyse

Eq. (2.5) shows how the object displacements ∆u are controlled from one equilib-
rium configuration to another by synergy small variations ∆zr . Among all the possible
object motions, rigid-body motions are those that do not involve visco-elastic defor-
mations in the contact points. Rigid-body motions controllable by synergies has to be
compatible with contact constraint (2.1) and with eq. (2.6), which relates controlled
postural synergies and joint displacements. The synergy reference values that modify
hand and object configuration without modifying the contact force values belong to
the P matrix nullspace, i.e. ∆zrh ∈ N (P). The corresponding object displacement and
hand configuration variation, according to eq. (2.5) and (2.6) are given by ∆uh = V ∆zrh
and ∆qh = Q∆zrh , respectively. SynGrasp function 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 not specifically defined, the S ma-
trix is set to an identity matrix I ∈ ℜnq ×nq . This corresponds to a fully actuated hand, in
which each component of q vector can be controlled. All the grasp analysis functions
can be thus used for fully actuated hands.

The manipulability analysis, proposed in [23, 19, 24] is widely common in robotics
to analyze the robot performance in the task space. Recently, in [6] it has been extended
to synergy actuated hands, including the effect of system compliance. Manipulability
allows to investigate how a unitary variation in the input space is reproduced in the task
space. The kinematic manipulability index, in terms of differential motions, is defined
as the ratio of a measure of performance in the task space and a measure of effort in
the input (synergies in this case) space

∆uTWu ∆u
Rk = , (2.10)
∆zTWz , ∆z
CHAPTER 2. OVERVIEW OF THE TOOLBOX 20

−20

−40

−60

−80

20 0
0 20
40
−20 60
80
−40 100

Figure 2.4: Analysis of the 20 DoFs anthropomorphic hand, kinematic manipulability


ellipsoid.

where Wu is the object displacement weight matrix and Wz is the synergy weight matrix.
The analysis of which directions in the task space (and corresponding directions in the
actuated joint space) maximize or minimize Rk , can be solved once a correspondence
between the numerator and denominator variables, namely ∆u and ∆z, in (2.10), is
established. The force manipulability index is similarly defined in the force space.
The complete discussion on how to find a one–to–one map between the numerator
and denominator in robotic hands activated by synergies is presented in [6].
Within SynGrasp, the functions SGkinManipulability() and SGforceManipula-
bility() perform manipulability analysis evaluating the directions along which the kine-
matic and force manipulability indexes are maximized and minimized. Fig. 3.7 shows
the kinematic manipulability ellipsoids for the human hand model.
kinmanipulability = SGkinManipulability(Gamma,
in_col, Wu,Wz)
Inputs:
Gamma = solution of the homogeneous q.s. problem,
obtained by the function SGquasistatic_hsolution
in_col = column interval to be considered in the
evaluation
Wu = object displacement weight matrix
Wz = synergy weight matrix
CHAPTER 2. OVERVIEW OF THE TOOLBOX 21

Returns:
kinmanipulability = structure containing the
directions in the x, z and u spaces, that
maximizes/minimizes kinematic manipulability
index

The input for the function is a matrix that represents the solution of the quasi–static
linear homogeneous system discussed in [6], and can be evaluated with the function
SGquasistaticHsolution().
Gamma = SGquasistaticHsolution(hand, object)
Inputs: hand and object structures defined by
SGmakehand and SGmakeobject
Returns:
Gamma = structure containing homogeneous
solution of quasistatic problem and its
partition

In order to assure grasp stability, avoiding contact losses and slippage, the ratio
between the tangential and normal component of each contact force has to be lower
than the friction coefficient, that depends on contact surface properties. Within this
subset, the vector of linear coefficient y can be chosen in order to optimize some cost
functions. In [17] an efficient algorithm to find the internal force set, maximizing the
distance from the friction limit boundary, has been provided. In [25] the algorithm
was furthermore generalized for tendinous actuated hands. In [15] the algorithm was
adopted to analyze the role of synergies in the choice of grasp forces in the human
hand. Analytically the problem consists in the minimization of a cost function V (y)
that depends on the contact forces and on the contact properties (friction coefficient,
contact surface geometry). The SynGrasp function SGVcost() evaluates, for a given
grasp configuration and applied force, the corresponding value 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)
alpha =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 standard Matlab functions, e.g. fmin-
search(). The utility function SGcheckAngle() evaluates, for each contact point, the
angle between the contact normal unity vector ni and the contact force λi . The utility
function SGcheckFriction() evaluates, for a given grasp configuration, if the friction
constraints are satisfied or not.
The SynGrasp function SGCFtau(), in a similar way, evaluates a cost function that
takes into account the torque applied on hand joints. The value of y that minimizes this
CHAPTER 2. OVERVIEW OF THE TOOLBOX 22

function corresponds to the set of internal forces that minimize the hand joint effort
[18].
Other functions widely described in the literature, are available in SynGrasp to
define grasp quality [26]. SGminSVG() evaluates the minimum singular value of G
matrix: the smallest singular value of the G matrix is a quality measure that indicates
how far is the grasp configuration from falling into a singular configuration [3, 27]. SG-
manipEllisoidVolume() evaluates the hand manipulability ellipsoid [28]. In order to
keep redundant fingers far from singular configurations, it is desirable to maximize the
smallest singular value of grasp Jacobian matrix Ho = G+ J [29]. SGdistSingularCon-
figuration() evaluates the minimum singular value of Ho matrix. The transformation
between the velocity domain in the finger joints and the velocity domain of the object
can be qualitatively considered “uniform” when the contribution of each joint velocity
is the same in all the components of object velocity. In the literature, this uniformity
measure is evaluated as the ratio between the minimum and maximum singular value
of matrix Ho [30], the function SGunifTransf() allows computing such parameter. Fi-
nally, SGgraspIsotropyIndex() looks for an uniform contribution of the contact forces
to the total wrench exerted on the object, i.e. tries to obtain an isotropic grasp where
the magnitudes of the internal forces are similar [31].
Chapter 3

Tutorial and examples

In this section we describe in detail four of the examples available within the SynGrasp
toolbox. The first example involves the human hand model. The analysis of the human
hand during a writing task is proposed. The task performance is evaluated in terms of
kinematic manipulability index. In the second example, we report how SynGrasp can
be used to map human hand synergies onto robotic hands. In literature there are several
examples where the synergies for a robotic hand are defined considering PCA analysis
over a set of grasps obtained closing the hand on a set of objects, see for instance [32],
[33]. In [34] we proposed an object-based approach to map human hand synergies onto
robotics hands with dissimilar kinematics. Using this mapping algorithm is possible to
define the synergistic motion of a robotic hand without testing or simulating different
grasps for different objects. In the Section 3.4 the main step of the algorithm as well
as its implementation using SynGrasp are presented. The third example deals with the
modeling and analysis of underactuated robotic hands. Two cases are presented: in the
first the underactuation is realized with a pulley-tendon system, while in the second
the hand joints are mechanically coupled. In both cases the hand presents active and
passive DoFs. In the last example we show how to use the grasp planner included in
the toolbox.
The main target of the proposed examples is to show the versatility of the toolbox.
SynGrasp can be used: outside the robotic context to evaluate human hand tasks; to
replicate some capability of the human hand onto robotic hands; to model complex
robotic hand and to test them in grasping and manipulation tasks.

3.1 A first example with the paradigmatic hand


3.1.1 How to define a hand
In this section we will show the structure of the file SGparadigmatic, that defines
the structure of an anthropomorphic hand with 20 DoFs. The same steps have to be
followed for the definition of a generic hand model
1. First, assign a name to the hand and define a function, for example, for the 20

23
CHAPTER 3. TUTORIAL AND EXAMPLES 24

DoFs paradigmatic hand


function newHand = SGparadigmatic(T)

2. Pre-allocation of the variables: this is a simple step, in which we have only to


set the right dimensions of some cell arrays variables, that is the number of hand
fingers, five in this example
%%% Pre-allocation
DHpars{5} = [];
base{5} = [];
F{5} = [];

3. Then, for each finger, we have to define the table of Denavit Hartenberg pa-
rameters and the homogeneous matrix describing the position and orientation of
the frames that identify the beginning of each finger’s kinematic chain. For the
thumb of the 20 DoF paradigmatic hand we have, for example
DHpars{1}=[
-pi/2 0 0 0 ;
0 25 0 0 ;
pi/2 15 0 0 ;
0 10 0 0 ];

base{1} = [0 -1 0 -37;
1 0 0 45;
0 0 1 0
0 0 0 1];

4. Then the above specified variables are collected in an array of cells F{i} with the
function SGmakeFinger. This set of operations is the same for all the hands.
for i = 1:length(DHpars)
% number of joints for each finger
joints = size(DHpars{i},2);
% initialize joint variables
q = zeros(joints,1);
% make the finger
if (nargin == 1)
F{i} = SGmakeFinger(DHpars{i},T*base{i},q);
else
F{i} = SGmakeFinger(DHpars{i},base{i},q);
end
end

5. Finally a structure variable hand is defined, containing all the data necessary to
build the hand
newHand = SGmakeHand(F);
newHand.type = ’Paradigmatic’;
CHAPTER 3. TUTORIAL AND EXAMPLES 25

Note: Practically the user has to modify only the point 1, specifying the name of
the hand (when the hand is saved, recall that the name of the function has to be
the same of the file .m in which it is saved), 2, specifying the number of fingers in
the hand, and 3, defining the geometric parameters of the hand.

3.1.2 How to load a hand model


We can load a hand model simply recalling the function that defines it and assigning a
variable to it, for example

hand = SGparadigmatic;

This call of the hand definition function, SGparadigmatic in this case, assign to the
variable hand a structure defined as follows
F: {[1x1 struct] [1x1 struct] [1x1 struct]
[1x1 struct] [1x1 struct]}
n: 5
m: 20
q: [20x1 double]
qin: [20x1 double]
qinf: [20x1 double]
ctype: 1
ftips: [3x5 double]
S: [20x20 double]
cp: []
Kq: [20x20 double]
Kz: [20x20 double]
H: []
J: []
JS: []
Wr: [6x1 double]
Kw: [6x6 double]
limit: [20x2 double]
active: [20x1 double]
type: ’Paradigmatic’

The hand can be represented using the function SGplothand()


figure(1)
SGplotHand(hand);
axis(’equal’)

That gives the plot represented in Fig. 3.1.


Then hand joints can be moved with the function SGmoveHand(hand,qm), that
assign to the field hand.q the values in the vector qm
hand = SGmoveHand(hand,qm)

This function can be adopted to move the hand to any desired configuration, as shown,
for instance, in Fig. 3.2.
CHAPTER 3. TUTORIAL AND EXAMPLES 26

5
0
−5

160

140

120

100
20
80 10
0
−10
60 −20
−30
−40

Figure 3.1: Plot of the 20 DoFs paradigmatic hand defined in SGparadigmatic, in the
reference configuration.

10

−10

−20

−30

−40

−50

−60

−70
40
20 20
0 40
60
−20
80
−40
100
−60 120

Figure 3.2: Plot of the 20 DoFs paradigmatic hand in the new configuration updated
with the function SGmoveHand(hand,qm).

3.1.3 How to define a grasp


To define a grasp, we have to choose the contact points, as described in the previous
chapter. For instance, if we want to simulate a precision grasp with five contact points
on the tips of each finger we can use the following function
hand = SGaddFtipContact(hand,1,1:5);

In the more general case, we can use the function SGaddContact()


hand = SGaddContact(hand,type,cwhere,link,alpha)
CHAPTER 3. TUTORIAL AND EXAMPLES 27

These functions update the hand structure with a field hand.cp containing the contact
points
>> hand.cp

ans =

-36.4407 -35.0187 -8.0000 9.8970 23.2779


46.4724 95.6175 97.8886 81.3687 71.7627
-48.7886 -58.4436 -67.1074 -55.7294 -46.6625
1.0000 2.0000 3.0000 4.0000 5.0000
4.0000 4.0000 4.0000 4.0000 4.0000
1.0000 1.0000 1.0000 1.0000 1.0000
1.0000 1.0000 1.0000 1.0000 1.0000

As we can observe, hand.cp is a matrix with seven rows and a number of columns
equal to the contact points. The first three rows of the matrix contain contact point
coordinates, the fourth one contains an index corresponding to the finger where the
contact is, the fifth contains an index representing the link of each finger, where the
contact is, the sixth row specifies the contact type (1 for a hard finger contact model, 2
for a soft finger contact model).
Once the contact points are defined, a second structure object can be defined
>> [hand,object] = SGmakeObject(hand);
>> object

object =

cp: [4x5 double]


center: [3x1 double]
normals: [3x5 double]
base: [4x4 double]
Kc: [15x15 double]
H: [15x30 double]
Gtilde: [6x30 double]
G: [6x15 double]
type: ’auto’

This function update the structure hand with the computation of hand Jacobian matrix
and creates a new structure object in which the main parameters of the object for grasp
analysis are collected. A schematic representation of the object can be obtained with
the function SGplotObject, see Fig. 3.3.
SGplotObject(object);

3.1.4 Summary
The above described steps are those necessary to define a hand and a grasp and are the
base for the following studies. In the following, we will describe some examples of
analysis.
CHAPTER 3. TUTORIAL AND EXAMPLES 28

−10

−20

−30

−40

−50

−60

20 40
0 60

−20 80
100
−40

Figure 3.3: Plot of the 20 DoFs paradigmatic hand and the object

3.2 Analysis of a tripod grasp


In this example, SynGrasp functions are used to analyze an anthropomorphic hand
actuated with synergies. The synergy matrix was obtained by performing PCA (Princi-
pal Component Analysis) of a set of experimental data from [12], available from [35]
and included in SynGrasp toolbox in the function SGsantelloSynergies that assign the
values to the synergy matrix S and to the mean configuration of the hand qm ;
[qm, S] = SGsantelloSynergies;

The mean configuration of the experimentally measured hand configuration was as-
sumed as initial hand configuration qm .
hand = SGmoveHand(hand,qm)

The synergy matrix is assigned to the hand structure with the function SGdefineSyn-
ergies, in which we can also choose which synergies are considered. For example, if
we want to activate the first four synergies we can use the following function
hand = SGdefineSynergies(hand,S(:,1:4),qm);

To define a tripod grasp, let us assume three contact points with a grasped object in
the thumb, index and middle finger respectively, that can be defined with the function
SGaddFtipContact()
hand = SGaddFtipContact(hand,1,1:3);
CHAPTER 3. TUTORIAL AND EXAMPLES 29

Figure 3.4: The paradigmatic hand in the mean reference configuration, performing a
tripod grasp.

Hard Finger contact model was assumed, so the dimension of contact force vector is
nl = 9. The reference hand and object configurations are represented in Fig. 3.4.

3.2.1 Grasp definition


At the end of hand and grasp definition phases, two structure are defined, hand and
object. As an example, the model structures, obtained for the 20 DoFs anthropomor-
phic hand (nq = 20), with three contact points in the fingertips of the thumb, index, and
middle, assuming an Hard Finger contact model (nl = 9), activated with 4 synergies
(nz = 4), are the following
hand =
F: {1x5 cell}
n: 5
m: 20
q: [20x1 double]
ctype: 1
S: [20x4 double]
Kq: [20x20 double]
Kz: [4x4 double]
H: [9x18 double]
J: [9x20 double]
JS: [9x4 double]

object =
cp: [4x3 double]
center: [3x1 double]
normals: [3x3 double]
base: [4x4 double]
Kc: [9x9 double]
H: [9x18 double]
G: [6x9 double]
CHAPTER 3. TUTORIAL AND EXAMPLES 30

Figure 3.5: Analysis of the 20 DoFs anthropomorphic hand: quasistatic analysis, ob-
ject motion directions (blue- translation, green-rotation) and contact force variations
produced by the activation of the second synergy (represented as arrows on the finger-
tips).

3.2.2 Quasi–static analysis of the grasping


The fuction SGquasistatic maps () allows to evaluate the matrices V and P that maps
the input reference synergies onto the object displacement and contact force variation,
respectively:
V=
-0.1854 -0.3677 5.4100 6.9124
4.1939 2.4645 2.4516 20.5106
0.6585 7.2100 -1.1586 0.7589
-0.0180 0.1727 0.0181 -0.0487
-0.1151 -0.0755 0.2176 -0.1284
0.1671 0.0152 -0.0810 0.5814

P =
-0.0016 0.0006 0.0002 0.0016
-0.0056 0.0017 -0.0017 0.0037
0.0015 -0.0005 0.0003 -0.0012
-0.0018 -0.0005 0.0077 -0.0053
0.0026 -0.0007 0.0029 -0.0014
0.0001 0.0003 -0.0029 0.0019
0.0034 -0.0001 -0.0079 0.0038
0.0029 -0.0010 -0.0012 -0.0023
-0.0016 0.0002 0.0026 -0.0007

It is worth to note that #(P) = 3, a base of controllable internal force dimension is


ima(lin_maps.P)=
0.0178 -0.1980 0.3270
-0.1407 -0.7508 -0.0339
0.0210 0.2012 -0.0933
0.6289 -0.0245 -0.3516
0.2348 0.4115 0.6283
CHAPTER 3. TUTORIAL AND EXAMPLES 31

-0.2358 -0.0698 -0.0107


-0.6467 0.2224 0.0246
-0.0942 0.3392 -0.5944
0.2148 -0.1315 0.1040

3.2.3 Rigid body motions


The function SGrb motions() applied to the hand and object produces in this case the
following result.
rbmotion =
Zrb: [4x1 double]
Urb: [6x1 double]
Qrb: [20x1 double]

The output matrices represents, respectively, the synergy reference values, the object
displacement, the hand joint displacement, corresponding to an object rigid body mo-
tion. The number of columns of each matrix is the dimension of rigid body motion
subspace [13]. It is evident that in this case, since the internal force subspace dimen-
sion #(Es ) = 3, and the number of activated synergies is 4, the dimension of the rigid
body motion subspace is 1. The combination of synergy reference values that produces
on the hand a rigid body motion is
rbmotion.Zrb =
0.1872
0.9662
-0.0103
-0.1768

3.2.4 Grasp force optimization


The minimization of SGVcost() function allows to evaluate the set of controllable inter-
nal forces that maximizes the distance from the friction cone boundaries in the contact
points. The results obtained assuming a friction coefficient µ = 0.5, a minimum force
normal component λmin = 1 N and a maximum force magnitude λmax = 30 N are shown
in Fig. 3.6. The angles between the normal direction and the contact force, evaluated
with the function SGcheckangle(), expressed in rad, were
theta: [0.1986 0.0187 0.2468]

The contact force norms, expressed in N, were


lambdan: [27.1485 12.2133 20.9837]

The synergy reference values that should be applied to obtain such contact force varia-
tion are
delta_zetar =[-0.5660 -2.9211 0.0311 0.5346]
CHAPTER 3. TUTORIAL AND EXAMPLES 32

−30

−40

−50
z (mm)

−60

−70

−80

0 50
60
−20 70
−40 80
90
−60
y (mm)
x (mm)

Figure 3.6: Analysis of the 20 DoFs anthropomorphic hand: optimization of grasp-


ing forces, results obtained assuming a friction coefficient µ = 0.5, a minimum force
normal component λmin = 1 N and a maximum force magnitude λmax = 30 N. Black
arrows represent contact forces and blue arrows contact normal unitary vectors.

3.2.5 Manipulability analysis


Finally, the kinematic manipulability analysis tool for the above described grasp pro-
duces the principal directions in the object and synergy space. The kinematic manip-
ulability ellipsoid, obtained in the above described reference configuration, is repre-
sented in Fig. 3.7. As discussed in [6], the manipulability problem can be solved as an
eigenvalue/eigenvector problem. The directions, in the workspace and synergy space,
respectively, corresponding to the eigenvectors evaluated solving manipulability prob-
lem, are the following
ueig =
0.1633 0.1737 0.5966
0.0096 -0.0188 -0.2967
-0.1745 0.2669 0.1841
0.0138 0.0207 -0.0941
0.0208 0.1437 -0.3871
-0.0892 -0.1693 0.5952

zeig =
-0.1086 -0.0876 -0.4310
-0.5595 0.8278 0.0319
0.4978 0.2949 0.6956
0.6538 0.4693 -0.5739

3.3 Hand writing modeling and evaluation


In SGwritingExample.m a mathematical model of the human hand kinematics able
to describe complex manipulation tasks, such as writing on a tablet with a stylus, is
described.
CHAPTER 3. TUTORIAL AND EXAMPLES 33

−20

−40

−60

−80

20 0
0 20
40
−20 60
80
−40 100

Figure 3.7: Analysis of the 20 DoFs anthropomorphic hand, kinematic manipulability


ellipsoid.

In handwriting tasks, the stylus/pen makes contacts with the hand at four zones: the
thumb and index fingertips, the lateral surface of the middle finger distal phalanges, and
a proximal part of the hand, usually located between the thumb and the index [36, 37].
Due to finger compliance, the contact is extended on an area whose dimension depends
on the skin deformation properties and on the contact force. However, in this example,
we represent the contact as a point. Typically during writing tasks the three contact
points with the fingers do not change significantly with respect to the pen reference
system, while the contact point on the hand palm may vary, due to the sliding between
the pen and the hand skin. We furthermore assume that the paper on which the hand is
writing is fixed with respect to the external reference system.
The kinematic scheme of the hand performing handwriting tasks is shown in Fig. 3.8
with the corresponding SynGrasp model. The kinematic structure of the human hand
adopted in this example is the 20 DoF model provided in the toolbox in the file SG-
paradigmatic. The hand joint values are set to simulate a configuration compatible
with the task that is performed. Contact points are set through the function SGaddFtip-
Contact() on the thumb and index fingertips, and through the function SGaddCon-
tact() on the lateral part of the middle finger distal phalanges. Then the reference
system on the stylus is fixed on its tip and the stylus is plotted using standard Matlab
graphic functions. Once the hand structure and posture, the contact point and the object
reference frame are defined, the task can be analysed using the functions described in
the previous Section.
CHAPTER 3. TUTORIAL AND EXAMPLES 34

{N}

qt,1

c1 qt,3
λ2
w c2 λ1

{B}

Figure 3.8: On the left, the kinematic scheme and contact point approximated location
adopted to simulate handwriting tasks. On the right, the SynGrasp model of the human
hand performing handwriting tasks.

In this example, in particular, we analysed the task performance in terms of kine-


matic manipulability index [6]. This analysis firstly requires the solution of the qua-
sistatic problem, that can be easily performed using the function SGquasistaticHso-
lution(). In this example, only the rigid body motions, i.e. the motions of the stylus
that do not involve variations in the contact forces, are considered, so, from the solu-
tion of the quasistatic problem, we extracted this type of motions. This can be easily
performed since the solution Gamma provided by SGquasistaticHsolution() is or-
ganized in order to highlight the rigid body motions in the fields Gamma.urb and
Gamma.zrrb. Gamma.urb is a matrix whose columns represents a basis of all the
possible object rigid body motions, while Gamma.zrrb represents the corresponding
basis of synergy reference variations. The weight matrices necessary to evaluate the
manipulability indexes have been set, for the sake of simplicity, as identity matrices.
Finally, the manipulability analysis can be performed with the function SGkinManip-
ulability(), which provides, as outputs, the eigenvectors, i.e. the principal directions
in the object displacement and synergy spaces that maximizes and minimizes the kine-
matic manipulability index, and the corresponding eigenvalues. With these informa-
tion, using standard Matlab graphic functions, the kinematic manipulability ellipsoid
can be drawn, as shown in Fig. 3.9.

3.4 Mapping human hand synergies onto robotic hands


SynGrasp allows to define hand models with coupled joints activation according to a
defined synergistic organization. While for the paradigmatic hand the synergy sub-
spaces are defined according to the data collect by Santello et al. [12] and can be easily
set using the commands SGsantelloSynergies() and SGdefineSynergies(), a different
CHAPTER 3. TUTORIAL AND EXAMPLES 35

50

0
z

−50

−100
200
−20
−40
−60
120 100 80 60 40
y
x

Figure 3.9: Kinematic manipulability ellipsoid obtained in the analysis of the hand-
writing problem.

approach is necessary to exploit synergies on robotic hands. In the example SGmap-


pingExample.m it is shown a possible solution to map human hand synergies onto
robotic hands using the object-based algorithm presented in [34].
Let us consider the human hand model defined through SGparadigmatic, and a
robotic hand, e.g. the SG3Fingered. Consider also two sets of reference points ph
and pr arbitrarily placed on the human and the robotic hand, respectively. In the fol-
lowing we will consider the fingertips as reference points. Other choices are possible
as, for example, in the intermediate phalanges or in the hand palm since the number
of reference points can be arbitrary set [38, 34]. Two virtual objects can be defined as
the minimum volume spheres containing the reference points in the respective hands.
The function minboundsphere() provided within the toolbox solves this issue. The
activation of a synergy (SGactivateSynergies()) on the paradigmatic hand results on
a motion of the reference points and consequently of the virtual sphere. The whole
CHAPTER 3. TUTORIAL AND EXAMPLES 36
01

20
01− qr
qh
002−

−20
03−

04−
−40

05− 100
rh −60
rr
06− 50
−80
07− 0

02 03 04 05 06 07 08 09
pih011
001 00251−0
−100
05
100 80 60 −50
40 20 0 −20 −40 −60 −80 −100

Figure 3.10: Mapping synergies from the human hand model to the robotic hand. The
reference points on the paradigmatic hand ph (red dots) allows to define the virtual
sphere. Activating the human hand synergies, the sphere is moved and strained; its
motion and strain can be evaluated from the velocities of the reference points ṗh . This
motion and strain, scaled by a factor depending on the virtual sphere radii ratio, is then
imposed to the virtual sphere relative to the robotic hand, defined on the basis of the
reference points pr (yellow dots).

motion of the hand can be, thus, described as:


• a rigid-body motion, defined by the linear and angular velocities of the sphere
center ȯh and ωh , respectively;
• a non-rigid strain represented by the radius variation ṙh of the sphere.
The main idea of the mapping is to impose that the virtual sphere defined on the robotic
hand moves according to the velocities ȯh and ωh and changes its radius according to
ṙh , apart from a scaling factor introduced to deal with the possible differences on the
workspace dimension (see Fig. 3.10). Then, through inverse kinematics techniques, it
is possible to compute the joint values on the robotic hand. What we obtain is a way of
controlling the reference joint variables q̇r ∈ ℜnqr of the robotic hand using the vector
of synergies z of the paradigmatic hand. In other terms we design a map Sr to steer the
robotic joint reference variables as

q̇r = Sr ż, (3.1)

where map Sr depends on the synergy matrix Sh and other variables as explained in the
following.
To define the mapping we assume that both the human and the robotic hands are
in given configurations q0h and q0r (Fig. 3.10). Representing the motion of the hand
through the virtual object, the velocity of the generic reference point ṗih can be ex-
pressed as
ṗih = ȯh + ωh × (pih − oh ) + ṙh (pih − oh ) . (3.2)
CHAPTER 3. TUTORIAL AND EXAMPLES 37

Grouping all the reference point we obtain


 
ȯh
ṗh = Ah  ωh  , (3.3)
ṙh

where matrix Ah ∈ ℜnch ×7 is defined as


−S(p1h − oh ) (p1h − oh )
 
I
 ··· ··· ···
Ah =  (3.4)

I −S(pih − oh ) (pih − oh ) 
··· ··· ···

and S() is the skew operator. The SynGrasp function mapping A computes the matrix
Ah . The virtual sphere motion and deformation is then computed as a function of the
synergy vector velocity ż of the paradigmatic hand
 
ȯh
 ωh  = A#h ṗh = A#h Jh Sh ż, (3.5)
ṙh

where A#h denotes the pseudo-inverse of matrix Ah . Let us define the virtual object
scaling factor as the ratio between the sphere radii ksc = rrr . This factor is necessary
h
to scale the velocities from the human to the robotic hand workspaces. Note that the
scaling factor depends on the hand dimensions, but also on their configuration.
Then, the motion and deformation of the virtual sphere generated by the paradig-
matic hand are scaled and tracked by the virtual sphere referred to the robotic hand

   
ȯr ȯh
 ωr  = Kc  ωh  , (3.6)
ṙr ṙh

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


 
ksc I3,3 03,3 03,1
Kc =  03,3 I3,3 03,1  . (3.7)
01,3 01,3 1

According to eq. (3.3), the corresponding robot reference point velocity ṗr is given by
 
ȯr
ṗr = Ar  ωr  , (3.8)
ṙr

where matrix Ar ∈ ℜncr ×7 is defined as in eq. (3.4). Recalling eq. (3.5) and (3.6) we
can express the robotic hand reference point velocities ṗr as a function of the synergy
velocities ż
ṗr = Ar Kc A#h Jh Sh ż (3.9)
CHAPTER 3. TUTORIAL AND EXAMPLES 38

C1 {B} C2

kp θ4

J2 θ2 J4
kp
θ1 θ3
{N}
J1 J3

z1 z2

ka

zr1 zr2

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

and, considering the robot hand differential kinematics ṗr = Jr q̇r , where Jr ∈ ℜncr ×nqr
is its Jacobian matrix, the following relationship between robot hand joint velocities
and synergy velocities is defined as

q̇r = Jr# Ar Kc A#h Jh Sh ż. (3.10)

Finally the synergy mapping Sr in (3.1) for the robotic hand is computed as

Sr = Jr# Ar Kc A#h Jh Sh , (3.11)

where Jr# is the pseudoinverse of the Jacobian of the robotic hand and Jh is the Jacobian
of the human hand model. The synergy matrix is then assigned to the robotic hand
using the function SGdefineSynergies().

3.5 Modeling and analysis of underactuated hands


Tendon driven hand
As an example of an underactuated hand, let us consider robotic hand with three fingers,
where each finger is composed of two phalanges with the same lengths for a total of
6 DoFs. The gripper is sketched in Fig. 3.11. For the sake of simplicity, only two of
the three fingers are shown in the scheme. Let J1 , · · · , J6 be six reference points on the
CHAPTER 3. TUTORIAL AND EXAMPLES 39

joint axes, and let θ1 , · · · , θ6 be the joint angles. The structure of the hand is defined
in the SynGrasp file SGunderActuated1, while the whole example can be found on
SGexampleUnderactuated. The main aspect to be considered in this example is the
coupling between the joint realized through the pulley-tendon system. This coupling
is modeled through the definition of S matrix in the file SGexampleUnderactuated,
whose elements depend on pulley radii. In this case S matrix is constant.
In this example, we assume that the robotic hand is grasping an object with its fin-
gertips, with contact points in C1 , C2 , and C3 . The origin of the local object reference
frame is on the centroid of the contact points, the local x axis is parallel to C1C2 direc-
tion, and the local z direction is orthogonal to the plane defined by the contact points.
The contact points are added to the model with the function SGaddFtipContact. The
contact model assumed in this example is the hard finger. The object displacement is
defined with respect to the base reference system by the vector u ∈ ℜ6 . We consider
a reference configuration in which the external load w0 is zero, the contact forces are
λ01 , λ02 , and λ03 , applied at the points C1 , C2 and C3 , respectively. The contact vector
is then defined as λ0 = [λ01 T λ T λ T ]T ∈ ℜ9 .
02 03
Once the hand structure, the hand configuration, and the contact points are defined,
the Grasp matrix and the Jacobian matrix can be evaluated with the functions SG-
jacobianMatrix and SGgraspMatrix previously described. A first numerical analy-
sis 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 was set a = 0.035 m. The stiffness matri-
ces were Kc = kc I6,6 , Kq = kq I6,6 , where kc = 1000 N/m, kq = 100 Nm/rad.
Let us assume that each finger is driven by a tendon as shown in Fig. 3.11. This
actuation system is a simplified illustrative example inspired by the work presented in
[39]. The system has still six degrees of freedom, but only three actuators. We can
define the Lagrangian variable vector as z = [z1 z2 z3 q2 q4 q6 ]T , in which z1 , z2 , and
z3 represent tendon displacements and are actively controlled, while q2 , q4 and q6 are
passive. From the kinematic analysis of the mechanism it results that

0 0 − rr21
 1 
r1 0 0
 0 0 0 1 0 0 
 
 0 1 0 r2
r 0 − r 0 
S= ,
 1 1

 0 0 0 0 1 0 
 0 0 r1 − rr12 
 
1
0 0
0 0 0 0 0 1

where r1 and r2 are the pulley radii on the joints J1 − J3 − J5 and J2 − J4 − J6 , respec-
tively. In this case S is constant. Since the hand is underactuated, only the first three
components of the Lagrangian variable vector reference values zr are controllable, the
others will be null or constant, since they represents passive degrees of freedom. So, in
the modeling, we will consider ∆zr = [∆z1 ∆z2 ∆z3 0 0 0]T . The stiffness matrix Kz
is defined as Kz = diag(ka , ka , ka , k p , k p , k p ), where ka is the tendon stiffness, expressed
in N/m, while k p is the passive joint stiffness, expressed in Nm/rad.
The resulting total grasp stiffness matrix K expresses the relationship between the
CHAPTER 3. TUTORIAL AND EXAMPLES 40

object wrench and displacement, i.e.,

∆w = K∆u.

According to [22] [21], K matrix can be evaluated as follows


−1
K = G Kc−1 + JKq J T + JSKz ST J T GT .

It can be easily evaluated using SynGrasp functions, and its values are
 
Kt 0
K=
0 Kr

where  
1027 0 0
Kt =  0 2014 0  N/m
0 0 195
 
116 0 0
Kr =  0 298 0  Nm/rad
0 0 582
The function SGquasistatic() can be adopted also in this example to solve the
linearized grasp system for the assigned grasp configuration and for a given variation
of the tendon reference displacements. Since only three DoFs are controllable, the
subspace of controllable internal force dimension is three and a basis of such subspace
is given by the matrix P obtained by applying the function SGquasistaticMaps() and
considering the first three columns
 
−0.0719 0.0 −0.0015
 0.0381
 0.0365 −0.0381  

 0.0 −0.0 0.0 

 0.0704 −0.0000 −0.0704 
 
P=  0.0 −0.0729 .
0.0 

 0.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 mechanisms


Let us again consider a three fingered robotic hand, whose kinematic structure is
described by the same SynGrasp file SGunderActuated1, in this case we assume
that each finger is actuated according to a mechanical system schematically shown
in Fig. 3.12, inspired by [40]. Each finger in this case presents four joints, defining
a parallel kinematic structure. In this analysis, we assume that the contact points are
on the links a1 and a5 , only two joint angles are considered in grasp analysis, namely,
for the first finger, the angles q1 and q2 shown in Fig. 3.12. Each finger of the gripper
CHAPTER 3. TUTORIAL AND EXAMPLES 41

q2
α a4
a5

zp
a3
d
a1 γ
1
γ2
γ
q1 a2
za

Figure 3.12: Underactuated hand with passive joints, kinematics of one of the fingers.

has two degrees of freedom, but it is actuated by only one motor, that moves the link
indicated with a2 . We need another variable to describe the finger configuration, we
can choose the angle between links a1 and a4 , indicated with z p . Then, for each finger
we have zi = [za , z p ]T , the joint variable are q1 and q2 . We observe that

q2 = α + z p − π

where α is the angle between links a5 and a4 , constant. Furthermore we observe that

q1 = za + γ γ = γ1 + γ2
 2
a + d 2 − a43
 2
a + d 2 − a44
 
γ1 = arccos 1 γ2 = arccos 2
2a1 d 2a2 d
q
d = a21 + a24 − 2a1 a4 cos z p
Then the synergy matrix S can be evaluated as
 
Si 0 0
S =  0 Si 0 
0 0 Si

with
∂ q1 ∂ q1
" # " #

∂ za ∂ zp 1 dz p
S= ∂ q2 ∂ q2 =
∂ za ∂ zp 0 1
Fig. 3.13 shows, for three values of za and z p (arbitrarily selected, the same values
were assumed for the three fingers, for the sake of simplicity), the corresponding hand
configuration and the numerical value of the non–linear term in the synergy matrix.
Also in the underactuated case, the linearized grasp system can be easily solved using
SynGrasp functions, in particular, the matrix P that maps input references variables ∆za
to contact forces ∆λ in this case has dimensions 9×3.
CHAPTER 3. TUTORIAL AND EXAMPLES 42

za = π/10, z p = 3/4π za = π/4, z p = 2/3π za = 0, z p = π/2


10
10
20
0 0
0
−10 −10

−20 −20 −20


−30
−30 −40
−40
−40
−50 −60
−50
−60 60 −80
80 80
60 40 100
100 60 100
20 50
40 50 40
0 50
20 0 0 20 0
−50
0 −50 −20 0 −50
−100
−20 −100 −20 −100

dγ dγ dγ
dz p = −0.7369 dz p = −0.7647 dz p = −0.7435

Figure 3.13: Example of underactuated hand with four bar system coupling between

joints. Evaluation of the non linear element of S matrix, dz p
in three configurations.

Table 3.1: Quality index for ten different starting positions. The 3Fingered hand is
tested on a cube and all the resulting quality measures are reported.

Qual. Quality index for each starting position


MEV 5.5e03 5.2e03 4.6e03 4.2e03 4.1e03 3.4e03 2.4e03 2.3e03 1.7e03 0.1e03
GII 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.6580
DTSC 0.3001 0.2785 0.2699 0.2503 0.2428 0.2288 0.2057 0.1923 0.1787 0.1579
UOT 5.6e09 220.95 218.95 201.93 180.40 178.94 175.03 170.70 154.20 141.90
best obtained grasp best obtained grasp

0 −20
20

−40
−20 0

−60
−40 −20
z
z

−80
−40
z

−60

−100
−60
−80
−120
−80
−100
−140
−100
0 80 20 −50
−120 60 40
40 60 0
−50 20 80
0 100 50
140 120 −100 −20 120
100 80 60 40 20 −40 100 80 60 40 20 0
140 120
x x
y y

(a) (b) (c)

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

3.6 Grasp planner


The example SGgraspPlannerExample.m reports how the SynGrasp function SG-
graspPlanner() can be used to obtain a stable grasp. As first step, the user can select
the type of hand between the SGparadigmatic, the SG3Fingered and the SGmodu-
larHand. The next step is the selection of the number of pregrasp positions that will
be tested by the grasp planner. Then, the user can select the object to grasp between a
CHAPTER 3. TUTORIAL AND EXAMPLES 43

sphere, a cylinder and a cube. The object are then created using the specific function
SGsphere(), SGcylinder() and SGcube(). Finally, it is required to select the quality
measure to be used for the grasp selection. The grasp planner is now called and the
best resulting grasp plotted.
Tab. 3.1 reports the results for the SG3Fingered hand grasping a cube with 50mm
edge. Ten different starting positions are considered. The table shows the obtained
quality indexes using the available quality measures, where MEV stands for manipula-
bility ellipsoid volume quality index, GII is the grasp isotropy index, MSVG represents
the minimum singular value of the matrix G, DSTC is the distance from the singular
configuration and UOT is the uniformity measure. In Fig. 2.3 the best obtained grasp
using the SGdistSingularConfiguration quality measure is shown.
In Fig. 3.14 three possible outputs of the grasp planning algorithm are represented.
We ran the grasp planner on the three-fingered hand model in order to generate suitable
grasps of the three different objects available in SynGrasp. Ten possible grasps were
computed for each of the three objects, and the best configurations were selected among
them, according to the grasp isotropy index (GII) metric.
Chapter 4

Useful readings

4.1 On Motion and Force Control of Grasping Hands


with Postural Synergies
Authors: D. Prattichizzo, M. Malvezzi, A. Bicchi [13]
The complexity of robotic hands is needed to adapt devices to the many kinds of
tasks, but the large number of motors needed to fully actuate the DoFs comes at the cost
of size, complexity and weight of devices. A possible approach to solve this problem
consists of reducing the number of actuators thus resulting more efficient, simpler and
reliable than their fully actuated alternatives. Reducing control inputs seems to inspire
also biological systems and in particular motor control of human hands, which share
with robotic hands the large number of DoFs. Recent studies demonstrated that a few
control variables, named postural synergies, are able to account for most of the variance
in the patterns of hand movements and configurations of hands. This paper focuses
on hands with postural synergies. Reducing the number of control inputs, from fully
actuated joints to few synergies, might reduce the dimension of the force and motion
controllability subspaces thus compromising the dexterity of the grasp, however, this
is not true in general but strongly depends on how synergies are distributed. The paper
investigates to what extent a hand with many DoFs can exploit postural synergies to
control force and motion of the grasped object.

4.2 On the Role of Hand Synergies in the Optimal Choice


of Grasping Forces
Authors: M. Gabiccini A. Bicchi D. Prattichizzo M. Malvezzi [15]
Recent work on the analysis of natural and robotic hands has introduced the notion
of postural synergies as a principled organization of their complexity, based on the
physical characteristics of the hand itself. Such characteristics include the mechanical
arrangements of joints and fingers, their couplings, and the low-level control reflexes,
that determine the specific way the concept of hand is embodied in a human being

44
CHAPTER 4. USEFUL READINGS 45

or a robot. While the focus of work done so far with postural synergies has been on
motion planning for grasp acquisition, in this paper we set out to investigate the role
that different embodiments have on the choice of grasping forces, and on the ultimate
quality of the grasp. Numerical results are presented showing quanti- tatively the role
played by different synergies (from the most fundamental to those of higher-order) in
making a number of different grasps possible. The effect of num- ber and types of
engaged synergies on the distribution of optimal grasp forces is considered. Moreover,
robustness of results is investigated with respect to variation in uncertain parameters
such as contact and joint stiffness.

4.3 On Motion and Force Controllability of Precision


Grasps with Hands Actuated by Soft Synergies
Authors: D. Prattichizzo, M. Malvezzi, M. Gabiccini, A. Bicchi [41]
To adapt to many different objects and tasks, hands are very complex systems with
many degrees of freedom (DoFs), sensors, and actuators. In robotics, such complexity
comes at the cost of size and weight of the hardware of devices, but it strongly affects
also the ease of their programming. A possible approach to simplification consists
in coupling some of the DOFs, thus affording a reduction of the number of effective
inputs, and eventually leading to more efficient, simpler, and reliable designs. Such
coupling can be at the software level, to achieve faster, more intuitive programmability
or at the hardware level, through either rigid or compliant physical couplings between
joints. Physical coupling between actuators and simplification of control through the
reduction of independent inputs is also an often-reported interpretation of human hand
movement data, where studies have demonstrated that few postural synergies explain
most of the variance in hand configurations used to grasp different objects. Together
with beneficial simplifications, the reduction of the number of independent inputs to a
few coupled motions or synergies has also an impact on the ability of the hand to dex-
terously control grasp forces and in- hand manipulation. This paper aims to develop
tools that establish how many synergies should be involved in a grasp to guarantee sta-
bility and efficiency, depending on the task and on the hand embodiment. Through the
analysis of a quasi-static model, grasp structural properties related to contact force and
object motion controllability are defined. Different compliant sources are consid- ered,
for a generalization of the discussion. In particular, a compliant model for synergies
assumed, referred to as soft synergies, is discussed. The controllable internal forces
and motions of the grasped object are related to the actuated inputs. This paper inves-
tigates to what extent a hand with many joints can exploit postural synergies to control
force and motion of the grasped object.

4.4 On the manipulability ellipsoids of underactuated


robotic hands with compliance
Authors: D. Prattichizzo, M. Malvezzi, M. Gabiccini, A. Bicchi [6]
CHAPTER 4. USEFUL READINGS 46

Underactuation in robotic hands is currently attracting a lot of interest from re-


searchers. The challenging idea of underactuation in grasping is that hands, with re-
duced number of actuators, supported by suitable design and control, may not suffer
from reduced performances. This trend is also strengthened by recent neuroscience
studies which demonstrates that also humans use sensorimotor synergies to control the
hand in performing grasping tasks. In this paper, we focus on the kinematic and force
manipulability analyses of underactuated robotic hands. The performances of such
hands, regarded as mechanical transformers of inputs as forces and speed into outputs
as object wrench and displacements, are assessed by suitably defined manipulation
indices. The whole analysis is not limited by rigid-body motion assumptions, but en-
compasses elastic motions and statically indeterminate configurations by introducing
generalized compliance at contacts and actuation. Two examples show the validity of
the proposed approach to evaluate underactuated hand performances.

4.5 Internal force control with no object motion in com-


pliant robotic grasps
Authors: D. Prattichizzo, M. Malvezzi [42]
Control of internal forces is one of the key issues in robotic grasping. When the
robotic hand is compliant, for instance with passive springs at the joints, and the num-
ber of controlled variables is low, as for instance in recent works for underactuated
hands, it is possible that the control of internal forces implies the motion of the ma-
nipulated object. This paper deals with this issue and proposes a control approach to
control internal forces which do not involve any motion of the grasped object.

4.6 Mapping synergies from human to robotic hands


with dissimilar kinematics: an object based approach
Authors: G. Gioioso, G. Salvietti, M. Malvezzi, D. Prattichizzo [34]
Robotic hands differ in kinematics, dynamics, programming, control and sensing
frameworks. Their common character is redundancy, which undoubtedly represents a
key feature for dexterity and flexibility, but it is also a drawback for integrated automa-
tion since it typically requires additional efforts to seamlessly integrate devices, partic-
ularly robotic hands, in industrial scenario. This paper focuses on the mapping between
hands with dissimilar kinematics. It is based on the argument that the reflected optimal-
ity of the pattern of grasping forces emerging from human hand synergies should be
matched, in some sense, by the sought for postural synergies of robotic hands. As a nat-
ural consequence of the proposed approach, postural synergies for different kinematic
structures could look entirely different in geometric shape. This difference should be a
consequence of aspects such as different dimensions, kinematic structures, number of
fingers, compliance, contact properties which cannot come into play if a gross geomet-
ric mapping is applied. The proposed mapping is based on the use of a virtual sphere
and will be mediated by a model of an anthropomorphic robotic hand able to capture
CHAPTER 4. USEFUL READINGS 47

the idea of synergies in human hands.

4.7 Object motion-decoupled internal force control for


a compliant multifingered hand
Authors: D. Prattichizzo, M. Malvezzi, M. Aggravi and T. Wimboeck [43] Com-
pliance in multifingered hand improves grasp stability and effectiveness of the ma-
nipulation tasks. Compli- ance of robotic hands depends mainly on the joint control
parameters, on the mechanical design of the hand, as joint passive springs, and on the
contact properties. In object grasping the primary task of the robotic hand is the con-
trol of internal forces which allows to satisfy the contact constraints and consequently
to guarantee a stable grasp of the object. When compliance is an essential element of
the multifingered hand, and the control of the internal forces is not designed to be de-
coupled from the object motion, it happens that a change in the internal forces causes
the object trajectory to deviate from the planned path with consequent performance
degradation. This paper studies the structural conditions to design an internal force
controller decoupled from object motions. The analysis is constructive and a controller
of internal forces is proposed. We will refer to this controller as object motion- de-
coupled control of internal forces. The force controller has been successfully tested on
a realistic model of the DLR Hand II. This controller provides a trajectory interface
allowing to vary the internal forces (and to specify object motions) of an underactuated
hand, which can be used by higher-level modules, e.g. planning tools.

4.8 On the Use of Homogeneous Transformations to Map


Human Hand Movements onto Robotic Hands
Authors: G. Salvietti, M. Malvezzi, G. Gioioso, D. Prattichizzo [44]
Replicating the human hand capabilities is a great challenge in telemanipulation
as well as in autonomous grasping and manipulation. One of the main issues is the
difference between human and robotic hands in terms of kinematic structure, which
does not allow a direct correlation of the joints. We recently proposed an object-based
mapping algorithm able to replicate on several robotic hand models the human hand
synergies. In such approach the virtual object shapes were a-priori defined (e.g. a
sphere or an ellipsoid) and the transformation was represented as the composition of a
rigid body motion and a scale variation. In this work, we introduce a generalization of
the object-based mapping that overcomes the definition of a shape for the virtual object.
We consider only a set of reference points on the hands. We estimate a homogeneous
transformation matrix that represents how the human hand motion changes its reference
point positions. The same transformation is then imposed to the reference points on the
robotic hand and the joints values obtained through a kinematic inversion technique.
The mapping approach is suitable also for telemanipulation scenarios where the hand
joint motions are combined with a wrist displacement.
CHAPTER 4. USEFUL READINGS 48

4.9 Evaluation of grasp stiffness in underactuated com-


pliant hands
Authors: M. Malvezzi, D. Prattichizzo [45]
Underactuation represents a solution to reduce the number of Degrees of Freddom
(DoF) of robotic hands. Altough reducing the number of DoFs in general limits the
ability to perform many and different types of grasp, the use of springs in the structure
improves the compliance of the grasp and mitigates the loss of generality due to the
reduction of DoFs in the mechanical structure. The use of active and passive elastic
elements improves robustness of the whole grasp. In this paper we evaluate the grasp
stiffness which depends on the structural compliance of hand links and joints and of
the contacts, and on the gains of impedance controllers. A quasi-static model of the
grasp for underactuated hands is presented and used to explicitly compute the grasp
compliance.

4.10 An object-based mapping algorithm to control wear-


able robotic extra-fingers
Authors: D. Prattichizzo, G. Salvietti, F. Chinello, M. Malvezzi, [46]
One of the new targets of wearable robots is not to enhance the lift strength far
above human capability by wearing a bulky robot, but to support human capability
within its range by wearing lightweight and compact robots. A new approach regard-
ing robotic extra-fingers is presented here. In particular, an object-based mapping algo-
rithm is proposed to control the robotic extra-fingers by interpreting the whole or a part
of the hand motion in grasping and manipulation tasks. As a case study, the model and
control of an additional robotic finger is presented. The robotic finger has been placed
on the wrist opposite to the hand palm. This solution enlarges the hand workspace,
increasing the grasp capability of the user. The proposed mapping algorithm do not
require the human operator to activate explicit commands. Rather, the motion of the
extra-fingers is connected to the human hand so that the user can perceive the robotic
fingers as an extension of his body.

4.11 Digital Handwriting with a Finger or a Stylus: a


Biomechanical Comparison
Authors: D. Prattichizzo, L. Meli, M. Malvezzi [47]
In this paper we present a study concerning the human hand during digital hand-
writing on a tablet. Two different cases are considered: writing with the finger, and
writing with the stylus. We chose an approach based on the biomechanics of the hu-
man hand to compare the two different input methods. Performance is evaluated using
metrics originally introduced and developed in robotics, such as the manipulability
indexes. Analytical results assess that writing with the finger is more suitable for per-
forming large, but not very accurate motions, while writing with the stylus leads to a
CHAPTER 4. USEFUL READINGS 49

higher precision and more isotropic motion performance. We then carried out two ex-
periments of digital handwriting to support the approach and contextualize the results.

4.12 Modeling Compliant Grasps Exploiting Environ-


mental Constraints
Authors: Salvietti, G. and Malvezzi, M. and Gioioso, G. and Prattichizzo, D. [48]
In this paper we present a mathematical framework to describe the interaction be-
tween compliant hands and environmental constraints during grasping tasks. In the
proposed model, we considered compliance at wrist, joint and contact level. We mod-
eled the general case in which the hand is in contact with the object and the surrounding
environment. All the other contact cases can be derived from the proposed system of
equations. We performed several numerical simulation using the SynGrasp Matlab
Toolbox to prove the consistency of the proposed model. We tested different combi-
nations of compliance as well as different reference inputs for the hand/arm system
considered. This work has to be intended as a tool for compliant hand designer since it
allows to tune compliance at different levels before the real hand realization. Further-
more, the same framework can be used for compliant hand simulation in order to study
the interaction with the environmental constrains and to plan complex manipulation
tasks.
Chapter 5

List of Functions

5.1 Analysis
5.1.1 SGcheckFriction()
SGcheckFriction - check if the friction constraints are satisfied.
The function allow to check the friction constraints
Usage: c = SGcheckFriction(w,y,pG,E,n,alpha,k)
Arguments:
• w = external load
• y = coefficients for the linear combination of E columns
• pG = grasp matrix pseudoinverse
• E = controllable internal force subspace
• n = contact normal (matriz 3xnc)
• alpha = cosine of the friction angle
• k = positive margin
Returns:
c= logic variable whose value is 1 if the contact constraint is satisfied for each contact,
0 otherwise
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of grasp-
ing hands with postural synergies. In Robotics: Science and Systems VI, pp. 49-56,
The MIT Press, Zaragoza, Spain, June 2011.
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand synergies
in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-252,
2011.
See also: SGquasistatic, SGquasistaticMaps

50
CHAPTER 5. LIST OF FUNCTIONS 51

5.1.2 SGforceManipulability()
SGforceManipulability - Evaluate the force manipulability principal directions
Usage: SGforceManipulability(Gamma,in col,Ww,Ws)
Arguments:
• Gamma = matrix of the homogeneous solution of grasp problem obtained with
the function SGquasistaticHsolution;

• in col = the index indicating the columns of Gamma to consider in the evaluation;
• Ww,Ws: weights matrices for the external wrench and the synergy forces, re-
spectively.
Returns:

• forceManipulability.V principal directions in the x space


• forceManipulability.D eigenvalues of the manipulability problem
• forceManipulability.weig principal directions in the w space
• forceManipulability.seig principal directions in the sigma space

References D. Prattichizzo, M. Malvezzi, M. Gabiccini, A. Bicchi. On the Manip-


ulability Ellipsoids of Underactuated Robotic Hands with Compliance. Robotics and
Autonomous Systems, Elsevier, 2012.
See also: SGquasistaticHsolution, SGkinManipulability

5.1.3 SGgraspAnalysis()
SGgraspAnalysis - Analyzes the grasp of the hand. The function analyzes the given
grasping configuration in terms of internal forces and object motions.
Usage: [E,V,N] = SGgraspAnalysis(hand)
Arguments:
• hand = the hand to analyze
Returns:

• E = matrix of controllable internal forces


• V = base of internal movements than not generate movements of the object
• N = matrix of structural forces
See also: SGgraspMatrix, SGjacobianMatrix
CHAPTER 5. LIST OF FUNCTIONS 52

5.1.4 SGgraspStiffness()
SGgraspStiffness - Evaluate the grasp stiffness matrix
Usage: K = SGgraspStiffness(hand, object)
Arguments:
• hand, object: structures that contain hand and object grasp properties
Returns:

• K: a 6x6 matrix representing the grasp stiffness matrix


References
M. Malvezzi, D. Prattichizzo, ”Evaluation of Grasp Stiffness in Underactuated
Compliant Hands”, Proceedings, IEEE International Conference on Robotics and Au-
tomation, Karlsruhe, Germany, 2014.
See also: SGkinManipulability, SGforceManipulability, SGquasistaticHsolution

5.1.5 SGkinManipulability()
SGkinManipulability - Evaluate the kinematic manipulability principal directions
Usage: kinmanipulability = SGkinManipulability(Gamma,in col,Wu,Wz)
Arguments:
• Gamma = matrix of the homogeneous solution of grasp problem obtained with
the function SGquasistaticHsolution

• in col = the index indicating the columns of Gamma to be considered in the


evaluation
• Wu,Wz: weights matrices for the object displacement and the synergy inputs,
respectively

Returns:
• kinmanipulability.V principal directions in the x space
• kinmanipulability.D eigenvalues of the manipulability problem
• kinmanipulability.ueig principal directions in the u space

• kinmanipulability.zeig principal directions in the z space


References: D. Prattichizzo, M. Malvezzi, M. Gabiccini, A. Bicchi. On the Ma-
nipulability Ellipsoids of Underactuated Robotic Hands with Compliance. Robotics
and Autonomous Systems, Elsevier, 2012.
CHAPTER 5. LIST OF FUNCTIONS 53

5.1.6 SGquasistatic()
SGquasistatic - Performs a quasistatic analysis This function performs a quasistatic
analysis of a given grasp resulting from the activation of a given subset of synergies.
Results are stored in the output structure
Usage: variation = SGquasistatic(hand,object,delta zr)
Arguments:
• hand = the hand grasping the object

• object = the object grasped by the hand


• delta zr = a reference synergy activation vector. If no synergy matrix are defined
for the hand (S is an identity matrix), this argument can be seen as a variation of
the joint values

Returns:
• variation.delta u = the obtained object motion
• variation.delta lambda = the variation on the contact forces
• variation.delta tau = the variation of the joint torques

• variation.delta q = the variation of the real joint position variation.delta sigma =


the variation of the contact forces in the synergy space
• variation.delta z = the variation of the real joint position in the synergy space
• variation.delta qr = the variation of the reference joint position

References: D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force control-


lability of grasping hands with postural synergies. In Robotics: Science and Systems
VI, pp. 49-56, The MIT Press, Zaragoza, Spain, June 2011.
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand synergies
in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-252,
2011.
See also: SGquasistaticMaps, SGgraspAnalysis

5.1.7 SGquasistaticHsolution()
SGquasistaticHsolution - Evaluate the kinematic manipulability principal directions
Usage: SGquasistaticHsolution(hand, object)
Arguments:
• hand, object: structures that contain hand and object grasp properties

Returns:
• Gamma: matrix whose columns represent the solution of the grasp problem in a
quasi-static framework
CHAPTER 5. LIST OF FUNCTIONS 54

References D. Prattichizzo, M. Malvezzi, M. Gabiccini, A. Bicchi. On the Manip-


ulability Ellipsoids of Underactuated Robotic Hands with Compliance. Robotics and
Autonomous Systems, Elsevier, 2012.
See also: SGkinManipulability, SGforceManipulability

5.1.8 SGquasistaticMaps()
SGquasistaticMaps - Evaluate input/output maps of grasp problem
The function allows to evaluate input/output maps, solution of the quasistatic for-
mulation of grasp problem
Usage: 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
References D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force control-
lability of grasping hands with postural synergies. In Robotics: Science and Systems
VI, pp. 49-56, The MIT Press, Zaragoza, Spain, June 2011.
See also: SGquasistatic

5.1.9 SGrbMotions()
SGrbMotions - Evaluate object rigid body motions. This functions evaluates the object
rigid body motion allowed in a given configuration of the hand-object system
Usage: rbmotion = SGrbMotions(hand,object)
Arguments:

• hand = the hand structure


• object = the object structure
Returns:
• rbmotion.Zrb = synergy reference variation

• rbmotion.Urb = object displacement


CHAPTER 5. LIST OF FUNCTIONS 55

• rbmotion.Qrb = hand joint displacement


• rbmotion.Zarb = synergy actual variation
• rbmotion.Lrb = contact force variation-check variable, should be zero
• rbmotion.Trb = joint torques-check variable, should be zero
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of grasp-
ing hands with postural synergies. In Robotics: Science and Systems VI, pp. 49-56,
The MIT Press, Zaragoza, Spain, June 2011.
See also: SGquasistatic, SGquasistaticMaps

5.1.10 SGslide()
SGslide - computes the displacement of hand joints and wrist position due to the dqr
assigned. It takes care of the compliance at wrist, joint and contact level
Usage: [displacements] = SGslide(hand,Kc,dqr)
Arguments:
• hand = the hand structure
• Kc = contact stiffness matrix
• dqr = reference joint displacement
Returns:
• displacements = joint and wrist displacement
References: G. Salvietti, M. Malvezzi, G. Gioioso, D. Prattichizzo. Modeling
Compliant Grasps Exploiting Environmental Constraints. In Proc. IEEE Int. Conf. on
Robotics and Automation, Seattle, USA, 2015.
See also: SGquasistatic, SGquasistaticMaps

5.1.11 SGVcost()
SGVcost - Evaluate the force-closure cost function for a given grasp. The function
returns the value of the force-closure cost function to minimize to achieve the best
grasp feasible with the given set of synergies.
Usage: [yopt,cost] = fminsearch(@(y) SGVcost(w,y,pG,hand.Es,hand.cn,mu, fmin,fmax,k),y0)
Arguments:
• w = the external load
• y = the optimization variable representing the synergy activation vector
• pG = grasp matrix pseudoniverse
• E = matrix of controllable internal forces of the analyzed hand
CHAPTER 5. LIST OF FUNCTIONS 56

• n = number of contact points


• mu = friction coefficent
• fmin = minimum normal force
• fmax = maximum normal force

• k = coefficent of the optimization function (suggested value: 0.01)


Returns:
• cost = the cost function

• yopt = the optimal synergy activation vector


See also: SGmakehand, SGmakeFinger
Reference:
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand synergies
in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-252,
2011.
Note: this evaluation is suitable only for Hard Finger Contact model
CHAPTER 5. LIST OF FUNCTIONS 57

5.2 Graphics
5.2.1 SGhandFrames()
SGhandframe - plot the joint and the frame on a hand
Usage: out = SGhandframe(hand,scale)
Arguments:
• hand = a hand structure
• scale = a scale factor for the plot
Returns:
• a plot of the hand frames
See also: SGplotjoint, SGplotframeframe

5.2.2 SGplotBase()
SGplotBase - Plot the hand base or palm
Usage: SGplotBase(basepoints,radius,nps)
Arguments:
• basepoints : 3xn matrix containing the coordinates of the points to be used to
plot the palm
• radius (opt): fillet radius
• nps (opt): number of points for the fillet approximation
Returns:
Adds the hand base representation to the current plot.
See also: SGplotHand, SGplotObject

5.2.3 SGplotContactForces()
SGplotContactForces - Plot contact points, contact forces and object displacements
Usage: out = SGplotContactForces(object,deltalambda,deltau,scale u,scale l)
Arguments:
• object = object structure with contact point info
• deltalambda (opt) = contact force to plot
• deltau (opt) = object displacement
• scale u (opt) = scale for the representation of object displacement
• scale l (opt) = scale factor for the representation of contact forces
Returns: a plot representing contact points, contact forces, object center and dis-
placement.
See also: SGgraspAnalysis, SGquasistatic
CHAPTER 5. LIST OF FUNCTIONS 58

5.2.4 SGplotContactPoints()
SGplotContactPoints - plot the contact points defined on the hand. This function plots
the contact points defined in the hand structure.
Usage: SGplotContactPoints(hand,dim,type)
Arguments:
• hand = the hand structure on which the contact points are defined
• type, dim = type and dimensions of the marker used to represent the contact
points
Returns: a plot representing contact points.
See also: SGmakehand, SGaddContact, SGaddFtipContact

5.2.5 SGplotframe()
SGplotframe - plot a frame defined by the 4x4 matrix T
Usage: out = SGplotframe(T,scalef)
Arguments:
• T = a 4x4 homogeneous matrix describing the orientation and the origin of a
frame
• scalef = a scale factor for the diagram
Returns:
• a plot of the frame
See also: SGplotjoint, SGhandframes

5.2.6 SGplotGripper()
SGplotGripper - Plot the model of a 4DoF planar gripper
Usage: SGplotGripper(hand,transp)
Arguments:
• hand = the hand structure to plot
• transp = numerical parameter that represents surface transparency
See also: SGplotSyn, SGmakehand, SGmakeFinger,

5.2.7 SGplotHand()
SGplotHand - Plot a hand. The function plots a hand given as argument.
Usage: SGplotHand(hand,transp)
Arguments:
• hand = the hand structure to plot
• transp = numerical parameter that represents surface transparency
See also: SGplotSyn, SGmakehand, SGmakeFinger,
CHAPTER 5. LIST OF FUNCTIONS 59

5.2.8 SGplotjoint()
SGplotjoint - plot a joint defined by the 4x4 matrix T
Usage: out = SGplotjoint(T,scalef)
Arguments:
• T = a 4x4 homogeneous matrix describing the orientation and the origin of a
frame

• scalef = a scale factor for the diagram


Returns:
• a plot of the joint (a cylinder)
See also: SGplotjoint, SGhandframes

5.2.9 SGplotLink()
SGplotLink - Plot a link of the hand structure. The function plots a clindrical link of
the hand structure
Usage: h = SGplotLink(p1,p2,r)
Arguments:
• p1 = the intial point of the link
• p2 = the final point of the link

• r = the radius of the link


• transp = parameter representing surface transparency
See also: SGmakehand, SGmakeFinger

5.2.10 SGplotObject()
SGplotObject - Plot an object. The function plots a the object given as input argument.
Usage: SGplotObject(object,radius,nps) plots the object described in the structure
object. The default object is a sphere defined by the radius and the number of pixel
nps.
Arguments:
• object : the object to be plotted
• radius : radius for the sphere

• nps : number of pixels for the sphere


See also: SGplotHand, SGplotCube, SGplotSphere, SGplotCylinder.
CHAPTER 5. LIST OF FUNCTIONS 60

5.2.11 SGplotPalm()
SGplotPalm - Plot the palm of a hand model. The function plots the palm of the hand
model given as argument.
Usage: SGplotPalm(hand).
Arguments:
• hand = the hand whose palm the user wants to plot.

See also: SGplotHand.

5.2.12 SGplotPalmGripper()
SGplotPalmGripper - Plot the palm of the 4DoF gripper model
The function plots the palm of the hand model given as argument
Usage: SGplotPalm
Arguments:
• hand = the hand whose palm the user wants to plot

See also: SGplotHand

5.2.13 SGplotSyn()
SGplotSyn - Plot the synergistic movement starting from a given configuration. The
function plots the movement of the given hand due to the selected synergy, starting
from a given configuration qm
Usage: 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)
See also: SGplotHand
Reference: M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of
hand synergies in the optimal choice of grasping forces. Autonomous Robots, Springer,
31:235-252, 2011.
CHAPTER 5. LIST OF FUNCTIONS 61

5.3 Grasp definition


5.3.1 SGaddContact()
SGaddContact - Add a contact point on the hand. The function allows to define a
contact point on the hand given as argument.
Usage: hand = SGaddContact(hand,type,cwhere,link,alpha)
Arguments:
• hand = the hand structure on which the contact points lie

• type = a flag indicating the contact type with the following semantics:
– 1: hard finger (2D or 3D);
– 2: soft finger (2D or 3D);
– 3: complete constraint (2D or 3D);

• cwhere = the finger on which the contact point lies


• link = the link where the contact point lies
• alpha = an argument that parameterize the position of the contact point on the
link (0 = link base; 1 = link end)

Returns: newHand = the hand with the new contact point


See also: SGmakehand, SGmakeFinger

5.3.2 SGaddFtipContact()
SGaddFtipContact - Add contact points on the fingertips. The function allows to
easily place contact points on the fingertips of the specified hand
Usage: newHand = SGaddFtipContact(hand,type,cwhere)
Arguments:

• hand = the hand structure on which the user wants to place the contact points
• type = a flag indicating the contact type with the following semantics:
– 1: hard finger (2D or 3D);
– 2: soft finger (2D or 3D);
– 3: complete constraint (2D or 3D);
• cwhere (optional) = the fingers on which contact points will be placed (5 by
default)
Returns: newHand = the hand with the new contact points.
See also: SGaddcontacontact
CHAPTER 5. LIST OF FUNCTIONS 62

5.3.3 SGcontact()
SGcontact - Define the contact point on the object This function is used by grasp
planner procedure and is called by SGcloseHand to define the contact points on the
object. This function defines the contact points on the grasped object.
Usage: [newHand,object] = SGcontact(hand,obj)
Arguments:
• hand = the hand structure on which the contact points are defined
• obj = the grasped object
Returns:
• newHand = the hand in contact with the object
• object = the grasped object structure enriched with the matrices relevant to grasp
analysis
See also: SGcloseHand, SGgraspPlanner, SGmakeObject

5.3.4 SGgraspMatrix()
SGgraspMatrix - Computes the Grasp matrix.
Usage: G = SGgraspMatrix(object)
Arguments:
• object = the object for which the grasp matrix is computed
Returns:
• G = the grasp matrix
References:
D. Prattichizzo, J. Trinkle. Chapter 28 on Grasping. In Handbook on Robotics, B.
Siciliano, O. Kathib (eds.), Pages 671-700, 2008.
See also: SGjacobianMatrix, SGselectionMatrix

5.3.5 SGjaacobianMatrix()
SGjacobianMatrix - Computes the Jacobian matrix.
Usage: J = SGjacobianMatrix(hand)
Arguments:
• hand = the hand structure whose Jacobian matrix you want to calculate
Returns:
• J = the Jacobian matrix
References:
D. Prattichizzo, J. Trinkle. Chapter 28 on Grasping. In Handbook on Robotics, B.
Siciliano, O. Kathib (eds.), Pages 671-700, 2008.
See also: SGselectionMatrix, SGgraspMatrix
CHAPTER 5. LIST OF FUNCTIONS 63

5.3.6 SGremoveContact()
SGremoveContact - Remove a contact point on the hand
Usage: hand = SGaddContact(hand,finger,link,alpha)
Arguments:
• hand = the hand structure on which the contact points lie
• finger = the finger on which the contact point lies

• link = the link where the contact point lies item alpha = an argument that pa-
rameterize the position of the contact point on the link (0 = link base; 1 = link
end)
Returns:

• newHand = the hand without the specified contact point


See also: SGmakehand, SGmakeFinger, SGaddContact

5.3.7 SGselectionMatrix()
SGselectionMatrix - Computes the Selection matrix
Usage: H = SGselectionMatrix(hand)
Arguments:
• hand = the hand structure whose Selection matrix you want to calculate

Returns:
• H = the selection matrix
References:
D. Prattichizzo, J. Trinkle. Chapter 28 on Grasping. In Handbook on Robotics, B.
Siciliano, O. Kathib (eds.), Pages 671-700, 2008.
See also: SGjacobianMatrix, SGgraspMatrix
CHAPTER 5. LIST OF FUNCTIONS 64

5.4 Grasp quality metrics


5.4.1 SGdistSingularConfiguration()
SGdistSingularConfiguration - grasp quality measures. Quality measures associated
with the hand configuration. Distance to singular configurations.
This group of quality measures includes those that consider the hand configura-
tion to estimate the grasp quality. In order to keep redundant fingers far from singular
configurations, it is desirable to maximize the smallest singular value Smin of the ma-
nipulator Jacobian. Therefore, by using SminHO as a quality measure, maximizing
the quality is equivalent to choose a grasp configuration far away from a singular one.
Then: Q = Smin HO. Where HO is the hand-object Jacobian.
Usage: [SminHO] = SGDistanceToSingularConfigurations (G,J)
Arguments:
• G = grasp matrix

• J = hand jacobian matrix


Returns:
• SminHO = DistanceToSingularConfigurations

See also: SGmanipulEllipsoidVol,SGUnifTrans.

5.4.2 SGferrariCanny()
SGferrariCanny - evaluates the Ferrari-Canny quality measure for a given grasp
This function evaluates a quality measures associated with a given grasp and specif-
ically the Ferrari-Canny quality index
Usage: [VE] = SGferrariCanny(object, s, type,plot)
Arguments:
• object = the object structure on which the grasp has to be evaluated s = number
of vertices of the pyramid approximating the friction cone
• plot = this boolean parameter determines if the computed convexhull and sphere
will be plotted or not
Returns:

• R = the radius of the maximum-volume sphere that can be inscribed in the con-
vexhull
See also: SGuniTransf, SGminSVG.
References: Miller, A. T., & Allen, P. K. (1999). ”Examples of 3D grasp quality
computations”. In Robotics and Automation, 1999. Proceedings. 1999 IEEE Interna-
tional Conference on (Vol. 2, pp. 1240-1246). IEEE.
CHAPTER 5. LIST OF FUNCTIONS 65

5.4.3 SGgraspIsotropyIndex()
SGgraspIsotropyIndex - grasp quality measures.
Quality measures associated with the position of the contact points. Measures based
on algebraic properties of the grasp matrix G. Grasp isotropy index.
This criterion looks for an uniform contribution of the contact forces to the total
wrench exerted on the object, i.e. tries to obtain an isotropic grasp where the mag-
nitudes of the internal forces are similar. The quality measure, called grasp isotropy
index, is defined as: Q=SminGSmaxG where SminG and SmaxG are the minimum and
maximum singular value of G. This index approaches to 1 when the grasp is isotropic
(optimal case), and falls to zero when the grasp is close to a singular configuration.
Usage: [Ii] = SGgraspIsotropyIndex (G) Arguments:
• G = grasp matrix

Returns:
• Ii = Grasp isotropy index.
See also: SGminSVG, SGwrenchEllips.

5.4.4 SGmanipEllisoidVolume()
SGmanipEllisoidVolume - evaluates the hand manipulability ellipsoid volume. This
function evaluates a quality measures associated with the hand configuration and specif-
ically the volume of the manipulability ellipsoid. This group of quality measures in-
cludes those that consider the hand configuration to estimate the grasp quality. In order
to consider all the singular values of HO, the volume of the manipulability ellipsoid
is proposed as quality measure. Let S1HOm S2HO, etc.be the singular values of HO.
The grasp quality (i.e. the volume of the manipulability ellipsoid) is;
q
Q = kb det HO(HOT ) = kb ∗ (S1HO ∗ S2HO ∗ .... ∗ SrHO)

where kb is a constant. The quality is therefore proportional to the product of all the
singular values, and maximizing the determinant of HO(HO)T maximizes the volume
of the ellipsoid.
Usage: [VE] = SGManipEllipsoidVolume(G,J) Arguments:
• G = grasp matrix
• J = hand jacobian matrix

Returns:
• VE = Volume Of The Manipulability Ellisoid
See also: SGuniTransf, SGminSVG.
CHAPTER 5. LIST OF FUNCTIONS 66

5.4.5 SGminSVG()
SGminSVG - evaluate the minimum singular value of matrix G
This function evaluates the minimum singular value of matrix G, this parameter is
adopted in the literature to evaluate grasp quality.
A full-rank grasp matrix G has d singular values given by the positive square roots
of the eigenvalues of GG0 . When a grasp is in a singular configuration (i.e. when
at least one degree of freedom is lost due to hand configuration), at least one of the
singular values goes to zero. The smallest singular value of the grasp matrix G, SminG ,
is a quality measure that indicates how far is the grasp configuration from falling into
a singular configuration, this is: Q = SminG . The largest SminG , the better the grasp. At
the same time the largest the SminG the largest the minimum transmission gain from the
forces λ at the contact points to the net wrench w on the object, which is also used as
grasp optimization criterion.
Usage: [SminG] = MinimumSingularValueOfG (G)
Arguments:
• G = grasp matrix
Returns:
• SminG = Minimum singular value of G
See also: SGuniTransf, SGmanipEllipsoidVolume.

5.4.6 SGunifTransf
SGunifTransf - grasp quality measures. Quality measures associated with the hand
configuration -Uniformity of transformation.
This quality measure function considers hand configuration. The transformation
between the velocity domain in the finger joints and the velocity domain of the ob-
ject is ”uniform” when the contribution of each joint velocity is the same in all the
components of object velocity.
The quality measure is given by:
Q = SmaxHO /SminHO
i.e. the ratio between the maximum and minimum singular values of matrix HO. The
quality of a grasp will be better when the grasp configuration gives Q as close as pos-
sible to 1.
Usage: [Ut] = SGunifTransf(G,J)
Arguments:
• G = grasp matrix
• J = hand jacobian matrix
Returns:
• Ut = Uniformity Of Transformation measure
See also: SGdistSingularConfigurations, SGmanipEllisoidVolume.
CHAPTER 5. LIST OF FUNCTIONS 67

5.5 Grasp planner


5.5.1 SGcloseHand ()
SGcloseHand - close a hand
Usage: [[newHand,object] = SGcloseHand(hand,obj,activeJoints,increment)
Arguments:
• hand = the hand structure on which the contact points lie
• obj = the object structure to be grasped

• activejoint = a table specifying the joint activated during the hand closing
• increment = joint variable increment during the closing procedure
Returns:

• newhand = the hand in the new configuration


• object = the grasped object
See also: SGgenerateCloud, SGevaluateOffset, SGgraspPlanner

5.5.2 SGevaluateOffset ()
SGevaluateOffset - Used by SGgraspPlanner
The function allows to compute the initial positions of the hands in the grasp plan-
ning. Usage: offset = SGevaluateOffset(hand)
Arguments:
• hand = the hand structure on which the contact points lie
Returns:

• offeser = the offeset need to correctly place the hand


See also: SGgenerateCloud, SGevaluateOffset, SGgraspPlanner

5.5.3 SGgraspPlanner
SGgraspPlanner - Synthesis of a grasp for a given couple hand-object
The function allows to define the best grasp given an object, the number of pregrasp
positions of the hand and the quality metric to be used for for grasp evaluation.
Usage: [hand c,object,BEST INDEX] = SGgraspPlanner(hand,obj,N,qmtype)
Arguments:
• hand = the hand structure on which the contact points lie
CHAPTER 5. LIST OF FUNCTIONS 68

• obj = the object structure to be grasped


• N = the number of random pregrasp positions of the hand
• qmtype = the quality metric to be used for grasp evaluation
Returns:

• hand c = the best hand configuration


• object = the grasped object
• BEST INDEX = the best quality index obtained

See also: SGgenerateCloud, SGevaluateOffset, SGcloseHand


CHAPTER 5. LIST OF FUNCTIONS 69

5.6 Modeling
5.6.1 SGactivateSynergies()
SGactivateSynergies - Activate a synergy or a combination of synergies on the hand
Usage: hand = SGactivateSynergies(hand,z)
The function allows to move the hand given as argument along a synergy or a
combination of synergies.
Arguments:

• hand = the hand on which the synergies specified in z must be activated


• z = the synergy activation vector
Returns:

• newHand = the hand in the new configuration


References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGdefineSynergies

5.6.2 SGblockJoints()
SGblockJoints - The function blocks the selected joints on a hand
Usage: hand = SGblockJoints(hand,joints)
Arguments:

• hand: structure containing hand information


• joints: joints to be locked
Returns:

• newHand = the updated hand structure


See also: SGmoveHand
CHAPTER 5. LIST OF FUNCTIONS 70

5.6.3 SGcontactStiffness()
SGcontactStiffness - Defines a stiffness matrix for the contact points of the hand
The function allows to define a stiffness matrix for the contact points defined on
the object given as argument
Usage: new object = SGcontactStiffness(object,stiffness)
Arguments:
• object = the object on which the contact points are defined

• stiffness= the stiffness values. This argument could be a scalar or a matrix with
te following semantics:
– scalar: the stiffness matrix will be a diagonal matrix with this value on the
main diagonal
– matrix: the stiffness matrix will be equal to this matrix
Returns:
• new object = the object with the desired contact stiffness
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGjointStiffness, SGsynergyStiffness

5.6.4 SGdefineSynergies()
SGdefineSynergies - Defines a Synergy matrix for the hand
The function allows to define a synergy matrix for the hand structure given as input
argument. It creates the hand strucures fields hand.S and hand.JS that are respectively
the synergy matrix and the underactuated Jacobian matrix.
Usage: hand = SGdefineSynergies(hand,S,qm)
Arguments:

• hand = the hand structure on which the user is defining the synergy matrix
• S = the synergy matrix
• qm = avarage position of the hand

Returns:
• newHand = the hand embedding the desired Synergy matrix
CHAPTER 5. LIST OF FUNCTIONS 71

References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGactivateSynergies

5.6.5 SGfingertips()
SGfingertips - evaluates fingertip positions
This function, for a given hand, evaluates the fingertips coordinates (forward kine-
matics of the hand)
Usage: ft = SGfingertips(hand)
Arguments:
• hand = the hand structure which fingertip positions are computed
Returns:
• ft = a matrix whose columns represent the coordinates of the fingertips
See also: SGmakehand, SGmakeFinger

5.6.6 SGjointStiffness()
SGjointStiffness - Defines a stiffness matrix for the joints of the hand
The function allows to define a stiffness matrix for the joints belonging to the hand
given as argument
Usage: newHand = SGjointStiffness(hand,stiffness)
Arguments:
• hand = the hand structure to which the joints belong
• stiffness = the stiffness values. This argument could be a scalar or a matrix with
te following semantics:
– scalar: the stiffness matrix will be a diagonal matrix with this value on the
main diagonal
– matrix: the stiffness matrix will be equal to this matrix
Returns:
• newHand = the hand with the desired joint stiffness
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
CHAPTER 5. LIST OF FUNCTIONS 72

M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-


gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGcontactStiffness, SGsynergystifness, SGquasistaticHsolution, SGforce-
Manipulability

5.6.7 SGmakeFinger()
SGmakeFinger - Create a finger
The function defines a finger structure from given arguments
Usage: finger = SGmakeFinger(DHpars, base, q)
Arguments:
• DHpars = n (number of joints) x 4 matrix containing Denavit Hartenberg param-
eters for each joint
• base = 4 x 4 homogeneous transformation matrix for the finger frame

• q = n x 1 vector containing values of joint variables


Returns:
• finger = the finger structure

See also: SGmakeHand

5.6.8 SGmakeHand()
SGmakehand - Create a hand
The function define a hand structure
Usage: hand = SGmakehand(F)
Arguments:
• F = array of finger structures defined by SGmakeFinger

Returns:
• hand = the hand structure
See also: SGmakeFinger

5.6.9 SGmakeObject()
SGmakeObject - create an object structure for a given hand
This function defines a structure object, given the contact points on the hand, the
object center (opt) and the contact normal directions.
Usage: [newHand,object] = SGmakeObject(hand,center,normals) Arguments:
• hand: a structure defining the hand structure
CHAPTER 5. LIST OF FUNCTIONS 73

• center(opt): object center coordinates


• normals: directions normal to the contact surface in the contact points
Returns:
• newhand: an updated structure of the hand
• object: a structure containing object data
See also: SGmakeHand, SGgraspMatrix, SGselectionMatrix

5.6.10 SGmoveHand()
SGmoveHand - Move a hand
The function move the finger joint imposing a displacement q. Returns the hand in
the new configuration.
Usage: hand = SGmoveHand(hand,q)
Arguments:
• hand = the hand structure to move
• q = the joint variables of the new hand configuration
• plot = this argument allows the user to plot the resulting movement of the hand
with the following semantic:
– ’initfinal’ = the initial and final positions of the hand are plotted
– ’final’ = only the final position of the hand is plotted
Returns:
• hand = the hand in the new configuration
See also: SGmakehand, SGmakeFinger

5.6.11 SGsynergyStiffness()
SGsynergyStiffness - Defines a stiffness matrix for the synergies of the hand
The function allows to define a stiffness matrix for the synergies defined on the
hand given as argument
Usage: hand = SGsynergyStiffness(hand,stiffness)
Arguments:
• hand = the hand on which the synergy matrix is defined
• stiffness = the stiffness values. This argument could be a scalar or a matrix with
te following semantics:
– scalar: the stiffness matrix will be a diagonal matrix with this value on the
main diagonal
CHAPTER 5. LIST OF FUNCTIONS 74

– matrix: the stiffness matrix will be equal to this matrix


Returns:
• newHand = the hand with the desired synergy activation stiffness
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGactivateSynergies

5.6.12 SGunblockjoints()
SGunblockjoints - The function activates the selected joints on a hand
Usage: hand = SGunblockjoints(hand,joints)
Arguments:
• hand: structure containing hand information

• joints: joints to be unlocked


Returns:
• hand: updated hand structure
See also: SGblockJoints

5.6.13 SGwristStiffness()
SGwristStiffness - Defines a six dimensional stiffness matrix for the wrist
The function allows to define a stiffness matrix for the wrist belonging to the hand
given as argument
Usage: newHand = SGjointStiffness(hand,stiffness)
Arguments:
• hand = the hand structure to which the joints belong

• stiffness = the stiffness values. This argument could be a scalar or a matrix with
te following semantics:
– scalar: the stiffness matrix will be a six dimensional diagonal matrix with
this value on the main diagonal
– matrix: the stiffness matrix will be equal to this matrix

Returns:
CHAPTER 5. LIST OF FUNCTIONS 75

• newHand = the hand with the desired wrist stiffness


References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGcontactStiffness, SGsynergystifness, SGjointstifness, SGquasistaticH-
solution, SGforceManipulability
CHAPTER 5. LIST OF FUNCTIONS 76

5.7 Sample hands


5.7.1 SG3Fingered()
SG3Fingered - a three fingered robotic hand
The function builds the three fingered hand model inspired by the Barrett Hand
Usage: hand = SG3Fingered
Arguments:
• -

Returns:
• hand = the hand structure
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGparadigmatic, SGDLRHandII, SGhuman24, SGmodularHand, SGun-
deractuated1

5.7.2 SGDLRHandII()
SGDLRHandII - model of the DLR hand II
The function builds the model of the DLR hand II
Usage: hand = SGDLRHandII
Arguments:
• -

Returns:
• hand = the hand structure
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGparadigmatic, SG3fingered, SGhuman24, SGmodularHand, SGunder-
actuated1
CHAPTER 5. LIST OF FUNCTIONS 77

5.7.3 SGhuman24()
SGhuman24 - a 24 DoF model of the human hand
The function builds the 24 DoF model of an anthropomorphic hand
Usage: hand = SGhuman24
Arguments:
• -

Returns:
• hand = the hand structure
References:
S. Cobos, M. Ferre, M. A. Sanchez-Urun, J. Ortego and R. Aracil. ”Human hand
descriptions and gesture recognition for object manipulation”. Computer Methods in
Biomechanics and Biomedical Engineering , Vol. 13, No. 3, pp. 305 - 317, 2009.
See also: SGparadigmatic, SG3fingered, SGDLRHandII, SGmodularHand, SGun-
deractuated1

5.7.4 SGmodularHand()
SGmodularhand - the model of a three-fingered, 9 DoF modular hand
The function builds the model of a three-fingered, 9 DoF modular hand
Usage: hand = SGmodularHand
Arguments:

• -
Returns:
• hand = the hand structure

References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGparadigmatic, SG3fingered, SGDLRHandII, SGhuman24, SGunder-
actuated1

5.7.5 SGparadigmatic()
SGparadigmatic - a 20 DoF model of the human hand
The function builds the 20 DoF model of an anthropomorphic hand
Usage: hand = SGparadigmatic
Arguments:
CHAPTER 5. LIST OF FUNCTIONS 78

• -
Returns:
• hand = the hand structure
References:
S. Cobos, M. Ferre, M. A. Sanchez-Urun, J. Ortego and R. Aracil. ”Human hand
descriptions and gesture recognition for object manipulation”. Computer Methods in
Biomechanics and Biomedical Engineering , Vol. 13, No. 3, pp. 305 - 317, 2009.
See also: SGparadigmatic, SG3fingered, SGDLRHandII, SGmodularHand, SGun-
deractuated1

5.7.6 SGunderActuated1()
SGunderActuated1 - model of an underactuated robotic hand
The function builds the model of an underactuated robotic hand
Usage: hand = SGunderactuated1
Arguments:
• -
Returns:

• hand = the hand structure


References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also: SGparadigmatic, SG3fingered, SGDLRHandII, SGmodularHand
CHAPTER 5. LIST OF FUNCTIONS 79

5.8 Utils
5.8.1 SGCFtau()
SGCFtau - Cost function that takes into account hand joint torques
This function evaluates cost function that takes into account hand joint torques
Usage: cost = SGCFtau(deltaz,hand,w,Kjoint)
The function allows to move the hand given as argument along a synergy or a
combination of synergies.
Arguments:
• deltazr = synergy reference variation
• hand = the hand structure
• object = the object structure
• w = external load
Returns:
• cost = cost function value
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
See also:

5.8.2 SGcheckAngle()
SGcheckAngle - check angles between contact forces and contact normals
This function evaluates the angles between contact forces and contact normal unit
vectors
Usage: out = SGcheckAngle(w,y,pG,E,n)
The function allows to move the hand given as argument along a synergy or a
combination of synergies.
Arguments:
• w = external load
• y = coefficients for the linear combination of E columns
• pG = grasp matrix pseudoinverse
• E = controllable internal force subspace
• n = contact normal (matriz 3xnc)
CHAPTER 5. LIST OF FUNCTIONS 80

Returns:
• out.theta = vector containing for each contact the angle between contact force
and contact normal
• out.Theta = sum of contact angles

References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011

5.8.3 SGcontactDetection()
SGcontactDetection - Detects a contact between the hand and the object
Usage: cp mat = SGcontactDetection(hand,struct,i)
Arguments:
• hand,struct = hand and object structures
• i = finger that is moving

Returns:
• cp mat = matrix with the contact points

5.8.4 SGcube()
SGcube - function that calculates cube data organized as a structure.
Function that calculates main data of a cylinder needed by grasping-related appli-
cations.
Usage: struct = SGcube(Htr,a,b,c)
Arguments:
• Htr = 4x4 homogeneous transformation describing cube position and orientation
• a,b,c = cube edge lengths
Returns:

• struct = a structure containing cube faces, cube vertex, face normals and face mid
points
See also: SGcloseHand, SGgraspPlanner, SGmakeObject
CHAPTER 5. LIST OF FUNCTIONS 81

5.8.5 SGcylinder()
Function that calculates main data of a cylinder needed by grasping-related applica-
tions.
Usage: out = SGcylinder(Htr,h,rad,shape,res)
Arguments:
• Htr = Homogeneous transformation

• h = height of the cylinder


• rad = radius
• shape = vector of linearly spaced percents of radius over height (more entries =
better resolution)

• res = number of points around circumference


Returns:
• out = cylinder structure
See also: SGsphere, SGcube

5.8.6 SGDHMatrix()
SGDHMatrix - Computes the Denavitt-Hartenberg homogeneous transformation ma-
trix
The function computes the D-H homogeneous transformation matrix following the
classical D-H convention
Usage: H = SGDHMatrix(v)
Arguments:

• v = a row of the matrix DHpars of a finger structure containing the D-H param-
eters
Returns:
• H = the D-H homogeneous transformation matrix

See also: SGsphere, SGcube

5.8.7 SGdrawCube()
SGdrawCube- Draws a cube whose parameters are defined in the structure struct
Usage: SGdrawCube(struc) Arguments:
• struc = a structure defined with the function SGcube
CHAPTER 5. LIST OF FUNCTIONS 82

5.8.8 SGdrawCylinder()
SGdrawCylinder- Draws a cylinder whose parameters are defined in the structure
struct
Usage: SGdrawCylinder(struc) Arguments:
• struc = a structure defined with the function SGcube

5.8.9 SGdrawPen()
SGdrawPen- Draws a pen for the handwriting examplet
Usage: pen=SGdrawPen(H,h,rad,res) Arguments:

• H = a 4x4 homogeneous transformation defining position and orientation of the


hand
• h = pen height
• rad = hand radius

• res = resolution for graphical representation

5.8.10 SGdrawSphere()
SGdrawSphere- Draws a sphere whose parameters are defined in the structure struct
Usage: SGdrawSphere(struc) Arguments:
• struc = a structure defined with the function SGsphere

5.8.11 SGfaceDetector()
SGfaceDetector - Define the contact point on the object
This function is used by grasp planner procedure and is called by SGcloseHand to
define the contact points on the object
Usage: face = SGfaceDetector(CP,obj)
Arguments:
• CP = contact point coordinates
• obj = the grasped object
Returns:

• face = an index varying from 1 to 6 indicating the cube face closest to the contact
point
See also: SGcloseHand, SGgraspPlanner, SGmakeObject
CHAPTER 5. LIST OF FUNCTIONS 83

5.8.12 SGgenerateCloud()
This function generates a cloud of N points along a sphere with center given by ob-
ject’s matrix H, with gauge G. Then creates an array of Homogeneous transformation
matrices for hand pose P is a 4*4*N matrix Sigma-World R.F.

5.8.13 SGgTildeMatrix()
SGgTildeMatrix - Computes the Gtilde matrix
The function computes the Gtilde matrix for the given contact points and object
center
Usage: Gtilde = SGgTildeMatrix(cp,ob)
Arguments:
• cp = the matrix containing the contac points locations
• ob = the center coordinates of the object to grasp
See also: SGjacobianMatrix, SGselectionMatrix, SGgraspMatrix

5.8.14 SGhMatrix()
SGhMatrix - Computes the Selection matrix
This function is used by SGselectionMatrix to build the H matrix
Usage: [H] = SGhMatrix(cn, ct)
Arguments:
• cn = normals to contact points
• Ct = type of contact:

– 1: hard finger (2D or 3D);


– 2: soft finger (2D or 3D);
– 3: complete constraint (2D or 3D);
See also: SGselectionMatrix

5.8.15 SGindexReduction()
Auxiliary function for SGintSegCube - index remapping function.

5.8.16 SGintSegCube()
This is an auxiliary function splitting the cube into its faces, retrieving vertices.
CHAPTER 5. LIST OF FUNCTIONS 84

5.8.17 SGintSegCyl()
This function evaluates contact between a segment and a cylinder, returning the corre-
sponding alpha parameter as the normalized position: alpha = 0 means the first point,
alpha = 1 means the second, if there aren’t any contact points, alpha = NaN. epsilon
could be absolute or radius-relative.
Usage: alpha = SGintSegCyl(seg,cyl,epsilon)
Arguments:
• seg: a structure containing the points defining the segment,
• cyl: a structure defining the cylinder
• epsilon: tolerance

5.8.18 SGintSegSph()
This function evaluates contact between a segment and a cylinder, returning the corre-
sponding alpha parameter as the normalized position: alpha = 0 means the first point,
alpha = 1 means the second, if there aren’t any contact points, alpha = NaN. epsilon
could be absolute or radius-relative.
Usage: alpha = SGintSegCyl(seg,cyl,epsilon)
Arguments:
• seg: a structure containing the points defining the segment,
• sph: a structure defining the sphere
• epsilon: tolerance

5.8.19 SGisFinger()
This function checks whether or not passed parameter is a finger.
Usage: isf = SGisFinger(finger)
Argument:
• finger: a structure containing finger parameters
Returns:
• isf: a parameter that assumes value 1 if the structure is a finger and 0 otherwise.

5.8.20 SGisHand()
This function checks whether or not passed parameter is a hand structure.
Usage: ish = SGisHand(hand)
Argument:
• hand: a structure containing hand parameters
Returns:
• ish: a parameter that assumes value 1 if the structure is a hand and 0 otherwise.
CHAPTER 5. LIST OF FUNCTIONS 85

5.8.21 SGisMatrix()
This is an auxiliary function that check if the passed input is a matrix or not.
Usage: ism = SGisMatrix(M)
Argument:
• M: a generic matrix
Returns:
• ism: a parameter that assumes value 1 if the structure is a matrix and 0 otherwise.

5.8.22 SGisObject()
SGisObject This is an auxiliary function that check if the passed input is an object
structure or not.
Usage: isob = SGisObject(object)
Argument:
• object: a generic structure
Returns:
• isob: a parameter that assumes value 1 if the structure is an object and 0 other-
wise.

5.8.23 SGisSeg()
SGisSeg -This is an auxiliary function that check if the passed input is a segment
structure or not.
Usage: isseg = SGisSeg(segment)
Argument:
• segment: a generic structure
Returns:
• isseg: a parameter that assumes value 1 if the structure is a segment and 0 other-
wise.

5.8.24 SGisVector()
SGisVector -This is an auxiliary function that check if the passed input is a vector or
not.
Usage: isv = SGisVector(v)
Argument:
• v: a generic variable
Returns:
• isv: a parameter that assumes value 1 if the structure is a vector and 0 otherwise.
CHAPTER 5. LIST OF FUNCTIONS 86

5.8.25 SGjoints()
SGjoints This is an auxiliary function that updates the positions of the joints in the
finger structure
Usage: newHand = SGjoints(hand)
Argument:
• hand: a generic hand structure
Returns:
• newhand: the updated hand structure.

5.8.26 SGlinkIntersection()
SGlinkIntersection - This is an auxiliary function that evaluates the intersection be-
tween the axis of a generic link, defined by a segment, and an object
Usage: alpha = SGlinkIntersection(seg,struct2,epsilon)
Argument:
• seg: a generic segment structure
• struc2: a generic object structure (sphere, cylinder or cube)
• epsilon: tolerance
Returns:
• alpha: a parameter indicating the position of the intersection on the link axis.

5.8.27 SGplotCube()
SGplotCube - This is an auxiliary function that plots a cube with the given parameters
on the current plot
Usage: SGplotCube(cube)
Argument:
• cube: a cube structure
Returns:
• add the plot of the cube in the current figure.

5.8.28 SGplotCylinder()
SGplotCylinder - This is an auxiliary function that plots a cylinder with the given
parameters on the current plot
Usage: SGplotCylinder(cylinder)
Argument:
• cylinder: a cylinder structure
Returns:
• add the plot of the cylinder in the current figure.
CHAPTER 5. LIST OF FUNCTIONS 87

5.8.29 SGplotSeg()
SGplotSeg -This is an auxiliary function that plots a segment with the given parameters
on the current plot
Usage: SGplotSeg(seg)
Argument:
• seg: a segment structure
Returns:
• add the plot of the segment in the current figure.

5.8.30 SGplotSolid()
SGplotSolid - This is an auxiliary function that plots a generic solid (sphere, cylinder
or cube) with the given parameters on the current plot
Usage: SGplotSolid(solid)
Argument:
• solid: a solid(sphere, cylinder or cube) structure
Returns:
• add the plot of the solid in the current figure.

5.8.31 SGplotSphere()
SGplotSphere - This is an auxiliary function that plots a sphere with the given param-
eters on the current plot
Usage: SGplotSphere(sphere)
Argument:
• sphere: a sphere structure
Returns:
• add the plot of the sphere in the current figure.

5.8.32 SGpointInCube()
SGpointInCube - This is an auxiliary function that checks if a generic point is inside
a given cube solid structure or not.
Usage: res = SGpointInCube(p,cube)
Argument:
• p: a three dimensional vector containing the coordinates of a generic point
• cube: a cube structure
Returns:
• res: an integer variable assuming value 1 if the point is inside the cube and 0
otherwise.
CHAPTER 5. LIST OF FUNCTIONS 88

5.8.33 SGpointInCylinder()
SGpointInCylinder - This is an auxiliary function that checks if a generic point is
inside a given cylinder solid structure or not.
Usage: res = SGpointInCylinder(p,cyl)
Argument:
• p: a three dimensional vector containing the coordinates of a generic point

• cyl: a cylinder structure


Returns:
• res: an integer variable assuming value 1 if the point is inside the cylinder and 0
otherwise.

5.8.34 SGpointInSphere()
SGpointInSphere - This is an auxiliary function that checks if a generic point is inside
a given sphere solid structure or not.
Usage: res = SGpointInSphere(p,sph)
Argument:
• p: a three dimensional vector containing the coordinates of a generic point
• sph: a sphere structure

Returns:
• res: an integer variable assuming value 1 if the point is inside the sphere and 0
otherwise.

5.8.35 SGrotx()
SGrotx - evaluates rotation matrix corresponding to a rotation along x axis
Usage: R= SGrotx(x)
Argument:

• x: the rotation angle (in radians)


Returns:
• R: the 3x3 rotation matrix
See also: SGroty, SGrotz, SGtransl
CHAPTER 5. LIST OF FUNCTIONS 89

5.8.36 SGroty()
SGroty - evaluates rotation matrix corresponding to a rotation along x axis
Usage: R= SGroty(y)
Argument:
• y: the rotation angle (in radians)
Returns:

• R: the 3x3 rotation matrix


See also: SGrotx, SGrotz, SGtransl

5.8.37 SGrotz()
SGrotz - evaluates rotation matrix corresponding to a rotation along z axis
Usage: R= SGrotz(z)
Argument:

• z: the rotation angle (in radians)


Returns:
• R: the 3x3 rotation matrix
See also: SGrotx, SGroty, SGtransl

5.8.38 SGsantelloSynergies()
SGsantelloSynergies - This function loads synergy and mean configuration data for
the 20 DoF model of the human hand.
Usage: [qm, S] = SGsantelloSynergies
Returns:
• qm: a 20x1 vector containing joint angles in the mean configuration
• S: a 20x15 matrix containing postural synergies obtained from a PCA on exper-
imental data.
References:
D. Prattichizzo, M. Malvezzi, A. Bicchi. On motion and force controllability of
grasping hands with postural synergies. In Robotics: Science and Systems VI, pp.
49-56, The MIT Press, Zaragoza, Spain, June 2011
M. Gabiccini, A. Bicchi, D. Prattichizzo, M. Malvezzi. On the role of hand syner-
gies in the optimal choice of grasping forces. Autonomous Robots, Springer, 31:235-
252, 2011
M. Santello, M. Flanders, and J. F. Soechting, Postural hand synergies for tool use,
The Journal of Neuroscience, vol. 18, pp. 1010510115, December 1998.
CHAPTER 5. LIST OF FUNCTIONS 90

5.8.39 SGsegment()
SGsection - Creates a segment structure for two given points
This function, given the coordinates of two generic points, creates a segment struc-
ture.
Usage: struc = SGsegment(p0,p1)
Arguments:
• p0, p1: two three dimensional vectors defining the coordinates of segment ex-
treme points
Returns:
• struc: a structure variable defining the segment, whose fields are
– struc.p1: initial point
– struc.p2: final point
– struc.type: a string variable whose value is ’seg’
See also: SGisSeg, SGintSegCube, SGintSegSph, SGintSegCyl.

5.8.40 SGskew()
SGskew - Computes the Skew matrix.
The function computes the Skew matrix of a given vector
Usage: S = SGskew(t)
Arguments:
• t = 3 x 1 or 1 x 3 vector
Returns::
• S: a 3x3 skew matrix corresponding to vector t.
See also: SGrotx, SGroty, SGrotz

5.8.41 SGsphere()
SGsphere - Generates a spherical object
This function calculates main data of a sphere used by grasping-related applica-
tions.
Usage: struct = SGsphere(Htr,rad,res)
Arguments:
• H = homogeneous transformation
• rad = radius
• res = number of points on the external surface
Returns:
• struc: a structure containing sphere parameters
See also: SGgenerateCloud, SGcloseHand, SGevaluateOffset
CHAPTER 5. LIST OF FUNCTIONS 91

5.8.42 SGtransl()
SGtransl - Evaluate the homogeneous transformation matrix corresponding to a trans-
latiion
Usage: T = SGtransl(p)
Arguments:
• p: a three dimensional vector specifying the components of the displacement

Returns:
• T: a 4x4 homogeneous matrix corresponding to the translation
See also: SGrotx, SGroty, SGrotz
CHAPTER 5. LIST OF FUNCTIONS 92

Table 5.1: List of the main functions in SynGrasp.

Function
Available hand models
SGparadigmatic define the paradigmatic hand model
SGmodularHand define the modular hand model
SG3Fingered define the Barrett-like hand model
SGDLRHandII define the DLR-HIT Hand II model
Graphics and GUI
SGplotHand draw the hand in a selected configuration
SGplotSyn shows the motion generated by a synergy
SGplotObject plot an object and the contact points
Syngrasp GUI open the GUI
SGplotCylinder plot a cylinder
SGplotCube plot a cube
SGplotSphere plot a sphere
Modeling
SGmakeHand define hand structure
SGmakeFinger define finger structure and parameters
SGmoveHand move the hand in a selected configuration
SGdefineSynergies define the synergy matrix
SGactivateSynergies activate a synergy or a group of synergies
SGmakeObject define a structure for the grasped object
SGsynergyStiffness define the synergy stiffness
SGsantelloSynergies define the synergies for the human hand model
SGjointStiffness define the joint’s stiffness
SGcontactStiffness define the stiffness at contacts
Grasp definition
SGaddContact define a contact point
SGaddFtipContact add a contact at the fingertips
SGgraspPlanner activate the grasp planner
SGselectionMatrix define selection matrix
SGgraspMatrix define grasp matrix
SGjacobianMatrix define the Jacobian matrix
Grasp analysis
SGquasistatic solve the quasi–static grasp linear system
SGquasistaticMaps evaluates the linear i/o mapping matrices
SGgraspAnalysis internal force and motion subspaces
SGrbMotions evaluate the object rigid body motions
SGkinManipulability performs kinematic manipulability analysis
SGforceManipulability performs force manipulability analysis
SGquasistaticHsolution analysis of quasistatic grasp model
SGVcost cost function for grasp force closure
SGcheckFriction evaluates the friction constraints
SGcheckAngle contact force and normal vectors angles
SGCFtau defines a cost function for joint effort
Chapter 6

Conclusion

This guide presents the main features of SynGrasp, a MATLAB toolbox for the anal-
ysis of human and robotic grasps in presence of underactuation and compliance. The
toolbox functions were developed to allow a simple and intuitive analysis of the grasp
properties, e.g. controllable force and motion, manipulability and grasp quality mea-
sures, in both fully and underactuated robotic hands. The tool is designed to integrate
in the hand model a kinematic coupling between joints, as those provided in the syner-
gistic organization of the human hand or due to the mechanical or control constraints
implemented in the design of robotic hands. The possible applications of the SynGrasp
toolbox range from the analysis of the human hand for studies in neuroscience, to the
design and optimization of robot hands. The toolbox is developed as a collection of
MATLAB functions and does not require any external packages to be used. Its struc-
ture is suitable for the integration with other tools, e.g. optimization, data analysis,
dynamic simulations, 3D representation and animation. The toolbox provides several
utility functions for a simple graphical representation of the hand, the object, and the
main analysis results.

93
Bibliography

[1] J. Napier, “The prehensile movements of the human hand,” Journal of bone and
joint surgery, vol. 38, no. 4, pp. 902–913, 1956.
[2] A. Wing, P. Haggard, and J. Flanagan, Hand and brain: the neurophysiology and
psychology of hand movements. Academic Pr, 1996.
[3] D. Prattichizzo and J. Trinkle, “Chapter 28: Grasping,” in Handbook on Robotics
(B. Siciliano and O. Kathib, eds.), pp. 671–700, Springer, 2008.
[4] R. Murray, Z. Li, and S. Sastry, A mathematical introduction to Robotic Manipu-
lation. CRC Press, 1994.
[5] A. Bicchi, “Hands for dextrous manipulation and robust grasping: a difficult road
towards simplicity,” IEEE Trans. on Robotics and Automation, vol. 16, pp. 652–
662, December 2000.
[6] D. Prattichizzo, M. Malvezzi, M. Gabiccini, and A. Bicchi, “On the manipula-
bility ellipsoids of underactuated robotic hands with compliance,” Robotics and
Autonomous Systems, Elsevier, 2012.

[7] MATLAB and Simulink for Technical Computing, [Online]: http://www.


mathworks.com/.
[8] F. Chinello, S. Scheggi, F. Morbidi, and D. Prattichizzo, “Kuka control toolbox,”
Robotics & Automation Magazine, IEEE, vol. 18, no. 4, pp. 69–79, 2011.
[9] P. Corke, “A Robotics Toolbox for MATLAB,” IEEE Rob. Autom. Mag., vol. 3,
no. 1, pp. 24–32, 1996.
[10] G. Mariottini and D. Prattichizzo, “EGT for Multiple View Geometry and Vi-
sual Servoing: Robotics and Vision with Pinhole and Panoramic Cameras,” IEEE
Robot. Autom. Mag., vol. 12, no. 4, pp. 26–39, 2005.

[11] “The - the hand embodied.” [On-line]: www.thehandembodied.eu.


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

94
BIBLIOGRAPHY 95

[13] D. Prattichizzo, M. Malvezzi, and A. Bicchi, “On motion and force controllability
of grasping hands with postural synergies,” in Proceedings of Robotics: Science
and Systems, (Zaragoza, Spain), June 2010.
[14] “The grasp robotic toolbox.” [On-line]: http://rtss.hg.sourceforge.
net/hgweb/rtss/matlab/ http://rtss.hg.sourceforge.net/
hgweb/rtss/scilabthe/.
[15] M. Gabiccini, A. Bicchi, D. Prattichizzo, and M. Malvezzi, “On the role of hand
synergies in the optimal choice of grasping forces,” Autonomous Robots, vol. 31,
no. 2, pp. 235–252, 2011.

[16] J. Butterfass, M. Grebenstein, H. Liu, and G. Hirzinger, “DLR-hand II: next gen-
eration of a dextrous robot hand,” in Robotics and Automation, 2001. Proceedings
2001 ICRA. IEEE International Conference on, vol. 1, pp. 109–114, 2001.
[17] A. Bicchi, “On the closure properties of robotic grasping,” The Int. J. of Robotics
Research, vol. 14, no. 4, pp. 319–334, 1995.

[18] G. Baud-Bovy, D. Prattichizzo, and N. Brogi, “Does torque minimization yield a


stable human grasp?,” in Multi-Point Physical Interaction with Real and Virtual
Objects (F. Barbagli, D. Prattichizzo, and K. Salisbury, eds.), STAR, Springer
Tracts in Advanced Robotics, Springer, 2005.
[19] T. Yoshikawa, “Manipulability of robotic mechanisms,” The International Jour-
nal of Robotics Research, vol. 4, pp. 3–9, June 1985.
[20] B. Siciliano, L. Sciavicco, L. Villani, and G. Oriolo, Robotics: Modelling,
Planning and Control. Advanced Textbooks in Control and Signal Processing,
Springer, 2008.
[21] S. Chen and I. Kao, “Conservative congruence transformation for joint and carte-
sian stiffness matrices of robotic hands and fingers,” The international Journal of
Robotics Research, vol. 19, pp. 835–847, sep 2000.
[22] M. Cutkosky and I. Kao, “Computing and controlling the compliance of a robotic
hand,” IEEE Transaction on Robotics and Automation, vol. 5, no. 2, pp. 151–165,
1989.

[23] J. Salisbury and J. J. Craig, “Articulated hands, force control and kinematic is-
sues,” The International Journal of Robotics Research, vol. 1, pp. 4–17, June
1982.
[24] A. Bicchi and D. Prattichizzo, “Manipulability of cooperating robots with passive
joints,” in Proc. IEEE Int. Conf. Robot. Automat, (Leuven, Belgium), pp. 1038–
1044, May 1998.
[25] A. Bicchi and D. Prattichizzo, “Analysis and optimization of tendinous actuation
for biomorphically designed robotic systems,” Robotica, vol. 18, no. 1, pp. 23–31,
2000.
BIBLIOGRAPHY 96

[26] R. Suárez, J. Cornellà, and M. R. Garzón, Grasp quality measures. Institut


d’Organització i Control de Sistemes Industrials, 2006.
[27] Z. Li and S. S. Sastry, “Task-oriented optimal grasping by multifingered robot
hands,” IEEE Trans. Robot., vol. 4, no. 1, pp. 32–44, 1988.

[28] K. B. Shimoga, “Robot grasp synthesis algorithms: A survey,” Int. J. Robot. Res.,
vol. 15, no. 3, pp. 230–266, 1996.
[29] C. A. Klein and B. E. Blaho, “Dexterity measures for the design and control of
kinematically redundant manipulators,” Int. J. Robot. Res., vol. 6, no. 2, pp. 72–
83, 1987.

[30] J. K. Salisbury and J. J. Craig, “Articulated hands force control and kinematic
issues,” Int. J. Robot. Res., vol. 1, no. 1, pp. 4–17, 1982.
[31] B.-H. Kim, S.-R. Oh, B.-J. Yi, and I. H. Suh, “Optimal grasping based on non-
dimensionalized performance indices,” in Proc. IEEE/RSJ Int. Conf. Intel. Robots
Syst, vol. 2, pp. 949–956, IEEE, 2001.

[32] T. Wimbock, B. Jahn, and G. Hirzinger, “Synergy level impedance control for
multifingered hands,” in Proc. IEEE/RSJ Int. Conf. Intel. Robots Syst, pp. 973–
979, IEEE, 2011.
[33] G. Palli, C. Melchiorri, G. Vassura, U. Scarcia, L. Moriello, G. Berselli, A. Cav-
allo, G. De Maria, C. Natale, S. Pirozzi, et al., “The dexmart hand: Mecha-
tronic design and experimental evaluation of synergy-based control for human-
like grasping,” Int. J. Robot. Res., vol. 33, no. 5, pp. 799–824, 2014.
[34] G. Gioioso, G. Salvietti, M. Malvezzi, and D. Prattichizzo, “Mapping synergies
from human to robotic hands with dissimilar kinematics: an approach in the ob-
ject domain,” IEEE Trans. Robot., 2013.
[35] “The - the hand data corpus repository.” [On-line]: http://www.
handcorpus.org/.
[36] J. Shim, A. Hooke, Y. Kim, J. Park, S. Karol, and Y. Kim, “Handwriting: Hand–
pen contact force synergies in circle drawing tasks,” Journal of biomechanics,
vol. 43, no. 12, pp. 2249–2253, 2010.
[37] F. Freeman, The Handwriting Movement: A Study of the Motor Factors of Excel-
lence in Penmanship. The University Press, 1918.
[38] G. Gioioso, G. Salvietti, M. Malvezzi, and D. Prattichizzo, “An object-based ap-
proach to map human hand synergies onto robotic hands with dissimilar kinemat-
ics,” in Robotics: Science and Systems VIII, Sidney, Australia: The MIT Press,
July 2012.
[39] L. U. Odhner and A. Dollar, “Dexterous manipulation with underactuated robotic
hands,” in Proc. IEEE Int. Conf. Robot. Automat, (Shanghai. China), 2011.
BIBLIOGRAPHY 97

[40] L. Birglen, T. Lalibertè, and C. Gosselin, Underactuated Robotic Hands, vol. 40


of Springer Tracts in Advanced Robotics. Springer, 2008.
[41] D. Prattichizzo, M. Malvezzi, M. Gabiccini, and A. Bicchi, “On motion and force
controllability of precision grasps with hands actuated by soft synergies,” IEEE
Transactions on Robotics, vol. 29, no. 6, pp. 1440–1456, 2013.

[42] M. Malvezzi and D. Prattichizzo, “Internal force control with no object motion
in compliant robotic grasps,” in Intelligent Robots and Systems (IROS), 2011
IEEE/RSJ International Conference on, pp. 1008–1014, September 2011.
[43] D. Prattichizzo, M. Malvezzi, M. Aggravi, and T. Wimbock, “Object motion-
decoupled internal force control for a compliant multifingered hand,” in Proc.
IEEE Int. Conf. on Robotics and Automation, pp. 1508–1513, 2012.
[44] G. Salvietti, M. Malvezzi, G. Gioioso, and D. Prattichizzo, “On the use of homo-
geneous transformations to map human hand movements onto robotic hands,” in
Proc. IEEE Int. Conf. on Robotics and Automation, no. 0, (Hong Kong, China),
pp. 5352–5357, 2014.

[45] M. Malvezzi and D. Prattichizzo, “Evaluation of grasp stiffness in underactuated


compliant hands,” in Proc. 2013 IEEE International Conference on Robotics and
Automation (ICRA), no. 0, (Karlsruhe, Germany), pp. 2074–2079, 2013.
[46] D. Prattichizzo, G. Salvietti, F. Chinello, and M. Malvezzi, “An object-
based mapping algorithm to control wearable robotic extra-fingers,” in Proc.
IEEE/ASME Int. Conf. on Advanced Intelligent Mechatronics, (Besanon, France),
pp. 1563–1568, 2014.
[47] D. Prattichizzo, L. Meli, and M. Malvezzi, “Digital handwriting with a finger or
a stylus: a biomechanical comparison,” IEEE Transactions on Haptics. In press,
no. 0, 2015.
[48] G. Salvietti, M. Malvezzi, G. Gioioso, and D. Prattichizzo, “Modeling compli-
ant grasps exploiting environmental constraints,” in Proc. IEEE Int. Conf. on
Robotics and Automation, (Seattle, USA), 2015.