8
On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simplified Dynamics Angelo Bratta, Romeo Orsolino, Michele Focchi, Victor Barasuol, Giovanni Gerardo Muscolo and Claudio Semini Submitted: 15/09/2019. Accepted: 22/01/2020. To be published in: IEEE International Conference on Robotics and Automation (ICRA) 2020. To cite this paper: A. Bratta, R. Orsolino, M. Focchi, V. Barasuol, G. Muscolo, C.Semini ”On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simplified Dynamics,” IEEE International Conference on Robotics and Automation (ICRA) , 2020. c 2020 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works.

On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

On the Hardware Feasibility of Nonlinear Trajectory Optimization for

Legged Locomotion based on a Simplified Dynamics

Angelo Bratta, Romeo Orsolino, Michele Focchi, Victor Barasuol, Giovanni Gerardo Muscoloand Claudio Semini

Submitted: 15/09/2019. Accepted: 22/01/2020.

To be published in:

IEEE International Conference on Robotics and Automation (ICRA) 2020.

To cite this paper:

A. Bratta, R. Orsolino, M. Focchi, V. Barasuol, G. Muscolo, C.Semini ”On the Hardware Feasibility of NonlinearTrajectory Optimization for Legged Locomotion based on a Simplified Dynamics,” IEEE International Conferenceon Robotics and Automation (ICRA) , 2020.

c©2020 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all otheruses, in any current or future media, including reprinting/republishing this material for advertising or promotionalpurposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrightedcomponent of this work in other works.

Page 2: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

On the Hardware Feasibility of Nonlinear Trajectory Optimization forLegged Locomotion based on a Simplified Dynamics

Angelo Bratta1,2, Romeo Orsolino1, Michele Focchi1, Victor Barasuol1,Giovanni Gerardo Muscolo3 and Claudio Semini1

Abstract— Simplified models are useful to increase the com-putational efficiency of a motion planning algorithm, but theirlack of accuracy have to be managed. We propose two feasibilityconstraints to be included in a Single Rigid Body Dynamics-based trajectory optimizer in order to obtain robust motions inchallenging terrain. The first one finds an approximate relation-ship between joint-torque limits and admissible contact forces,without requiring the joint positions. The second one proposesa leg model to prevent leg collision with the environment. Suchconstraints have been included in a simplified nonlinear non-convex trajectory optimization problem. We demonstrate thefeasibility of the resulting motion plans both in simulationand on the Hydraulically actuated Quadruped (HyQ) robot,considering experiments on an irregular terrain.

I. INTRODUCTION

Motion planning is a key element for the locomotion oflegged robots. The more complex the terrain to be traversedthe harder it gets to find a set of joint commands that allowsthe robot to reach a desired target.

The literature is typically split between the usage ofsimplified dynamic models, such as the Linear InvertedPendulum (LIP) [1] or the Spring Loaded Inverted Pendulum(SLIP) [2] and the usage of whole-body models. The firsttwo are computationally efficient but only applicable toflat terrains; the latter guarantees accurate description ofthe robot dynamics on arbitrary terrains but requires largercomputational effort, not suitable for real-time applications.

A third option is the Centroidal Dynamics (CD) [3], [4]which exploits the full dynamics of a robot projected at itsown Center of Mass (CoM). The CD is not an approximatedynamic model, since it considers a complete description ofthe robot dynamics in terms of its inputs (feet and CoMwrenches) and outputs (feet and CoM trajectories).

A simplification of the CD is the Single Rigid BodyDynamics (SRBD), where the robot is seen as a single rigidbody with massless legs. The leg inertia is constant andcorresponds to a predefined joint configuration (what impliesthat the inertia effect of the leg is neglected).

Due to its simplicity, SRBD is well suited to problemswhich require low computational cost while dealing withcomplex terrains and possible non-coplanar contacts. In addi-

1Dynamic Legged Systems (DLS) lab, Istituto Italiano di Tecnologia,Genova (Italy). email:[email protected]

2 Department of Electronics and Telecommunications, Collegio di Ingeg-neria Informatica, del Cinema e Meccatronica, Politecnico di Torino, Turin(Italy).

3Department of Mechanical and Aerospace Engineering, Politecnico diTorino, Turin (Italy). email: [email protected]

tion, it is a suitable approximation for robots with negligiblemass legs compared to the trunk’s weight.

Since SRBD only considers a description in terms of theCoM and the robot’s feet, it is possible that a motion plannerbased on this model finds a trajectory which violates feasi-bility constraints of the robot. Such constraints include thejoint kinematic limits, the joint-torque limits and the possiblecollisions between robot’s links and the environment.

