An approach to object-level stiffness regulation of hand-arm systems subject to under-actuation constraints

When using a tool with a robotic hand-arm system, the stiffness at the grasped object plays a key role in the interaction with the environment, allowing the successful execution of the task. However, the rapidly increasing use of under-actuated hands in robotic systems due to their robustness and simplicity of control, pose limitations to the achievable object-level stiffness. Indeed, due to the serial coupling of the hand and the arm, the resulting object-level stiffness is determined by the most compliant of both elements. To address this problem, we propose a novel controller that takes into account the limited achievable geometry of the object stiffness ellipsoid given by a hand with under-actuation constraints, and exploits the contribution of the robotic arm in reshaping the ﬁnal stiffness towards the desired proﬁle. The under-actuation is illustrated by a coordinated stiffening of the hand ﬁngers. The proposed method is experimentally validated by a hand-arm system performing a peg-in-hole task.


Introduction
Collaborative robotics is a rapidly emerging technology, as an increasing number of industries are seeking for flexible automation systems to become competitive (Ajoudani et al. 2018). These robotic systems are envisaged to work together with their human co-workers in order to perform a wide range of tasks in a productive and flexible way, which usually involve manipulation and interaction. They must therefore contain: a robotic end-effector able to perform the manipulation (e.g.: robotic hands, grippers, suction cups) and a robotic arm driving such end-effector along the task workspace (e.g., see Fig. 1). When dealing with human-like manipulation scenarios, robotic hands are usually preferred due to their increased manipulability and dexterity. Several studies have investigated the potential of such hand-arm systems, mainly focusing on the control of the position, orientation, and force This work is supported in part by the EU H2020 Project "SOPHIA" (No. 871237 at the object or arm end-effector level (Bae et al. 2006;Nagai and Yoshikawa 1995). Still, when tackling the collaborative scenarios, safe and controlled interactions become crucial requirements of the system. To this end, impedance control frameworks have been proposed with considerable advantages when dealing with unstructured environments and in human-robot interaction scenarios (Albu-Schaffer et al. 2003).
Nevertheless, impedance controllers for hand-arm systems have been scarcely studied. In Wimbock et al. (2007), an object-level custom-built impedance control for humanoid robots with two arms and two hands was presented. This method was designed for a fully controllable body-hand-arm system and neglected the rolling effects of fingers. Similary, Nagai and Yoshikawa (1995) and Ott et al. (2006) developed impedance controllers where the overall system compliance was mainly driven by the arms, and the hands were used to provide a firm grasp of the objects. The full-controllability of the high number of degrees of freedom (DOF) of the hands used in these systems allows fine manipulation tasks to be executed. However, it implies an increasing complexity not only in the design and its related cost, but also from the control point of view. This high complexity underlies the problems to deploy these systems in real industrial and human-robot interaction environments. To overcome this obstacle, soft and under-actuated hands embedding structural compliance are being developed which can deal with simple grasping tasks and safety needs while using a reduced number of actuators (Catalano et al. 2014;Deimel and Brock 2016). From the control point of view, coordinated movements known as postural hand synergies have been investigated as a way to tackle the problem of control redundancy (Catalano et al. 2014). Nevertheless, these under-actuated hands are being mainly used to perform full closure around the object (Ajoudani et al. 2013;Peternel and Ajoudani 2017), providing a limited control of the grasp stiffness. Therefore, when attached to an arm, the resulting behaviour between the object and the environment is mostly defined by the arm interaction parameters.
Fine manipulation tasks however, may require more complex grasps. For instance, in works such as Kim et al. (2001) and Friedman and Flash (2007), the hand grasp compliance and kinematics that are required to execute a task were studied. Indeed, when using a tool for a particular task, both the grasping points and impedance must be properly selected to obtain the desired interaction (Friedman and Flash 2007). For example, when making a hole in a surface with a punch, the system should be stiff along the punch handle direction. Instead, in a fine painting task, the grasp should be stiff on the plane parallel to the wall, while being compliant in the perpendicular direction to the surface to comply with the disturbances caused by the wall irregularities.
In this work we present a controller to regulate the objectlevel stiffness for manipulation tasks using fingertip grasps with a hand-arm system subject to under-actuation principles at the hand level. To illustrate a possible application scenario, we use the case of the Common-Mode-Stiffness (CMS) and Configuration-Dependent-Stiffness (CDS) under-actuated principles for the hand. Assuming an ellipsoidal representation of the grasp stiffness (Mussa-Ivaldi et al. 1985), such an ellipsoid is defined by the directions of the major axes (geometry of the ellipsoid), and its overall volume. In this framework, CMS provides a synergistic stiffening of the finger joints, i.e., only one parameter is required to modify all the joints, leading to an increase/decrease of the ellipsoid volume (Rossi et al. 2015). The axes directions can be changed in a more energy-efficient way by varying the fingers posture (CDS) (Milner and Franklin 1998). In previous works, we developed two different methods providing a large manipulability range while using the CMS/CDS bio-inspired concepts (Ruiz Garate et al. 2018b, a). The implementation of the CMS principle limits the number of required control inputs to achieve complex manipulation tasks, having control references simplified from 2 × n parameters to only n + 1, where n is the number of DOF of the hand. However, this under-actuation principle results in a limited range of stiffness geometries reachable by the hand while maintaining the grasp points, potentially constraining the overall behaviour of the hand-arm system. Therefore, focusing on the limitations given by the hand, the proposed controller first finds a suitable grasp posture to best fulfil the interaction requirements in terms of object-level stiffness for a particular task. An arm Cartesianimpedance controller is then used to position the object as required to perform the task. Moreover, the impedance controller of the arm serves to regulate the obtained hand stiffness as needed for the task. Hence, the main contributions of this work can be summarized as: the formulation of a control strategy to regulate the object-level stiffness for hand-arm systems subject to under-actuation principles, and the adaptation of the grasp stiffness control in (Ruiz Garate et al. 2018a) to a new scenario with a moving hand base attached to a robotic arm.
The following Sects. 2 and 3 present the object-level handarm stiffness problem and the methodology proposed for the studied under-actuated case, respectively. Section 4 describes the experimental validation and Sect. 5 discuss the results and limitations of the proposed method. Finally, Sect. 6 draws the main conclusions and future work.

Problem definition
In a hand-arm system, both elements contribute to the overall stiffness required to perform the task. Moreover, when interacting with the environment, an appropriate positioning of the tool with respect to it is required. Hence, it is more suitable to define the grasp stiffness parameters at the object/tool frame level, rather than in the world frame. This object-level stiff-ness obj K ∈ R 6×6 can be computed from the one expressed in the world frame w K ∈ R 6×6 (Ruiz Garate et al. 2018a, b) by means of the rotation matrix from the object frame to the world frame w R obj : where w R obj can be extracted from the transformation matrix from the object frame to the world frame w T obj . The procedure to obtain w T obj at each system configuration is described later in Sect.
3.4 (6). Using (1), the stiffness at the end-effector of the arm and the grasp stiffness provided by the hand, can be expressed in the object frame as obj K arm and obj K hand ∈ R 6×6 , respectively. Being the inverse of stiffness the compliance, the principles of serial springs can be applied to the corresponding compliance matrices ( obj C arm and obj C hand ∈ R 6×6 ), to retrieve the overall system compliance: Hence in terms of the overall system stiffness: The resulting object-level stiffness obj K of the hand-arm system can be represented by a stiffness ellipsoid characterised by a particular geometry (defined by the ellipsoid axes orientation), and ellipsoid volume (given by the magnitude of the main ellipsoid axes). From (2), it is straightforward that the final system compliance is of the order of magnitude of the most compliant element. Thus, even if one of both element's stiffness (hand or arm) is increased to its maximum, if the other remains compliant the overall system will behave in a compliant way.
Based on this dependency, the presented work focuses on obtaining a desired obj K given the under-actuation constraints imposed by the hand. These limitations are illustrated by the same CMS/CDS under-actuation control principles as in Ruiz Garate et al. (2018a, b). Consequently, the maximum achievable stiffness is not only constrained by the maximum synergistic joint stiffness, but also by the range of feasible hand poses maintaining the grasp points. Thus, the resulting stiffness ellipsoid of the hand-arm system at the object-level is constrained by that of the hand. If for a particular task the system needs to be stiff in a pre-defined direction, the problem can be divided as follows: Fig. 2 a Simulated hand-arm system with the main frames. W , Obj, Hand, and Ar m stand for the world, object, hand base, and arm end-effector frames, respectively. b Experimental set-up at the initial configuration 1. Find the hand configuration maximizing the object-level stiffness in the required direction for the execution of the task; 2. Configure the arm to locate the object (and the achieved stiffness geometry) subject to the task constraints; 3. Adjust the arm Cartesian stiffness to tune the handinduced object-level stiffness towards the desired one.

Modelling the hand-arm system
For the following simulations and experiments the torquecontrolled 7 DOF Franka-Emika GmbH robotic arm, 2 and the Allegro Hand (SimLab Co., Ltd.), 3 a 4-fingered robotic hand with 16 independent joints (Lee et al. 2017), are used. The hand is attached to the end-point of the robotic arm using a custom-made flange. Figure 2 shows an example of the real and modelled initial configuration of the hand-arm system and the main reference frames used during the development of the method.
To model the hand-arm system, the Syngrasp software (Malvezzi et al. 2015) with Matlab 2017a (The MathWorks Inc.) is used. This modelling is required in order to find the hand configuration giving the highest stiffness in the desired directions at the object-level and to build a stable trajectory towards it. Using this software, the arm can be also modelled as a one finger hand, and the actual hand base location can be defined from the arm end-effector one. Note that an extra fixed link is modelled on the arm to account for the flange connecting the arm to the hand. Moreover, a constant trans- (1) The arm Cartesian impedance controller is described in Balatti et al. (2019) formation matrix T r is defined that connects the hand base (Hand) and the arm end-effector (Ar m) frames (Fig. 2a). Hence, for each different arm configuration, the transformation matrix between the hand base and the world frames is computed as:

Hand-arm object-level stiffness overview
In this work the arm is considered as fully controllable and is the one guiding the task execution. The Cartesian impedance controller developed in Balatti et al. (2019) is used to achieve a desired stiffness profile w K arm with respect to the world frame. Otherwise, the hand grasp stiffness is defined in the world frame as (Bicchi 1994): where J hand ∈ R 3n c ×n q is the hand Jacobian matrix and n q , n c the total number of finger joints in the hand and the number of contact points on the object, respectively. C s ∈ R 3n c ×3n c is the structural compliance matrix and G ∈ R 6×3n c is the grasp matrix. K q = diag{[K q, f 1 . . . K q, f n c ]} ∈ R n q ×n q is a diagonal matrix representing the joint stiffness, where for every is the number of joints of the finger, α is the synergistic stiffness parameter (Nm/rad), and Γ f is a constant normalised vector implementing the coordinated stiffening of the hand fingers (CMS) (Rossi et al. 2015). As mentioned before, the hand under-actuation principle here is based on our previous work in Ruiz Garate et al. (2018a). Figure 3 displays the diagram of the proposed objectlevel stiffness controller. It receives as inputs: (i) the desired object/tool configuration (defined by the task) and given by the rotation matrix from the object to the world frame w R obj,d , (ii) the desired object-level stiffness obj K d , (iii) the hand fingers workspace WS, and (iv) the initial hand grasp.
Therefore, given the under-actuation constrains of the hand and a desired task-based stiffness at the object level, the method first attempts to find the hand configuration that maximizes the stiffness in the required directions by the task. Next, the arm is configured to locate the object and the resulting stiffness geometry in a direction that the tasks requirements call for a stiff response. Finally, the arm Cartesian stiffness controller tunes the resulting grasp stiffness (in the object coordinates) towards the pre-defined, desired profile.
The main elements of this control scheme are detailed in the following subsections. It must be noted that, for the hand controller, we follow the consideration that the encoder readings of the fingers' joints positions are the only sensory information available. Consequently, the following assumptions are made: (i) we focus on fingertip grasps, and (ii) the object is considered to be attached to the thumb so that its location can be retrieved (Sundaralingam and Hermans 2019). Moreover, it must be noted that (5) considers the ideal contact model in Bicchi (1994), neglecting the geometric terms due to the Jacobian variations (Chen and Kao 2000). To do so, we consider a high structural stiffness (see Sect. 4.1.3), no preloading of the joints, and quasi-static conditions for the hand with sufficiently small movements (Malvezzi and Prattichizzo 2013). Moreover, this method focuses on maintaining the contact points constant, which together the quasi-static assumption allows to neglect the variations on the grasp matrix.

Stabilization of the initial grasp
The initial grasp serves first to define the contact points. These are used as constraints in the exploration to find compatible grasp configurations (CDS). Then, for the initial and subsequent grasps a hand configuration is found that squeezes the object and stabilizes it as explained in Ruiz Garate et al. (2018a). This is achieved by an optimization process where a cost function based on the index of Potential Contact Robustness (PCR) is maximized (Pozzi et al. 2017). As an overview, this optimization computes a set of internal forces such that the contact forces λ c = −G # w + Ey are as far as possible from their friction cone limits. w stands for the external wrench applied and E represents the basis of the controllable subspace of internal forces. y is a vector that parametrizes the homogeneous part of the solution of the equation w = −Gλ c . The external wrench takes into account the weight of the object, therefore avoiding slippage due to the payload. Thus, the PCR index is based on the distance of the contact forces from the friction cone boundaries, and increases as the grasp becomes more robust: min is the minimum normal contact force and σ max is the maximum singular value (Pozzi et al. 2017).

Search of hand compatible configurations
From the fingers workspace ( Fig. 3), compatible configurations keeping similar fingertip locations as the initial ones are stored in Q c . This selection is based on: (i) the hand physical constraints on the tool location, and (ii) the distance from the object center to the fingertips.
As the object is considered to be attached to the thumb (Sundaralingam and Hermans 2019), the object frame with respect to the thumb remains invariant from the initial one: thumb T obj,0 = ( w T thumb,0 ) −1 w T obj,0 . Thus, for each possible thumb configuration q thumb,i in the workspace, the object is located by means of the transformation from its origin frame to the world frame w T obj,i . Then, the fingers' position with respect to the object obj P f ,i is retrieved: where the values of w T thumb,i and w P f ,i can be obtained using the D-H parameters of the hand and solving the forward kinematics. From all these possible computed object locations, a first selection is done in which only those that result in a reasonable object location are considered. That is, if the part of the object which is going to interact with the environment is oriented towards the hand palm, it would be an inoperative configuration, and therefore it is discarded. For this, the vector obtained from the object frame ( w T obj,i ), and pointing from its center to the tool's area of interest center operative center is analysed. The angle of this vector with respect to the main 3 hand base axes (given by its transformation matrix with respect to the world w T hand ) is computed (see Fig. 2a). Figure 4 shows the allowed locations in an schematic way. Additional margins are given in order to assure that no collision happens. The selected regions span from −30 and −150 deg about the hand's x axis (in the yz plane), and between ±135 and ±180 deg about the y one (in the zx plane).
Afterwards, configurations in which obj P f ,0 − obj P f ,i < p t mm are stored in Q c = {q 1 , q 2 , . . . , q c }, where p t is a threshold based on the fingertips dimensions to allow a certain movement around the initial contact point. This process outputs all the possible hand configurations that hold similar contact points to the initial ones and result in a reasonable tool orientation. Thus, it provides the basis of the CDS control with the different grasp stiffness ellipsoid orientations at the object level. It must be noted that these hand configurations are found in a generic hand base location at which primarily the workspace is evaluated. We denoted the transformation matrix from the hand base frame at this general configuration with respect to the world as w T hand,b .

Selection of stable configurations
This step searches which of the previously found possible final configurations Q c are stable at: (i) the initial arm endeffector location, and (ii) the computed end-effector location to place the object as required by the task ( w R obj,d ). As the location of the object changes to be compatible with the task to be performed (e.g., orient object in a vertical position to do a peg-in-hole task on a table), several phases of the hand-arm system reconfiguration can be distinguished: respect to the world frame w T hand is reoriented by modifying the arm configuration to place the object as desired to execute the task ( w R obj,d ). Figure 5 shows an example of these three configurations and their corresponding hand object-level stiffness. It is important to notice that the stiffness at the object level (frame) is the same in Fig. 5b, c, just the orientation of the hand varies to relocate the object as desired.

Stable final hand configuration
To check if the grasp is stable for a fingers' pose q i ∈ Q c in the Final Hand Configuration (Fig. 5b), the object location needs to be computed. We start by finding the transformation between the thumb and the hand base frames in the general configuration: hand T thumb,i = w T −1 where w T thumb,b,i is taken from the initially stored fingers' workspace (Fig. 3). Next, from the initial arm configuration and the corresponding transformation matrix between the initial hand and world frames w T hand,0 (4), the transformation matrix between the thumb and the world frames at the possible hand final configuration can be retrieved: w T thumb,i = w T hand,0 hand T thumb,i . The object location is then obtained from its transformation matrix with respect to the world frame (6).
Once the grasp is fully defined for the Final Hand Configuration, the synergistic joint stiffness α stabilizing it is found. This is done by recursively increasing the joint stiffness using steps of 0.5 Nm/rad from its minimum to its maximum value. At each step, the stability of the grasp is checked (Sect. 3.3), stopping the process when such stability is achieved and therefore, storing the minimum α that renders a stable grasp in each particular configuration. If α max is reached and it is not possible to stabilize the grasp, the configuration is discarded.

Stable final task configuration
Even if for a q i the Final Hand Configuration grasp can be stabilized, as the arm pose changes from the initial hand location to the final one, the corresponding stability at the Final Task Configuration needs to be checked (Fig.  5c). To do so, the required arm end-effector location in the world frame (Ar m frame in Fig. 2a) that locates the object as desired needs to be found. From the final hand pose in the initial arm configuration (Final Hand Configuration in Fig. 5b, with corresponding transformation matrix to the world frame w T hand,i (4)), it is possible to retrieve the transformation matrix between the object and the hand base frames: hand T obj,i = w T −1 hand,i w T obj,i . This relation remains constant between the Final Hand and Final Task configurations (Figs. 5b,c). Therefore, the desired hand base frame orientation to perform a task can be retrieved from the corresponding rotation matrix in the world frame as w R hand,d = w R obj,d hand R −1 obj,i , where w R obj,d is the required object orientation by the task. The hand base position is set to be the same as the initial one w P hand,0 , and so the transformation matrix between the final hand base frame and the world frame in the Final Task Configuration is defined as: Once the Final Task Configuration is fully defined, as it was done before (see end of Sect. 3.5.1), the minimum joint stiffness α that stabilizes the grasp is searched for. The set of configurations found to be stable both, at the Final Hand Configuration (Fig. 5b) and the Final Task Configuration (Fig. 5c) are stored in Q c,s (Fig. 3). From (1) and (5), the hand grasp stiffness at the object level in these configurations obj K hand,i is computed.

Selection of the hand optimal configuration
As explained in Sect. 2, depending on the task to execute sometimes a higher stiffness profile is required in particular directions at the object level. So far we focused on the three main axis directions x yz of the object frame. So, from the previously obtained Q c,s , the one giving a higher obj K hand,i in the desired direction is chosen as the optimal. If two directions are selected defining a stiff plane, the configuration giving the highest obj K hand,i in that plane is selected. A final check is done between the optimal found hand configuration and the initial one, as in some cases the initial one might be already giving the optimal solution. In such case, if the hand grasp is stable at the required final arm end-effector location, the following step (Sect. 3.7) is omitted.

Stable trajectory generation for the finger joints
The previous steps lead to a Final Hand Configuration that provides the higher stiffness in the desired direction. Still, a trajectory is needed to achieve the final finger joint positions (q f ) from the initial ones (Fig. 3).
Similarly to Ruiz Garate et al. (2018a) and based on the work of Sundaralingam and Hermans (2019) a smooth trajectory of 50 steps with Δt = 0.05 sec is computed. At each step, the following function is optimized: q min andq max are set to −30 and 30 deg/s respectively for every joint, and the initial joint angular velocity to a random value between 0 and 30 deg/s. A high weight is given to the second term of (8) (h = 10 2 ), to ensure that the contact points are kept. We further develop the method to confirm that the stability criteria at every step of the trajectory is met by recursively checking α such that the squeezing hand on the object stabilizes the grasp. If the trajectory results unstable, the iterations stop and the algorithm restarts with the Final Hand Configuration giving the second highest stiffness in the desired direction. The process continues until a stable trajectory is found. A final step is added to the trajectory to reach the exact desired final configuration. Though a minimum α is needed that stabilizes the grasp, the maximum synergistic joint stiffness α is applied from the beginning of the trajectory as the goal is to have the grasp as stiff as possible in a particular direction.

Arm end-effector location and stiffness
The optimal hand grasp configuration results in the relocation of the object (Fig. 5). Therefore, the hand base needs to be reconfigured to locate the object as required for the task (7). From this new hand base frame, the transformation matrix of the arm end-effector location with respect to the world frame is obtained (4): w T arm,i = w T hand,i T −1 r . This location is then sent to the Cartesian impedance controller of the arm.
Finally, based on the desired object-level stiffness, and the one already achieved by the hand, the arm Cartesian stiffness can be tuned. From (3), the arm end-effector stiffness with respect to the object frame can be computed as: The stiffness at the arm end-effector with respect to the world frame to be commanded to the robot, can be obtained from obj K arm by using the corresponding transformation matrices from the object to the world frame (1): w K arm = w Z − obj obj K arm w Z −1 obj . It should be noted that although the former equations close the mathematical formulation to achieve a desired obj K, assigning a specific numerical stiffness value for a particular task is quite arbitrary. Therefore, the arm stiffness can be adjusted in a more intuitive way by tuning it to comply with the task requirements.

Experimental validation
The proposed algorithm is implemented in Matlab 2017a (The MathWorks Inc.) with the Syngrasp toolbox (Malvezzi et al. 2015). For the communication with the real hand-arm system, the Robotics System Toolbox TM library from Matlab is used.

Stiffness regulation for the peg-in-hole task
Several experiments are performed to test how the overall object-level stiffness can be regulated by the hand-arm system to achieve a desired task. We choose as a proofof-concept task the vertical peg-in-hole placement. This represents a classical benchmarking task, which requires appropriate regulation of the impedance parameters at the object level.
To properly execute the peg-in-hole task and overcome the frictional forces between the peg and the hole, the stiffness along the insertion must be set to a large value, in comparison to the orthogonal axes, that must achieve a compliant response during the insertion and alignment phases.
Indeed, (Ajoudani et al. 2012) demonstrated how, on the one hand, being compliant in all directions lead to a failure on the execution of the task. On the other hand, if the end-point stiffness was set to high constant values in all directions, the task was executed but position errors led to high forces that could damage the robot or the manipulated objects. Therefore, the system should render high stiffness along the peg axis (z direction), and be compliant in the x y plane to deal with possible misalignments between the peg and the hole. This study applied to a stand-alone robotic arm system. When translating it to our hand-arm system, due to the serial coupling of the hand and the arm, the hand should be first configured so that the stiffness at the object level is maximum in the z direction. Then, the arm stiffness should be regulated to support the stiffness in the required z direction and to provide compliance in the x y plane.
The experimental tests for the hand-arm system are chosen to demonstrate how variations in one of both parts of the system influence the overall behaviour. Accordingly, rather than aiming for a particular obj K value, we test several combinations of obj K arm and obj K hand to evaluate the influence on the resulting obj K and the system's behaviour.
To choose a set of appropriate tests we follow the proposed method, and decide first on the object-level stiffness provided by the hand. Full compliance and constant high object-level stiffness in all directions are not tested, as these have already proven to not be suitable solutions for the pegin-hole task (Ajoudani et al. 2012). Moreover, the limited stiffness that the hand can provide would not allow to reach constant high values in all directions. Afterwards, complementary arm stiffness is chosen for every case to evaluate the influence of the hand-arm system coupling in the overall object-level stiffness. The tested cases are: -Case 1 Hand configured to be stiffest along the object main axis (z axis). Arm configured to be stiff in the z axis and compliant in the x y plane. -Case 2 Hand configured to be stiffest in the object z axis.
Arm tuned to be compliant in all directions. -Case 3 Hand configured to be stiffest in the object x y plane. Arm configured to be stiff in the z axis and compliant in the x y plane.
Based on the coupled stiffness Eq. (3) and on Ajoudani et al. (2012), we forecast that in the test Case 3, where the hand is configured to be stiffest in the x y plane, the stiffness in the z direction will be diminished, and so even if the arm provides high stiffness in the z direction, the system will not create the necessary force to overcome the friction and misalignments to drive the peg in the hole. Otherwise, once the hand has been appropriately configured to be stiff in the z direction (Cases 1 and 2), if the arm is not appropriately regulated (Case 2), the same problem will arise, whereas if the arm Cartesian stiffness is appropriately set (Case 1), the task will be successfully executed.

Set-up and measurements
The experimental set-up in the initial position and the different elements of the system can be visualized in Fig. 2b. A simulated version is displayed in Fig. 2a. The peg is a cylinder of 40 mm diameter at the handle and 110 mm length with a weight of 58 g, which is placed along the thumb last link. The hole is designed to fit the peg creating friction when it is displaced, and it is set on a table. The object z axis goes along the peg, meaning the direction in which it should be inserted in the hole, whereas the x y plane should be parallel to the hole surface once the object z axis is correctly aligned with the hole.
During the experiments the desired and actual end-effector positions, and the estimated external torques at the arm joints are recorded. These last ones are transformed into forces at the arm end-effector by means of the arm Jacobian matrix: f ee,ext = −J −T arm τ ext . The mean and standard deviations of these measurements/estimations for the tests of each case are computed and analysed. Direct measurements of the object-level stiffness of the hand-arm system are not feasible. Nonetheless, the desired joint stiffness and positions are commanded through torque by means of the proposed impedance control (described in the following Sect. 4.2). Torque tracking accuracy depends on the low-level control implemented by the Allegro Hand which in previous works (Ruiz Garate et al. 2018a, b) showed a good matching between the desired and attained joint positions (also by comparing the real and modelled hands).
Each experimental case described previously is repeated 5 times to impose uncertainties on the alignment between the peg and the hole.

Definition of parameters
For the hand grasp definition, the structural compliance is set to a generic value of C s = diag{10 −4 } m/N (5), signifying stiff finger contacts. Similar to Ruiz Garate et al. (2018a, b), the joint stiffness synergy is defined by Γ f = [0.7, 0.95, 1, 0.8] for the index, middle, and little fingers, and Γ f = [1, 0.95, 1, 0.95] for the thumb, while the synergistic value α is constrained between 1 and 6 Nm/rad being initially of 4 Nm/rad. Also, taking into account the Allegro's hand fingertips dimensions and previous experiments in Ruiz Garate et al. (2018a), the threshold value p t is set to 5 mm. For the stability optimization, minimum and maximum contact forces are set to 1 and 10 N as a compromise between the need to exert high contact forces and not setting a reference position too far inside the object. For the contact stability check, the coefficient of friction is set to μ = 0.8, representing the high friction between the fingertips and the silicon peg cover (Fig. 2b).
For the easiness of analysis and visualization, the desired object frame in (7) for the task is aligned with the world frame: w R obj,d = w R = I 3×3 . Hence, in the final configuration w K arm = obj K arm (9).
To have a clear comparison between the stiff and compliant arm cases, the Cartesian stiffness is empirically defined as 1700 or 100 N/m for the z axis in the stiff and compli-ant cases, respectively. For the x and y axes the stiffness is always 500 N/m to be compliant to possible misalignments of the peg. The task is defined as a vertical trajectory on the world −z axis of 50 mm and is consistent across all trials.

Implementation of CMS/CDS hand under-actuation
All the Allegro Hand joints are actuated and controlled in torque, being able to fully define the object position and to regulate its stiffness through an impedance controller. To do so, 32 control inputs would be needed, 16 for the joints' positions that would result in the desired object location, and 16 for the joints' stiffness resulting in the desired grasp stiffness. Yet, the proposed method targets under-actuated hands. Therefore, to illustrate the application of our method in the under-actuated case, we use the introduced CMS/CDS control of the hand. By the use of the synergistic stiffness (CMS), only one input is available to define the stiffness of all joints, downsizing from 32 to 17 control inputs available, and thus recreating the under-actuation at the stiffness level.
To simulate these concepts on the Allegro Hand, we depart from the impedance controller implemented in Ruiz Garate et al. (2018a) which applies the desired joint positions (q f ) and synergistic joint stiffness as: where k q = diag(K q ) ∈ R 16 is the vector of joint stiffness values, and k d ∈ R 16 contains the damping parameters: k d = k p c f , where c f are the found coefficients stabilizing the hand. τ g is the gravity torque vector compensating for the weight of the hand.
As the hand base frame varies depending on the desired object location (Fig. 5), the gravity compensation term τ g based on the fingers' joint positions needs to be adjusted. We start from the basic equation is the force at the corresponding joints of finger i, and J f ,i ∈ R 6×4 is the matching finger Jacobian matrix. Then, we can define τ f i = J f ,i m i g, where g = [0, 0, −9.81, 0, 0, 0] T m/s 2 is the gravity vector, and m is a simplified mass matrix such that for a finger m i = [ 4 l=1 m l , 4 l=2 m l , 4 l=3 m l , m 4 ], being m l the mass of a finger link starting from the one closest to the palm.
The Jacobian matrix J f ,i depends not only on the joints' position, but also on the location of the hand base frame with respect to the world frame (Fig. 2a). Therefore, whenever the arm configuration changes varying the end-effector location, and so the hand base frame, J f ,i needs to be recomputed. To have a fast computation of the matrix such that the gravity compensation would be effective, J f ,i is calculated as: where hand J f ,i is the finger Jacobian matrix with respect to the hand base frame and its form remains invariant just depending on the joint angles. w R hand t represents the rotation matrix from the hand base frame to the world frame at each time t.
For the arm, the trajectory is generated by the Cartesianimpedance controller (Balatti et al. 2019) and continuously scanned by Matlab, being w T hand updated accordingly based on the robotic arm model (Sect. 3.1).

Experimental results
In Cases 1 and 2, following the method described in Sect. 3 for the hand, a stable configuration is found such that it maximizes the stiffness in the desired object-level direction z. This process is repeated to achieve a stiff profile in the x y plane for Case 3. In all three cases, afterwards the hand needs to be reoriented by changing the arm configuration so that the peg is placed in the vertical direction (to be able to align the peg with the hole). Figure 6 shows the simulated hands and Fig. 7 displays these reconfigurations during the experimental cases as sequences of frames. Case 2 plots are not shown as the hand and arm configurations are the same as in Case 1. Figure 8 shows the stiffness ellipsoids at the object level for the Initial Configuration and the three studied cases (Sect. 4.1.1). As it can be observed, in the 2 first cases, the hand is initially very stiff along the object z axis, resulting in a Final Hand Configuration equivalent to the Initial Configu- ration. Otherwise, in the third case the configuration changes rendering a higher stiffness in the x y plane, which results in a reduced stiffness along the object z axis. The difference between Cases 1 and 2 is that in the latest the stiffness of the arm is significantly smaller along the peg z axis, resulting in a large reduction at the object-level stiffness in that direction (93% reduction with respect to Case 1). Case 1 and 3 have the same arm stiffness, in Case 3 however, the stiffness along the object z is 32% smaller than in Case 1, while the stiffness in the x and y directions is 22 and 49% larger, respectively. Figure 9a, b show the peg-in-hole task execution during the experiments and the measured/estimated variables for Cases 1-3 respectively. The estimated object center position and external force at the arm end-effector are computed using the approaches in Sects. 3.4 (6) and 4.1.2, respectively, and used as a measure of the successful execution of the task. In Case 1 the mean final difference in vertical position is less than 1.5 mm for the arm end-effector and 1 mm for the estimated object position. In Case 2 the difference between the desired and final vertical position is around 42 mm for the arm and the object. Finally, for Case 3 the difference is around 2 mm for the arm end-effector and 6 mm for the estimated object position. Therefore, being the desired displacement of 50 mm (Sect. 4.1.3), it can be concluded that in Case 1 the peg is successfully inserted in the hole for all trials (maximum Fig. 8 Stiffness ellipsoids at the object level for the initial configuration and the three studies cases. In each case the stiffness is shown for the hand, the arm end-effector, and the overall hand-arm system error of all trials of e d = 1.3 mm, corresponding to a relative error of e d,r = 2.53%), whereas in Case 2 the task cannot be successfully executed in any of the trials (e d ∈ [40.8, 44.6 Fig. 9b how there is a big increment in the end-effector force. Indeed, though the robotic arm actually follows the trajectory, the compliant hand fingers bend. This misaligns the peg which pushes against the hole walls moving the set-up. Consequently, the peg re-orients and does not get inserted in the hole, meaning that the estimated object position is no longer reliable and Case 3 is not able to successfully execute the task. This is further discussed in the following Sect. 5.

Discussion
As expected, when the hand and the arm are both stiff in the task direction (Case 1, Fig. 9a left column), the system is able to drive the peg in the hole overcoming the friction, and thus the trajectory is well followed. However, when the arm is set to be compliant (Case 2, Fig. 9a right column), though the hand remains stiff in the task direction, due to the compliance of the arm, the overall system becomes compliant in the vertical direction (Fig. 8), and so, initially the system is not able to overcome the friction of the hole. As the differ-  Fig. 9 a Case 1 and Case 2. b Case 3. Pictures: Experimental set-up at the beginning (up) and end of the task execution (down). In Case 3 a red dashed-line is plotted on the peg axis to better visualize the changes in orientation. Graphs: Corresponding mean and standard deviation of the arm end-effector and estimated object vertical positions, and estimated force at the arm end-effector. Red represents desired positions and Blue measured/estimated ones (Color figure online) ence between the desired and actual positions increases, the force raises driving the peg slightly into the hole. Yet, these small displacements are not enough to follow the trajectory. Finally, when the arm is stiff and the hand is more compliant (Case 3), the overall system reduces its stiffness in the vertical direction, and becomes stiffer in the x y plane (Fig. 8). As a result, the system tries to follow the trajectory driven by the arm (Fig. 9b), due to the compliance of the hand, any small friction causes the peg to get miss-aligned and start pushing against the hole walls. This generates an increase on the force which results in moving the set-up (hole base) instead of going inside (pictures in Fig. 9b). Due to its high stiffness, the arm end-effector continues descending and pushing, while the fingers bend due to the hand compliance and as a result, the base containing the hole moves. Thus, though it seems that the arm end-effector follows the desired trajectory, the difference on the object location is higher. In any case, due to the displacement of the whole set-up, the estimated object location is not reliable, as the peg gets misaligned with the thumb and its real location varies with respect to the estimated one (see pictures in Fig. 9b). It must be pointed out that only in Case 3 is the base containing the hole moved. In each trial where this happens, the set-up is put back to its original location to assure repeatability of the experiments.
These results demonstrate that correct adjustment of the stiffness of both elements, the hand and the arm, is needed to achieve the appropriate execution of the task, i.e., driving the peg in the hole. When one of both systems is not adjusted appropriately, the hand-arm system is not able to perform the task.
In the shown example, the computation of all possible stable configurations (207) at the Final Hand and Task locations summed up to 7.5 s, therefore being currently performed offline. Nonetheless, it must be pointed out that once an initial grasp and tool are defined, this process needs to be executed only once, being able to use the stored data for any task variations and/or changes in the desired stiffness orientations. Once these values are available, a desired stiffness orientation is selected, taking an average of 0.0027 s to find the best matching configuration. Afterwards, the needed time to generate the hand trajectory highly depends on the suitability of the first chosen final configuration, the difference between both configurations (number of trajectory steps), and the need for high synergistic joint stiffness. In our example experiments, this takes an average of 11 s per computed trajectory. Yet, this process can be sped-up just by checking if the application of the highest stiffness would stabilize the grasp. Also, once the trajectory is found, it can be replicated with no time cost. Moreover, it must be taken into account that all these calculations are currently carried out in Matlab, and therefore the performance can be highly improved if later translated to C++.
The proposed method is generalizable to any system with a fully controllable arm and an under-actuated hand by appropriately adjusting to the limitations arising from each under-actuated case. While under-actuation at the control level has been demonstrated with the CDS/CMS example, in the case of mechanical under-actuation two different aspects should be considered. First, the number of hand compatible configurations (Sect. 3.4) would be reduced, as the fingers workspace would be more limited. This would reflect in less possible resulting hand stiffness obj K hand due to the Jacobian influence (5). Then, the trajectory generation (Sect. 3.7) should be adapted to include a further constraint on the possible joint positions due to the under-actuation.
Nonetheless, the method presents some limitations due to the assumptions made. First, we focus only on fingertip grasps. Grasp points at other finger links could be easily added into the equations through the Jacobian J hand and Grasp G matrices (5). This addition could help with the stabilization of the grasps, yet at the expense of going towards power-grasp models and therefore reducing the manipulability capacity of the tool and the influence of the hand in the overall stiffness. Second, we assume the object to be attached to the thumb. This assumption was a good approximation during these experiments resulting in stable grasps and has proven to work with diverse objects and hand reconfigurations in previous works (Ruiz Garate et al. 2018a). In other studies we relaxed this assumption by allowing all fingertips to rotate around the contact points (Ruiz Garate et al. 2018b). While this latter approach is more general and realistic, it comes at a higher computational cost and also cannot assure the certain location of the object. Besides, it must be noted that to compute the hand stiffness (5) we use the ideal contact model (Bicchi 1994). Therefore, in the cases where the assumptions made are no longer valid, e.g., when some preloading is present at the joints, the geometric terms of the equation should also be taken into account.
Future work foresees the use of force sensors to enhance the contact detections and stability. Moreover, further tests of the method with different hands providing diverse underactuation principles are envisaged.

Conclusions
This manuscript proposed an algorithm to regulate the resulting object-level stiffness of a hand-arm system constrained by under-actuation principles and the requirement of preserving the contact points on the grasped object. The mathematical foundations were described where the under-actuation was illustrated at the level of the hand by the synergistic CMS/CDS principles. The desired stiffness for a given task was characterized as a set of directions in which to maximize the stiffness or be compliant. The method was tested by several experiments with the peg-in-hole task, where it was proven that by using the proposed method the correct tuning of the hand-arm system stiffness can be achieved to successfully perform a task.
Funding Open access funding provided by Istituto Italiano di Tecnologia within the CRUI-CARE Agreement.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/.