A. Related Works

The trade-off between simplicity of the model and fea-sibility of a whole-body motion on rough terrain is still atthe core of the research in robotic legged locomotion. Oneapproach consists in using the trajectory generated with CD(which is typically lower dimensional than the full dynamicmodel of the robot) in combination with the full robotkinematics to obtain a feasible whole-body motion [5], [6].A similar approach was used by Valenzuela et al. [7] inwhich the authors compute the sequence of footholds usinga Mixed Integer Convex optimization problem and then solvea nonlinear problem to find a linear and angular centroidalmomentum trajectory. Budhiraja et al. [8] generated a trajec-tory for the CoM, in both simplified and full dynamic model,making sure that the former is coherent with the latter. Allthese approaches have been only tested in simulation with abipedal robot, but never on the robotic hardware.

Farshidian et al. [9] introduced a nonlinear Model Predic-tive Control (MPC) which is able to compute the relevantmotion quantities in a short amount of time. The limit ofthis approach is that it requires a big computational effortand it can thus only plan few phases of the motion.

Other authors leave on the motion controller the burdento verify the whole-body feasibility of the motion plan andfocus, instead, on the nonlinearities which are present in theCD and SRBD formulations (mainly angular momentum andcontact phases duration). These are usually tackled by eitherdefining a convex relaxation of the formulation [10], [11], orby predefining the feet position for the entire trajectory [12].

Winkler et al. [13] implemented a trajectory optimization,based on the SRBD, in which CoM position, orientation, feetposition, contact forces and timings are concurrently opti-mized. The efficiency of this planner has been demonstratedboth in simulation and on the real hardware on flat terrains.On rough terrains, however, other feasibility constraints suchas joint-torque limits and geometry of the robot’s legs need tobe considered to obtain a feasible whole-body motion suitedfor a real robotic hardware.

Page 3: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

A state-of-art approach to avoid collision between legsand ground is looking for a collision-free swing phase,considering the height map of the terrain and the robotconfiguration [14]. An alternative is presented in [15], inwhich the controller is able to move the point of applicationof the ground reaction forces from the foot to the shin incase of collision. This method can guarantee safe navigationon challenging terrains, however, it is a pure reactive modulewhich does not increase the robustness of the planner.

The joint-torque limits constraint problem is usually onlyaddressed at controller level [16], [17]. In order to explicitlyconsider the limit at the planning stage, Ding et al. [18]convexify the nonlinear joint-torque constraint such that itcan be added to a Mixed Integer Quadratically ConstrainedProgram (MIQCP). This formulation is suitable for con-vex optimization and it thus computationally efficient. Thedecision to employ a unique outer bounding ellipsoid asan approximation of the force ellipsoids, however, discardsthe important configuration-dependent information of therelationship between the leg’s configuration and shape ofthe force ellipsoids. In our previous works, instead, we haveshown that the value of the maximum admissible contactforces depends on the leg’s configuration and we have usedthe force polytopes [19] to map the joint-torques limitsinto a set of admissible centroidal wrenches [20] or CoMpositions [21]. This work employs the same idea of forcepolytope for the synthesis of motion planner algorithm basedon CD, or SRBD that retains a relationship between the robotconfiguration and the maximal contact forces.

B. Contributions

In this manuscript we address the limitations of the ex-isting state-of-the-art nonlinear motion planners for leggedrobots based on SRBD. Our theoretical novelties allow tohave a planner that devises contact forces consistent withactuation limits and feet trajectory that avoid shin collisions.Thanks to that, experimental results have been obtained fornon-flat terrains.

1) Theoretical contributions:• a novel approximate projection of the joint-torque limits

into the task space. This is limited to robots presentingpoint-contacts and, to the best of our knowledge, itrepresents a novel approach to describe the existingrelationship between the leg’s configuration and thecorresponding maximal pure contact forces at the end-effector. This allows motion planners based on nonlin-ear optimization to adjust the robot configuration andforces depending on the manipulability and actuationcapabilities of the platform

• a novel model of the leg’s lower link to include into thetrajectory optimization formulation the finite non-zerosize of the robot’s feet and shin’s geometry.

2) Experimental contribution: we present the hardwareimplementation of the trajectories obtained with a revisitedversion of the formulation presented by Winkler et al. [13].The planner’s trajectories have been tested on the HyQ [22]robot of Istituto Italiano di Tecnologia (IIT). This is the first

time that trajectories based on [13] are deployed on a realhardware on non-flat terrains different from the flat ground,achievement which would not have been possible withoutthe increased robustness guaranteed by the two feasibilityconstraints proposed in this paper.

II. FORMULATION OF THE PROBLEM

We attempt to overcome the already mentioned limitationsby defining a motion planner which solves a nonlinear, non-convex, trajectory optimization problem based on the SRBDand which includes some nonlinear constraints which willbias the solver towards a solution that is more coherent withthe whole-body model of the specific robot.

A. Single Rigid Body Dynamics Model

The assumption of configuration independent CoM andinertia of the robot is a fair assumption especially forquadrupeds with legs of negligible mass compared to theirtrunk’s mass, as in the case of HyQ [22]. For example, wehave found that HyQ’s leg configuration changes the positionof the CoM of 2cm in x and y direction at maximum, whilethe z direction is less relevant for stability. The Newton-Eulerequations lead to the following dynamic equation:

mr =

ni∑i=1

fi(t)−mg (1)

Iω(t) + ω(t)× Iω(t) =

ni∑i=1

(fi(t)× (r(t)− pi(t))) (2)

where m is the mass of the robot, r ∈ R3 is the CoM positionr ∈ R3 is the CoM linear acceleration, fi ∈ R3 are the purecontact forces, ni ∈ R is the number of feet, g ∈ R3 is thegravity vector, I ∈ R3×3 is the inertia matrix, ω ∈ R3 is theangular velocity, ω ∈ R3 is the angular acceleration, and pi

∈ R3 is the cartesian position of foot i.

B. Kinematic Model

In order to guarantee that joints lie inside their kinematiclimits, the foot position with respect to the base is con-strained to be inside a conservative approximation of theleg’s workspace defined as a cube. This box has edges ofsize 2b and it is centered in the nominal foot position pi ∈R3 1 :

pi(t) ∈ Ri ⇔ |pi(t)− pi| < b (3)

C. Terrain and Contact Models

This constraint enforces the fact that the feet have to bein contact with the terrain during the stance phase, and thatthey have to keep a minimum clearance hmin ∈ R from theterrain during swing:

pz ∈ T ⇒

{pz = hter(px, py) during stancepz > hmin + hter(px, py) during swing

(4)

1The nominal foot position corresponds to a joint configuration whichmaximizes the distance of each joint from its kinematic limits.

Page 4: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

where pz is the z coordinate of the foothold and hter is theheight of the ground obtained through a predefined internalterrain model.

The contact model of [13] checks whether the contactforce fi of every foot lies within the linearized friction coneFi. From a mathematical point of view it has to verify that:

ai < Cifi < ai (5)

Ci =

(−µisi + t1i)

T

(−µisi + t2i)T

(µisi + t2i)T

(µisi + t1i)T

sTi

ai =

−∞−∞

000

ai =

00∞∞fmax

(6)

where s ∈ R3 is the normal direction to the terrain, µis the friction coefficient, fi ∈ R3 is the contact force, t1i,t2i are the two tangential directions to the terrain, they formwith s a right handed system of coordinates and i = 1, . . . ncwhere nc is the number of feet in contact with the ground.

In this paper, we use a formulation which corresponds tothe one employed by Winkler et al. [13], adding the forcepolytope Ai and the leg’s geometry Pi constraints that arethe contribution of this work and are further explained inthe following Section. The overall trajectory optimizationproblem can be described as:

find: x(t) = [rT (t),θT (t),pTi (t), fTi (t)]

for i = 0, . . . nc, t = 0, dT, 2dT, . . . Tf ,with dT = 0.1s and Tf = final time

such that:

(dynamic model) [r, ω]T = f(r,θ,pi, fi)

(friction cone) fi ∈ Fi

(foot position) pi ∈ Ri ∪ Ti(force polytope) fi ∈ Ai

(leg’s geometry) pi ∈ Pi

(7)where θ ∈ SO(3) is the orientation of the robot.

III. GEOMETRY AND ACTUATION CONSISTENCY

In this Section, we propose a method to incorporate thejoint-torque limits constraint and shin collision avoidanceinto simplified models such as CD and SRBD.

A. Joint-Torques Limits

Traditional contact models neglect the existing relationshipbetween the maximum contact force f limi and the limbconfiguration qi ∈ Rnd (where nd is the number of Degreesof Freedom (DoFs) of the leg). On the robotics hardware,admissible joint-torques τi(q) are mapped into admissiblecontact forces fi at the ith end-effector [16], [19], [20](from now on, unless specified, all the quantities refer to onesingle leg and we can thus drop the pedex i). This mappingis represented by the leg’s Jacobian J(q) matrix which istypically nonlinear and configuration dependent:

τ lim = J(q)T f lim (8)

Fig. 1. Representation of a planar leg with 2 DoFs in three differentconfigurations. For each configuration the corresponding force polytope isshown. The angle α represents the tilt angle of leg (i.e., angle between thevertical and the line connecting the foot and hip joint). nj

k is the normal tothe j-th plane of the k-th polytope. l is the distance between foot and hipjoint. Shadow zones represent the polytopes when α is different from zero.

where f lim is one of the 2nd vertices of the leg’s forcepolytope A [23]. Equation (8) represents a static relationship,which can be also considered as a good approximation fordynamic movements of robots with low inertia legs. Fora maximum joint-torque value τ lim, the polytope A canbe employed to relate the feet’s position to the maximumcontact forces that the robot can perform on the ground.This is an important feature that needs to be consideredwhenever the robot needs to take on complex configurationsin order to negotiate rough terrains. In Fig. 1 we can seea planar example where three force polytopes Ak (withk = 1, . . . , 3) are computed for the three default configu-rations of the same planar leg, corresponding to the situationof minimum retraction, of maximum extension and to theleg’s nominal configuration. The selection of the number ofdefault polytopes, three in this case, affects the precisionof the approach: the higher the number of default sampledpolytopes, the higher the accuracy of our approach sincethe resulting polytopes will be closer to the precomputedone. The considered leg has 2 DoFs and, therefore, all theforce/wrench polytopes are made of 2nd halfspaces. Eachhalfspace can be represented by its normal unit vector nj

k ∈Rm (with j = 1 . . . 2nd) and the offset term djk ∈ R. Theforce polytope Ak of (7) can be expressed as:

Ak ={f ∈ Rm | Ak(q)f ≤ dk(q)

}(9)

where m is the dimension of the contact force (i.e., m = 3or m = 2 as in the planar case of Fig. 1) and:

Ak(q) =[n1k(q), . . . ,n2nd

k (q)]T

dk(q) =[d1k(q), . . . , d2nd

k (q)]T (10)

The rows of the Ak(q) matrix are related to the rows of theleg’s transposed Jacobian J(q)T . As we are interested in theway the matrix Ak(q) changes with respect to a variationof the foot p in the cartesian space, we should then analyze

Page 5: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

Fig. 2. Geodesic average of the unit vectors nja and nj

b normal to thehalfplanes of the force polytopes Aa and Ab. The generic normal vectornj is obtained by linear interpolation of the angles θa and θb.

the quantity dJ(q)/dp. This is, however, robot-specific andgoes against the assumption of SRBD. For this reason, wethen propose a robot-agnostic approximate approach whichexpresses the relationship between foot position and maximalcontact forces without the need of explicitly knowing themorphology of the considered robot.

In order to express the position of the foot we use the polarcoordinates with respect to the hip joint in the sagittal plane.In particular, the variable l represents the distance betweenthe foot and the hip joint and α corresponds to the anglebetween the vertical and the line that connects the foot tothe hip joint (see Fig. 1) :

l =√

(Bpx − Bhx)2 + (Bpz − Bhz)2 (11)

α = arctan(

Bpx − Bhx

Bpz − Bhz

)(12)

where (Bhx,Bhz) is the fixed position of the hip joint and(Bpx,Bpz) is the foot position with respect to the base frame.l1, l2 and l3 correspond to the distance between hip and foot,respectively, at maximum retraction, nominal position and atmaximum extension. In the following notation, the indexes(·)a and (·)b refer, for a given foot distance l, to the valuescorresponding to the two neighboring force polytopes Aa

and Ab out of the three predefined polytopes A1,A2,A3:{(·)a = (·)j1, (·)b = (·)j2 if l1 ≤ l ≤ l2(·)a = (·)j2, (·)b = (·)j3 if l2 < l ≤ l3

(13)

We assume that the transformation between the correspond-ing halfplanes of two polytopes Aa and Ab consists ofan homogeneous transformation (polytope morphing). Thegeneric normal unit vector nj(p) (describing the orientationof the force polytope’s facet j) is found as the geodesicaverage [24] of the two neighboring values la and lb:

nj(p) = R(α)[cos(θ) sin(θ)

]T(14)

where:θ =

l − lalb − la

(θb − θa) + θa (15)

θa and θb are the angles corresponding to the two prede-fined normal vectors na = [cos(θa), sin(θa)]T and nb =

Fig. 3. Representation of one single leg of the HyQ robot. h is the kneeheight, s is the length of the lower link, β is the angle selected to keep theshin from hitting possible obstacles and r is the radius of the foot used toavoid edges and unsafe foothold.

[cos(θb), sin(θb)]T closest to the value of l (see Fig. 2).

The rotation matrix R(α) ∈ R2×2 maps the obtained forcepolytope by the angle α in such a way to align it to theleg. The generic offset term dj can be found as a linearinterpolation between the values da and db:

dj(p) =l − lalb − la

(db − da) + da (16)

As a summary, following (11) - (16) we obtain an expressionof the polytope which does not depend on the joint config-uration q, but on the foothold p. The optimization problem7 is fed a force polytope for each contact foot i:

A ={f ∈ Rm | A(p)f ≤ d(p)

}(17)

A(p) =[n1(p), . . . ,n2n(p)

]Td(p) =

[d1(p), . . . , d2n(p)

]T (18)

Despite the nonlinearity given by the trigonometric termsin (14), the polytope morphing of (14), (15) and (16)represents a significant simplification because it does notrequire the knowledge of the leg’s Jacobian matrix J(q)at the considered leg configuration. This morphing is wellsuited for trajectory optimization formulations such as theone described in (7) where the optimization variables onlyincludes operational space quantities.

B. Environment Collision Avoidance

As introduced in Section I, the SRBD considers theassumption of point feet, while in the real robots feet havealways a non-negligible size. In this Section, we include theradius of robot’s spherical feet in the formulation in such away to discard solutions that may lead to undesired collisionsduring swing phase or to unsafe footholds in presence ofobstacles and rough terrains. Unsafe footholds, for example,happen when the spherical foot does not step entirely on theterrain (e.g., edge of a step). To overcome this, we forcethe planner to find a foothold p in which the terrain heightis constant at a radius r before and behind the consideredfoothold along the robot’s direction of motion (see Fig. 3).The value of r coincides with the physical dimension of theball foot of the robot, e.g., 2cm in the case of HyQ.

Page 6: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

Moreover, the leg’s volume plays an important role inthe execution of successful motion plans, as it may lead toself-collisions or to collisions with the environment if notproperly managed. Shin collisions, for example, may eitheroccur during a leg’s stance phase (as a consequence of a poorchoice of the foothold) or during a leg’s swing phase. In orderto avoid such collisions, we provide a simplified kinematicmodel of the leg to the motion planner. We assume the lowerlink to be a straight line of length s (distance between thefoot’s contact point and the knee) with a fixed angle β withrespect to the ground. The knee’s projection on the ground isequal to s cos(β) and the height of the knee corresponds toh = s sin(β) and it can then be mapped along the directionof motion using the knowledge of the yaw angle ψ of therobot. Knee collision can thus be avoided if the height of theknee is higher than the terrain on that point. Fig. 3 representsthe model chosen for the ith leg in the x-z plane:

p ∈ P ⇒ pz + s · sin(β) > hter(pknee) (19)

pknee,x = px + s cos(β) cos(ψ)

pknee,y = py + s cos(β) sin(ψ)(20)

s is a constant robot parameter while the value of β angleis selected by looking at the maximum inclination of the legduring a walk. Besides checking for possible knee collisions,we also avoid shin collisions by imposing (19) on a numberof points between the foot and the knee. The number of thesepoints is selected through heuristics and it depends on thelength of the leg and on the roughness of the terrain.

IV. SIMULATION AND EXPERIMENTAL RESULTS

In this Section we present the validation results that havelead to the successful execution of the optimal trajectoriesgenerated by our motion planner on the HyQ robot, both insimulation and on the real hardware. For all the simulationsand experiments we used an Intel Core i5-4460 CPU @3.20GHz × 4 and the nonlinear optimization problem wassolved using an Interior Point method [25] solver, imple-mented in the IPOPT library [26].

A. Joint-Torque Limits Approximation

Fig. 4 shows the Hip Abduction-Adduction (HAA), HipFlexion-Extension (HFE) and Knee Flexion-Extension (KFE)joint-torques and the corresponding saturation limits of theHyQ robot during a 1m walk on a flat terrain (duration 2.4s- three crawl gait cycles).

The plots show the torques obtained using the motionplanner with (right) and without (left) the force polytopeconstraints. Our motion planner does not explicitly optimizeover joint-torques τ and so they are obtained exploiting thedynamic equation of motion of each single leg 2 :

τ = Mq + c(q, q) + g(q)− J(q)T f (21)

f is the contact force as optimized by the motion plannerand q, q, q can be obtained by inverse kinematics of the

2 HyQ’s control structure is equipped with a whole-body controller tocompute joint-torques, see [17] for further information.

Without force polytopes With force polytopes

0 0.5 1 1.5 2

-2000

200

-200

0

200

-200

0

200

-2000

200

-2000

200

0 0.5 1 1.5 2

-2000

200

LF RF LH RH

Fig. 4. This plot shows the joint-torques of the HyQ robot walking insimulation for 2.4s on a flat terrain. We can see, in the case where noforce polytopes are considered (left plots), that the torques τHAA, τHFE

and τKFE violate their limits multiple times during the walk. On the rightplots, instead, we can see that the force polytope constraint is able to biasthe planner towards a solution that respects all the limits. Minor violationat t = 0.8s (τHAA,RF and τHFE,RH ).

-100-50

050

100

-100-402080

0 0.5 1 1.5 2-250-150-5050

-100-50

050

100

-100-402080

0 0.5 1 1.5 2-250-150-5050

-120 -120

Without force polytopes With force polytopes

Fig. 5. This plot shows the joint-torques of the monoped robot over a 2.4shopping on a flat terrain. We can see, in the case where no force polytopesare considered (left plots), that the HFE torque τHFE and τKFE limitare violated during the stance phases. On the right plots, instead, we cansee that the force polytope constraint is able to bias the planner towards asolution that globally respects all the limits. Minor violations at t = 1.3s(τHAA) and at t = 1.4s (τHFE ).

foot trajectory in the base frame Bp (assuming a fixed offsetbetween base and robot’s CoM). M, c and g represent theleg’s inertial matrix, the Coriolis and the gravity term.

We can see in the left plots that the desired torquesviolate the saturation limits of the actuators of the HyQrobot (120 Nm for the HAAs and 150 Nm for the HFEsand KFEs). This is justifiable considering that the baselinemotion planner has no information about saturation valuesand only linearized friction cones constraints act on thecontact forces. The plots on the right, instead, satisfy thetorque limits of the robot due to the force polytope constraintincluded in the motion planner. This is possible thanks tomore extended leg-configuration that HyQ takes on duringthe walk and the stance phases. As a matter of fact, such

Page 7: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

Fig. 6. HyQ robot stepping up a pallet of 10cm in both simulation (Gazebo)and hardware experiment.

extended configuration corresponds to a force polytope witha larger maximum normal force (see Fig. 1) [21]. Minorviolations happen, since the geodesic average is a goodapproximation of the polytope and not its real representa-tion. Figure 5 shows similar results for the monoped robot(corresponding to a single leg of HyQ, see Fig. 3).

B. Shin Collision Avoidance

Exploiting the constraint that we described in Section III-B, HyQ was able to walk for 1m, performing three cyclesof crawl in 11s to step onto 15cm high pallet in simulationand onto 10cm high pallet on the hardware robot. Fig. 7shows the base position x (continuous line) and tracking error(dashed line) with respect to the desired trajectory computedby the planner in three following different versions:

1) Zero Point Foot and No Shin Collision Avoidance (redlines): This corresponds to the formulation given in [13] inwhich both shin collision and the foot size are neglected.The algorithm took ∼ 50s to find an optimal solution. Inthe upper plot of Fig. 7 we can see that, in this case, thetracking error (dashed line) grows until the experiment isstopped because the robot falls down. As it can been seenin the attached video3 the robot collides with the corner ofthe edge, due to a non-robust choice of the foothold. Theattached video shows that even a terrain with a relativelylow obstacle (10cm) cannot be overcome without explicitlyconsidering the feet and leg geometry.

2) Non-Zero Point Foot Size and No Shin Collision Avoid-ance (green lines): In this case we enforce in the plannera foot radius r of 2cm, while we do not include anyshin collision avoidance constraint. The computation timeincreased by 30 % compared to the first scenario (∼ 70s) inthe case of 10cm high pallet. For the 15cm high pallet thesolver took 105s to find an optimal solution. This constraintguarantees the successful navigation in the non flat terrain,but comparing the upper and the middle plot of Fig. 7 it canbe seen that increasing of the height of the step will alsoincrease the tracking error.

3) Non-Zero Point Foot Size and Shin Collision Avoidance(blue lines): This version corresponds to the constraintdescribed in Section III-B. In case of a 10cm high pallet, thealgorithm took twice as long as the first simulation (∼ 100s),while a larger computational time (130s) was required in caseof a 15cm high pallet, due to the more challenging terrain

3https://www.youtube.com/watch?v=bpjlRvtVwe8

-0.30

0.30.60.9

00.250.5

0.751

0 2 4 6 8 10 120

0.250.5

0.75

Zero foot size Non-zero foot size and shin collision avoidance

Non-zero foot size

Fig. 7. Shin collision planning: tracking performances of simulations andexperiments with three different terrain constraints (zero foot size, non-zerofoot size and non-zero foot size and shin) for a walk of 1m with three crawlcycles. The thick lines represent the base position x while the dashed linesrepresent the tracking error with respect to the desired trajectory along thesame x coordinate.

and due to the absence of a proper initialization. Accordingto the the characteristics of HyQ, we have chosen s = 0.3m,β=37◦ for the hind legs and β=127◦ for the front legs. Theshin collision is thus possible on HyQ only with hind legswhen walking up a step and front legs when walking down astep; which is automatically captured by the definition of theconstraint defined in (19). For this experiment we checkedpossible collision for the knee and for two points. Unlikethe previous version of the planner, in this case the trackingerror did not increase for a higher step, thanks to the largerrobustness given by the shin collision avoidance constraint.

V. CONCLUSION

In this paper we presented two theoretical contributionsconsisting of feasibility constraints aimed at increasing therobustness of trajectories that are optimized using the SRBDmodel. The first constraint focuses on including the joint-torque limits constraint and approximates the way theselimits are mapped into admissible contact forces dependingon the leg’s configuration. The proposed approximation issuitable for robots having contact points, such as quadrupedsand for motion planning applications based on simplifiedmodels, such as SRBD or CD. The second constraint, instead,is able to describe and approximate the volume of the robot’slegs in such a way to avoid undesired collisions between thelower limbs and the environment.

The experimental contribution of this paper consists ofthe hardware deployment of the optimal trajectories obtainedwith the formulation of [13] which would not have beenpossible on non-flat terrain without the feasibility constraintsthat we proposed above.

Future works include the development of strategies foronline replanning (the solver optimizes while the robotwalks) and the usage of pre-computed feasible solutions forthe warm start of every new nonlinear trajectory optimizationto reduce the computational time.

Page 8: On the Hardware Feasibility of Nonlinear Trajectory ...On the Hardware Feasibility of Nonlinear Trajectory Optimization for Legged Locomotion based on a Simpli ed Dynamics Angelo Bratta,

REFERENCES

[1] S. Kajita, F. Kanehiro, K. Kaneko, K. Yokoi, and H. Hirukawa, “The3d linear inverted pendulum mode: a simple modeling for a bipedwalking pattern generation,” in IEEE/RSJ International Conferenceon Intelligent Robots and Systems, Oct 2001, pp. 239–246.

[2] H. Geyer and U. Saranli, Gait Based on the Spring-Loaded InvertedPendulum. Dordrecht: Springer Netherlands, 2018, pp. 1–25.

[3] D. E. Orin, A. Goswami, and S.-H. Lee, “Centroidal Dynamics of aHumanoid Robot,” Auton. Robots, vol. 35, no. 2-3, pp. 161–176, 2013.

[4] P. M. Wensing and D. E. Orin, “Improved Computation of theHumanoid Centroidal Dynamics and Application for Whole-BodyControl,” International Journal of Humanoid Robotics, vol. 13, no. 1,2016.

[5] H. Dai, A. Valenzuela, and R. Tedrake, “Whole-body motion planningwith centroidal dynamics and full kinematics,” in IEEE-RAS Interna-tional Conference on Humanoid Robots, Nov 2014, pp. 295–302.

[6] A. Herzog, S. Schaal, and L. Righetti, “Structured contact forceoptimization for kino-dynamic motion generation,” in IEEE/RSJ In-ternational Conference on Intelligent Robots and Systems, Oct 2016,pp. 2703–2710.

[7] A. K. Valenzuela, “Mixed-integer convex optimization for planningaggressive motions of legged robots over rough terrain,” 2016.

[8] R. Budhiraja, J. Carpentier, and N. Mansard, “Dynamics Consensusbetween Centroidal and Whole-Body Models for Locomotion ofLegged Robots,” in IEEE International Conference on Robotics andAutomation, may 2019.

[9] F. Farshidian, E. Jelavic, A. Satapathy, M. Giftthaler, and J. Buchli,“Real-Time motion planning of legged robots: A model predictive con-trol approach,” in IEEE-RAS International Conference on HumanoidRobots, 2017, pp. 577–584.

[10] H. Dai and R. Tedrake, “Planning robust walking motion on uneventerrain via convex optimization,” in IEEE-RAS International Confer-ence on Humanoid Robots, 2016.

[11] B. Ponton, A. Herzog, A. Del Prete, S. Schaal, and L. Righetti,“On time optimization of centroidal momentum dynamics,” in IEEEInternational Conference on Robotics and Automation, 2018, pp. 1–7.

[12] J. Di Carlo, P. M. Wensing, B. Katz, G. Bledt, and S. Kim, “DynamicLocomotion in the MIT Cheetah 3 Through Convex Model-PredictiveControl,” in IEEE International Conference on Intelligent Robots andSystems, Jan. 2019, pp. 7440–7447.

[13] A. W. Winkler, C. D. Bellicoso, M. Hutter, and J. Buchli, “Gaitand Trajectory Optimization for Legged Systems through Phase-based End-Effector Parameterization,” IEEE Robotics and AutomationLetters (RA-L), vol. 3, no. 3, pp. 1560–1567, July 2018.

[14] F. Doshi, E. Brunskill, A. Shkolnik, T. Kollar, K. Rohanimanesh,R. Tedrake, and N. Roy, “Collision detection in legged locomotionusing supervised learning,” in IEEE International Conference onIntelligent Robots and Systems, 2007, pp. 317–322.

[15] V. Barasuol, G. Fink, M. Focchi, D. Caldwell, and C. Semini, “On theDetection and Localization of Shin Collisions and Reactive Actionsin Quadruped Robots,” in International Conference on Climbing andWalking Robots, Oct 2019.

[16] V. Samy, S. Caron, K. Bouyarmane, and A. Kheddar, “Post-ImpactAdaptive Compliance for Humanoid Falls Using Predictive Controlof a Reduced Model,” in IEEE-RAS International Conference onHumanoid Robotics, 2017, pp. 655–660.

[17] S. Fahmi, C. Mastalli, M. Focchi, and C. Semini, “Passive whole-bodycontrol for quadruped robots: Experimental validation over challengingterrain,” IEEE Robot. Automat. Lett. (RA-L), vol. 4, no. 3, pp. 2553–2560, Jul. 2019.

[18] Y. Ding, C. Li, and H. W. Park, “Single Leg Dynamic Motion Planningwith Mixed-Integer Convex Optimization,” in IEEE InternationalConference on Intelligent Robots and Systems, 2018, pp. 7391–7396.

[19] P. Chiacchio, Y. Bouffard-Vercelli, and F. Pierrot, “Force Polytopeand Force Ellipsoid for Redundant Manipulators,” Journal of RoboticSystems, vol. 14, no. 8, pp. 613–620, 1997.

[20] R. Orsolino, M. Focchi, C. Mastalli, H.Dai, D. G. Caldwell, andC. Semini, “Application of Wrench based Feasibility Analysis to theOnline Trajectory Optimization of Legged Robots,” IEEE Roboticsand Automation Letters (RA-L), pp. 3363–3370, 2018.

[21] R. Orsolino, M. Focchi, S. Caron, G. Raiola, V. Barasuol, andC. Semini, “Feasible Region: an Actuation-Aware Extension of theSupport Region,” IEEE Transactions on Robotics (TRO), 2020.

[22] C. Semini, N. G. Tsagarakis, E. Guglielmino, M. Focchi, F. Cannella,and D. G. Caldwell, “Design of HyQ -A hydraulically and electricallyactuated quadruped robot,” Proceedings of the Institution of Mechan-ical Engineers. Part I: Journal of Systems and Control Engineering,vol. 225, no. 6, pp. 831–849, 2011.

[23] B. Siciliano and O. Khatib, Springer Handbook of Robotics. Berlin,Heidelberg: Springer-Verlag, 2007.

[24] C. Gramkow, “On averaging rotations,” Journal of MathematicalImaging and Vision, vol. 15, no. 1, pp. 7–16, Jul 2001.

[25] H. Yamashita, “A global convergent primal-dual interior point methodfor constrained optimization,” Optimization Methods and Software,vol. 10, pp. 443–469, 1998.

[26] A. Wachter and L. T. Biegler, “On the implementation of an interior-point filter line-search algorithm for large-scale nonlinear program-ming,” Mathematical Programming, vol. 106, no. 1, pp. 25–57, mar2006.