14
SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 1 Proximity Queries between Convex Objects: An Interior Point Approach for Implicit Surfaces Nilanjan Chakraborty, Student Member, IEEE, Jufeng Peng, Srinivas Akella, Member, IEEE, and John Mitchell Abstract— This paper presents an interior point approach to exact distance computation between convex objects represented as intersections of implicit surfaces. Exact distance computation algorithms are particularly important for applications involving objects that make contact, such as in dynamic simulations and in contact point prediction for dextrous manipulation. They can also be used in the narrow phase of hierarchical collision detection. In contrast to geometric approaches developed for polyhedral objects, we formulate the distance computation prob- lem as a convex optimization problem; this optimization for- mulation has been previously described for polyhedral objects. We demonstrate that for general convex objects represented as implicit surfaces, interior point approaches are sufficiently fast, and owing to their global convergence properties, are the only provably good choice for solving proximity query problems for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the convex programming formulation. For the case of polyhedra and quadrics, we establish a theoretical time complexity of O(n 1.5 ), where n is the number of constraints. We present implemen- tation results for example implicit surface objects, including polyhedra, quadrics, and generalizations of quadrics such as superquadrics and hyperquadrics, as well as intersections of these surfaces. We demonstrate that in practice, the algorithm takes time linear in the number of constraints, and that distance computation rates of about 1 kHz can be achieved. We also extend the approach to proximity queries between deforming convex objects. Finally, we show that continuous collision detec- tion for linearly translating objects can be performed by solving two related convex optimization problems. For polyhedra and quadrics, we establish that the computational complexity of this problem is O(n 1.5 ). Index Terms— Proximity query, closest points, smooth ob- jects, interior point algorithms, collision detection, dynamic simulation. I. I NTRODUCTION This paper studies the problem of computing the closest points on two convex objects, when each object is de- scribed as an intersection of implicit surfaces. Exact dis- Nilanjan Chakraborty and Srinivas Akella are with the Depart- ment of Computer Science at Rensselaer Polytechnic Institute (Email: [email protected]; [email protected]). Jufeng Peng was with the De- partment of Mathematical Sciences at Rensselaer Polytechnic Institute and is currently with the Progressive Insurance Company (Email: jame- [email protected]). John Mitchell is with the Department of Mathematical Sciences at Rensselaer Polytechnic Institute (Email: [email protected]). This work was supported in part by NSF under CAREER Award No. IIS-0093233. The corresponding author is Srinivas Akella, Department of Computer Science, Rensselaer Polytechnic Institute, 110 Eighth Street, Troy, New York 12180, USA. Tel: (518) 276-8770, Fax: (518) 276-4033, Email: [email protected]. tance computation algorithms are usually used in the nar- row phase of a collision detection algorithm in applications where knowledge of the closest points is required rather than just a yes/no answer for collision. Such applications are characterized by existence of intermittent contact, i.e., phases of contact and no contact between the objects, with a concomitant need to predict potential contact points. Some example applications are dynamic simulation ([1],[35],[51]), computer animation ([11]), dextrous manipulation ([37],[7]), and haptics ([33],[15]). Other applications where collision avoidance is the primary goal may also make use of the knowledge of the closest distance information. Examples of such applications include robot path planning [43] and spacecraft safe volume computations [16]. It is well known that the evolution of contact points for continuous contact states depends on the relative curvature of the two contacting bodies ([36], [27]). Polygonalization may lead to poor approximation of the object curvature and consequently affect the accuracy of the dynamic sim- ulation. For applications in engineering analysis of objects in intermittent contact [50], such discretization may not be desirable. To the best of our knowledge, there is no published study on the effects of polygonal approximations even for simple dynamic systems. Therefore, to illustrate the effects of polygonalization, we simulated the motion of a disc rolling on a table. Figure 1 shows that the simulated circular disc rolling on a flat plane loses energy, when represented as a polygon, due to repeated impacts of the vertices with the table. More generally, polygonalized representations of smooth objects can lead to intermittent loss of contact and bouncing in the simulations. Another aspect of dynamic systems with inter- mittent contact that we are interested in is the effect of shape on the ensuing dynamics. The effect of shape and surface curvature on the dynamic motion of contacting objects is dramatically illustrated by a spinning boiled egg and toys such as the rattleback (or Celtic wobblestone) [47], [19]. Similarly, exact representation of shape is important when modeling robot fingers in contact with smooth objects during multi-finger dextrous manipulation (Figure 2). Determining the first contact point correctly when fingers reposition during finger gaiting is useful since the manipulation operations are sensitive to the contact point and the normal and curvature at that point ([7],[40]). The general problem of distance computation between two

Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 1

Proximity Queries between Convex Objects:An Interior Point Approach for Implicit Surfaces

Nilanjan Chakraborty,Student Member, IEEE,Jufeng Peng, Srinivas Akella,Member, IEEE,and John Mitchell

Abstract— This paper presents an interior point approach toexact distance computation between convex objects representedas intersections of implicit surfaces. Exact distance computationalgorithms are particularly important for applications in volvingobjects that make contact, such as in dynamic simulations andin contact point prediction for dextrous manipulation. Theycan also be used in the narrow phase of hierarchical collisiondetection. In contrast to geometric approaches developed forpolyhedral objects, we formulate the distance computationprob-lem as a convex optimization problem; this optimization for-mulation has been previously described for polyhedral objects.We demonstrate that for general convex objects representedas implicit surfaces, interior point approaches are sufficientlyfast, and owing to their global convergence properties, aretheonly provably good choice for solving proximity query problemsfor some object classes. We use a primal-dual interior pointalgorithm that solves the KKT conditions obtained from theconvex programming formulation. For the case of polyhedra andquadrics, we establish a theoretical time complexity ofO(n1.5),where n is the number of constraints. We present implemen-tation results for example implicit surface objects, includingpolyhedra, quadrics, and generalizations of quadrics suchassuperquadrics and hyperquadrics, as well as intersectionsofthese surfaces. We demonstrate that in practice, the algorithmtakes time linear in the number of constraints, and that distancecomputation rates of about 1 kHz can be achieved. We alsoextend the approach to proximity queries between deformingconvex objects. Finally, we show that continuous collisiondetec-tion for linearly translating objects can be performed by solvingtwo related convex optimization problems. For polyhedra andquadrics, we establish that the computational complexity of thisproblem is O(n1.5).

Index Terms— Proximity query, closest points, smooth ob-jects, interior point algorithms, collision detection, dynamicsimulation.

I. I NTRODUCTION

This paper studies the problem of computing the closestpoints on two convex objects, when each object is de-scribed as an intersection of implicit surfaces. Exact dis-

Nilanjan Chakraborty and Srinivas Akella are with the Depart-ment of Computer Science at Rensselaer Polytechnic Institute (Email:[email protected]; [email protected]). Jufeng Peng was with the De-partment of Mathematical Sciences at Rensselaer Polytechnic Instituteand is currently with the Progressive Insurance Company (Email: [email protected]). John Mitchell is with the Department of MathematicalSciences at Rensselaer Polytechnic Institute (Email: [email protected]). Thiswork was supported in part by NSF under CAREER Award No. IIS-0093233.

The corresponding author is Srinivas Akella, Department ofComputerScience, Rensselaer Polytechnic Institute, 110 Eighth Street, Troy, NewYork 12180, USA. Tel: (518) 276-8770, Fax: (518) 276-4033, Email:[email protected].

tance computation algorithms are usually used in the nar-row phase of a collision detection algorithm in applicationswhere knowledge of the closest points is required ratherthan just a yes/no answer for collision. Such applicationsare characterized by existence of intermittent contact, i.e.,phases of contact and no contact between the objects, witha concomitant need to predict potential contact points. Someexample applications are dynamic simulation ([1],[35],[51]),computer animation ([11]), dextrous manipulation ([37],[7]),and haptics ([33],[15]). Other applications where collisionavoidance is the primary goal may also make use of theknowledge of the closest distance information. Examplesof such applications include robot path planning [43] andspacecraft safe volume computations [16].

It is well known that the evolution of contact points forcontinuous contact states depends on the relative curvatureof the two contacting bodies ([36], [27]). Polygonalizationmay lead to poor approximation of the object curvatureand consequently affect the accuracy of the dynamic sim-ulation. For applications in engineering analysis of objectsin intermittent contact [50], such discretization may not bedesirable. To the best of our knowledge, there is no publishedstudy on the effects of polygonal approximations even forsimple dynamic systems. Therefore, to illustrate the effects ofpolygonalization, we simulated the motion of a disc rollingona table. Figure 1 shows that the simulated circular disc rollingon a flat plane loses energy, when represented as a polygon,due to repeated impacts of the vertices with the table. Moregenerally, polygonalized representations of smooth objectscan lead to intermittent loss of contact and bouncing in thesimulations. Another aspect of dynamic systems with inter-mittent contact that we are interested in is the effect of shapeon the ensuing dynamics. The effect of shape and surfacecurvature on the dynamic motion of contacting objects isdramatically illustrated by a spinning boiled egg and toyssuch as the rattleback (or Celtic wobblestone) [47], [19].Similarly, exact representation of shape is important whenmodeling robot fingers in contact with smooth objects duringmulti-finger dextrous manipulation (Figure 2). Determiningthe first contact point correctly when fingers reposition duringfinger gaiting is useful since the manipulation operations aresensitive to the contact point and the normal and curvatureat that point ([7],[40]).

The general problem of distance computation between two

Page 2: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 2

objectsX andY can be written as

Minimize ‖xg − yg‖2

subject to: xg ∈ X, yg ∈ Y(1)

where the two objectsX andY are represented as compact(closed and bounded) sets inR2 or R

3 and the pointsxg

and yg are points in the two objects. This problem hasbeen extensively studied ([25], [32]), mainly for polyhedralobject representations ([18], [21], [31], [34]). In this paper,we focus on representing the setsX andY as intersections ofimplicit surfaces, including planes, quadrics, superquadrics,and hyperquadrics. We assume that an implicit surface modelof each object is given to us. Our choice of object rep-resentation is motivated by the goal of simulating systemswith smooth objects, where polygonal discretizations maynot be desirable. (While parametric representations can alsorepresent smooth objects, they provide a surface descriptionof objects with nonlinear equations and thus the resultingproblem is not a convex optimization problem even forconvex objects.) The literature on distance computation be-tween general implicit surfaces is relatively sparse because,with a few notable exceptions ([20],[53]), methods for poly-hedral representations do not easily generalize to implicitsurfaces. Having a smooth representation of objects and analgorithm to perform distance computation between suchrepresentations will enable the study of the effects of shapeand polygonalization on dynamic simulation of systems withintermittent contact.

Contributions of the paper:This paper focuses on the prob-lem of computing the minimum distance between two convexobjects, where each object is described as an intersectionof implicit surfaces. This class of convex objects includesfor example, convex polyhedra, quadrics, superquadrics, and

0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 59

10

11

12

13

14

15

16

17

time (seconds)

Tot

al E

nerg

y (J

oule

s)

10vertices20vertices40vertices75vertices100vertices1000vertices

Fig. 1. Energy plots of a circle rolling on a table, with the circleapproximated as a polygon withn vertices. Asn increases, the polygonbetter approximates the circle and the energy loss decreases. The dynamicsimulation uses the Stewart-Trinkle [51] time stepping formulation andassumes Coulomb friction and inelastic impacts [4].

Fig. 2. A dextrous manipulation task that requires closest distancecomputations to predict the contact points of fingers with anobject. Thefingers and object are represented as superquadrics.

hyperquadrics. While the distance computation problem forconvex objects represented by convex inequalities has beenknown to be a convex optimization problem ([5],[6]), tothe best of our knowledge, interior point algorithms havenot been previously applied to this problem. Interior pointmethods are well suited for this class of optimization prob-lems since they are guaranteed to converge to the globaloptimum for convex problems. Further, they exhibit poly-nomial convergence for special classes of functions calledself-concordant functions. We apply a recently developedinterior point algorithm [8], [59] to compute the distancebetween convex implicit surface objects and demonstratethat it is particularly effective for this class of problems.For polyhedral and quadric surfaces, the algorithm takesO(n1.5) time, wheren is the number of constraints. Wealso illustrate the approach on surfaces such as superquadricsand hyperquadrics. To the best of our knowledge, this isthe first approach with this demonstrated capability (withoutdiscretization). Another important advantage of this methodis that it provides a uniform framework for proximity queriesbetween objects described as intersections of convex poly-hedra, quadrics, or any arbitrary convex implicit surface.Further, these proximity queries can be used in the narrowphase of hierarchical collision detection for implicit sur-faces. We present implementation results for example implicitsurface objects that show that the algorithm exhibits lineartime performance in practice, and demonstrate that distancecomputation rates of about 1 kHz can be achieved. We alsoextend the approach to proximity queries between deformingconvex objects. Finally, we show that continuous collisiondetection for linearly translating objects can be performedby solving two related convex optimization problems. Forpolyhedra and quadrics, we establish that the time complexityof this continuous collision detection problem isO(n1.5).

Page 3: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 3

The paper is organized as follows. After a discussionof related work in Section II, we review the mathematicalbackground for our work in Section III. We present theformulation of the closest distance problem in Section IVand describe how it can be solved using interior pointalgorithms in Section V. Section VI provides theoreticaland practical results on the complexity of the closest pointalgorithm. Section VII extends the approach to continuousproximity queries for linearly translating objects. We presentour implementation results in Section VIII and conclude witha discussion of future work in Section IX. A preliminaryversion of this work appeared in [13].

II. RELATED WORK

Proximity queries for polyhedra:Proximity queries andcollision detection algorithms have an extensive literaturein computational geometry [18], robotics [21], [31], andcomputer graphics [53]. We provide a sampling of the relatedwork in these areas; see [32] and [25] for an overview ofcollision detection and proximity queries. When collisionde-tection algorithms estimate the distance between two objects,they typically use a geometric approach. Popular algorithmsfor convex polyhedra include GJK [21], Lin-Canny [31], andV-Clip [34]. GJK [21] is an iterative algorithm for distancecomputation between two convex polyhedra. It uses a supportfunction description of the polyhedra and takes time linearinthe number of vertices. Lin-Canny [31] efficiently computesthe distance between two convex polyhedra and tracks theclosest points using adjacency of features. Its running timeis linear in the number of features (faces, edges, and vertices).Both algorithms can track the closest points in (almost) con-stant time when there is temporal coherence [10]. Bobrow [5]proposed an optimization based approach for computing thedistance between two convex polyhedra. He formulated theproblem as a quadratic programming problem and used agradient projection algorithm to solve the problem. Howeverthis approach can suffer from convergence issues [62].

Proximity queries for quadrics and NURBS:Distance esti-mation between non-polyhedral shapes has focused primarilyon quadrics and NURBS surfaces. Among the algorithms forpolyhedra, only GJK has been extended directly for smoothconvex objects [20]; van den Bergen [53] discusses in detaila GJK implementation for convex quadric objects. Howeverthis GJK algorithm does not guarantee convergence in a finitenumber of steps. Further, computing the support mappingis difficult for superquadrics with fractional (non-integer)exponents due to the difficulty of solving polynomial equa-tions with fractional exponents. Turnbull and Cameron [52]extended GJK to convex NURBS surfaces. They describe aprocedure to calculate the support mapping for the NURBSsurfaces which reduces to solving two nonlinear polyno-mial equations in two parameters. They present results for2D and describe the theory for 3D. Baraff [1] described

collision detection algorithms for implicit and parametriccurved convex surfaces. He uses the collinearity propertyof the surface normals of the closest points to numeri-cally compute closest points at the initial configuration. Heexploits geometric coherence to compute closest points atsubsequent configurations. Lin and Manocha [30] considercurved models described as NURBS surfaces and piecewisealgebraic surfaces. Using the collinearity property of thesurface normals, they describe the closest points using aset of polynomial equations. However, the number of rootscan be prohibitively large as it depends on the degree ofthe polynomials describing the surfaces; the roots must beexamined to identify the closest points. Note also that it isnot possible to obtain bounds on the number of roots forsystems of equations with fractional indices (as would arisewith superquadrics). Schomer et al. [48] describe a collisiondetection algorithm for curved objects bounded by quadricsurface patches by finding roots of univariate polynomials ofdegrees 4 and 8. Johnson and Cohen [26] give a lower-upperbound tree framework for distance computation between anytwo object representations for which the following set ofoperations is available: bounding volume generation, lowerand upper bound on distance, bounding volume refinement,and determination of computation termination. They havedemonstrated their method on polyhedra as well as NURBSsurfaces. Patoglu and Gillespie [39] perform real-time track-ing of the closest points between two objects modeled withparametric surfaces by formulating it as a control problemand exploiting spatial and temporal coherence.

The literature on distance computation between generalimplicit surfaces is relatively sparse because, with the ex-ception of GJK, methods for polyhedral representations donot easily generalize to implicit surfaces. In fact, no closedform solution exists even for the distance between a pointand an ellipsoid. Most closely related is recent work oncomputing the distance between two ellipsoids and otherconic sections ([29], [16], [49]). Sohn et. al. [49] exploitthe fact that the closest points on two surfaces are wheretheir common normals intersect the surfaces. They applytheir line geometry approach to ellipsoids, for which theminimum distance computation is reduced to finding thecommon roots of two polynomial equations of degree 8 and16. Coppola and Woodburn [16] formulate the problem asan optimization problem. They iteratively solve the problemof closest distance from a point to an ellipsoid to arrive atthe optimal solution. Rimon and Boyd [46] use convex opti-mization techniques to find the minimum volume enclosingellipsoids to model objects, and then compute a conservativedistance estimate between ellipsoids by treating it as aneigenvalue problem. Choi et al. [14] present a continuouscollision detection algorithm for two elliptical disks movingin the plane. Collisions are identified by checking for thereal roots of the univariate discriminant of the characteristic

Page 4: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 4

equation of the two moving ellipses. Although superquadricsare a generalization of quadrics, the problem in generalizingthe methods in [1],[21],[16],[49] to superquadrics is thattheyall lead to polynomial equations with fractional exponents,which are very difficult to solve. In general, we do notknow the total number of roots, and even when it is possibleto simplify the polynomials, they may have large integerexponents.

III. M ATHEMATICAL PRELIMINARIES

We now review the mathematical terminology that will beused in the rest of the paper.Convex Set:A set U ⊆ R

n is called a convex set if for anytwo pointsu1, u2 ∈ U and anyλ with 0 ≤ λ ≤ 1, we have

λu1 + (1 − λ)u2 ∈ U.

Convex Function:A function f : Rn → R is convex if the

domain off (dom f ) is a convex set and for allu1, u2 ∈domf and anyλ with 0 ≤ λ ≤ 1, we have

f(λu1 + (1 − λ)u2) ≤ λf(u1) + (1− λ)f(u2).

Convex Programming Problem:Consider the general nonlin-ear programming problem given by:

Minimize f0(x)

subject to: x ∈ U(2)

This nonlinear programming problem is called a convexprogramming problem if the objective functionf0 is aconvex function and the feasible setU is a convex set [3].Usually the setU is defined by a set of inequality and/orequality constraints. If the inequality constraints defining Uare convex functions and the equality constraints are linear,thenU is a convex set [6].

Superquadric:A superquadric [24] is defined by the equa-tion

f(x) =

x1

a1

n1

+

x2

a2

n2

+

x3

a3

n3

− 1 = 0

ni = li/mi, li, mi ∈ Z+, i ∈ {1, 2, 3}

f(x) convex if 1 ≤ ni <∞

f(x) nonconvex if 0 < ni < 1

(3)

Although the definition here differs slightly from that in [2],the two definitions are equivalent [24]. Convex superquadricsare a broad class of shapes that include cuboids, roundedcuboids, ellipsoids, spheres, and (rounded) octahedra. Theplanes

xi

ai

∣ ≤ 1, i = 1, 2, 3 define a bounding cube for thesuperquadric and the indices control the roundedness of theshape. Different shapes can be obtained by varyingni. Theshape is a rhomboid whenni = 1, and the shape becomes acube asni tends to infinity.

Hyperquadric: A hyperquadric [24] is defined by theequation

f(x) =

N∑

i=1

|Hi(x)|ni − 1 = 0 whereN ≥ 3 and

Hi(x) = (aix1 + bix2 + cix3 + di)

ni = li/mi, li, mi ∈ Z+

f(x) convex if 1 ≤ ni <∞

f(x) nonconvex if 0 < ni < 1

(4)

Hyperquadrics are a more general class of shapes than su-perquadrics. In particular, they include asymmetric shapes. Inthis case also, the intersection of the planesHi(x) ≤ 1 forma bounding polytope for the hyperquadric and the indicescontrol the roundedness of the shape.

Self-concordant functions:A convex functionf : R→ R isself-concordant if|f ′′′(x)| ≤ 2f ′′(x)3/2 for all x ∈ domf .A convex functionf : R

n → R is self-concordant if it isself-concordant along every line in its domain (see [6] fordetails).

IV. PROBLEM FORMULATION

In this section we present the formulation of the min-imum distance computation problem. We first outline ageometric approach to the minimum distance problem thathas been popular in prior work on non-polyhedral objects([1],[30],[49]) and connect it to an optimization formulation.Let fX be an implicit function representing objectX andfY be an implicit function representing objectY , and letxg, yg be the global coordinates of points inX and Yrespectively. To compute the closest distance betweenXand Y , the approach uses the geometric condition that thenormals on the two surfaces at the closest points are alignedwith each other. Using this and the condition that the closestpoints should lie on the surfaces of the two objects, we canobtain the closest points by solving the following system ofnonlinear equations

xg − yg = −λX∇fX(xg)

xg − yg = λY∇fY (yg)

fX(xg) = 0

fY (yg) = 0

(5)

where λX and λY are scalars. The conditions given byEquation 5 are precisely the Karush-Kuhn-Tucker (KKT)conditions for solving the following optimization problem.

Minimize ‖xg − yg‖2

subject to: fX(xg) = 0

fY (yg) = 0

(6)

However note that whenfX andfY are nonlinear, the aboveproblem is nonconvex even when the objects are convex andthe solution can therefore get stuck in a local minimum.

Page 5: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 5

We now formulate the problem of minimum distancecomputation between two convex objects as a convex opti-mization problem. Each object is assumed to be described asan intersection of a finite number of implicit primitives (i.e.,a finite number of algebraic inequalities). In general, eachofthe intersecting surfaces may be specified in its own referenceframe. The distance computation problem of Equation 1 canthen be written as

Minimize ‖xg − yg‖22

subject to: xg = Rxixli + pxi i = 1, . . . , m

yg = Ryjylj + pyj j = m + 1, . . . , n

fi(xli) ≤ 0 i = 1, . . . , m

fj(ylj) ≤ 0 j = m + 1, . . . , n

(7)

wherexg, yg ∈ R3 are the global coordinates of points in

the two objectsX and Y respectively;Rki,pki, k = x, y,are the rotation matrix and position of the reference frameof each of the intersecting surfaces with respect to the globalframe,xli, ylj ∈ R

3 are the coordinates of the points in thelocal reference frames of the surfaces, andfk (k = i, j) arethe functions representing the implicit surfaces in the localreference frames. The above system has3n linear equalityconstraints andn inequality constraints. Note that the linearconstraints in Equation 7 can be any affine transformation(not necessarily a rigid body transformation). In particular,we can handle global deformations like nonuniform scalingby post multiplying the rotation matrix with a scaling matrix.

From the linear constraints in Equation 7 we can easilyevaluatexli andylj and so the inequality constraints can beexpressed in terms ofxg andyg. Therefore, without loss ofgenerality, we can assume that the implicit surface describingthe objects is described in a global reference frame. Thedistance computation problem of Equation 1 is then givenby

Minimize ‖xg − yg‖22

subject to: fi(xg) ≤ 0 i = 1, . . . , m

fj(yg) ≤ 0 j = m + 1, . . . , n

(8)

wherefk (k = i, j) are the functions representing the implicitsurfaces in the global reference frame. The above system hasn inequality constraints. The objective function in Equation 8is convex, and if the inequalities represent a convex set (i.e.,the objects are convex), the minimum distance computationproblem is a convex programming problem. For generalconvex surfaces, the distance computation problem is anonlinear program (NLP). For objects described as convexquadric surfaces, the problem reduces to a quadraticallyconstrained quadratic program (QCQP), and if the objectsare convex polyhedra (intersections of planes), the closestdistance problem becomes a quadratic programming (QP)problem.

02

4 0 1 2 3 4

−1

0

1

2

3

4

5

6

yx

z

III

II

I

Fig. 3. Three example objects. The closest points of each pair of objectsare shown connected by a line segment.

The solution to the minimum distance problem of Equa-tion 8 gives two closest points that lie on the surfaces ofthe two objects (i.e., boundaries of the two sets). We usean interior point algorithm [8] for solving this problem.See Figure 3 for an example solution generated using aninterior point algorithm. Interior point methods [60] are aclass of optimization algorithms for nonlinear programmingproblems. In contrast to algorithms for finding the closestpoints that generate iterates that lie on the surface of theobjects (gradient projection [5], for example), feasible interiorpoint methods generate iterates that are guaranteed to lieinside the objects and converge towards the closest pointson the boundaries of the objects. This is the main conceptualdifference between interior point methods and other methods.Sequential quadratic programming (SQP) is another methodfor solving general nonlinear programming problems [22]. Incontrast to SQP, interior point methods have polynomial timeconvergence guarantees for certain convex problems, as wedescribe in Section VI. Moreover, an informal comparisonof SQP implementations with interior point algorithm imple-mentations on the NEOS server [17] shows the interior pointmethods to be slightly faster. Therefore, we choose to solvethe optimization problem with an interior point algorithm.

V. I NTERIOR POINT ALGORITHM

In this section, we present theprimal-dual interior pointalgorithm for solving the optimization problem described inEquation 8. The Karush-Kuhn-Tucker (KKT) conditions givenecessary and sufficient conditions for solving the minimumdistance problem in Equation 8, since it is a convex opti-mization problem and satisfies Slater constraint qualification.For ease of presentation, we rewrite Equation 8 in a general

Page 6: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 6

nonlinear program format as

Minimize f0(x)

subject to: f(x) + s = 0

s ≥ 0

(9)

wheref0(x) = ‖xg−yg‖22, x = [xT

g ,yTg ]T is a6×1 column

vector,s is an n × 1 column vector of slack variables, andf : R

6 → Rn is the vector of inequality constraints. The

Lagrangian for the above constrained optimization problemcan be written as

f0(x) + λT(f(x) + s) (10)

where λ is an n × 1 vector of Lagrange multipliers. TheKKT conditions for Equation 9 are the system of nonlinearequations below:

∇f0(x) + (∇f(x))T λ = 0

f(x) + s = 0

LSe = 0

(11)

HereL is ann× n diagonal matrix of theλ variables,S isann×n diagonal matrix of the slack variabless, ande is ann-vector of ones. The above is a system of2n + 6 nonlinearequations in the2n+6 variablesx, λ, s. Equation 11 can besolved by Newton’s method for solving systems of nonlinearequations. It converges to the correct solution if the initialguess isnear enough[38]. However, in general, it is verydifficult to supply a good initial guess and there is then noguarantee that Newton’s method will converge. The maindifficulty in using Newton’s method is that we have to ensures ≥ 0, which may lead to very small step lengths that resultin convergence problems.

Interior point methods are a general class of algorithmsfor solving nonlinear programming problems. In essence,these methods approximately solve a sequence of systemsof nonlinear equations that are formed by perturbing thecomplementarity equations (LSe = 0) in the KKT condi-tions. Following [6], we present the interior point method byreformulating Equation 9 as abarrier problem.

Minimize f0(x)− µ

n∑

i=1

ln(si)

subject to: f(x) + s = 0

(12)

The formulation in Equation 12 is thebarrier formulation [6]of the minimum distance problem of Equation 9 andµ iscalled the barrier parameter, withµ > 0. Equation 12 differsfrom Equation 9 in that the nonnegativity constraints ons arenot present explicitly, but are implicit in the objective. TheLagrangian for the above constrained optimization problemcan be written as

f0(x) − µ

n∑

i=1

ln(si) + λT(f(x) + s) (13)

Central Path

Fig. 4. Schematic illustration of the interior point methodfor a pathfollowing algorithm. The convex region represents the feasible set. Thecentral path is an arc of strictly feasible points that solveEquation 14 asthe parameterµ approaches0. The progress of the iterates generated bythe interior point solver is indicated by the polygonal lineconnecting them.The iterates are guaranteed to lie within a neighborhood, represented by thecircular ball, of the central path.

whereλ is the vector of Lagrange multipliers. Thus, the KKTconditions can be written as

∇f0(x) + (∇f(x))T λ = 0

f(x) + s = 0

LSe− µe = 0

(14)

The above equation represents a system of2n + 6 nonlinearequations in2n + 6 variables and can be approximatelysolved for a givenµ. Note that Equation 11 and Equation 14differ in the complementarity conditions. As the barrierparameterµ approaches0, the KKT conditions for the barrierproblem (Equation 14) approach the KKT conditions of theoriginal problem (Equation 11). See Figure 4 for a schematicillustration of the interior point method.

For our proximity query problem, feasible interior pointmethods generate iterates that yield points guaranteed to lieinside the objects and converge towards the closest pointson the boundaries of the objects. See the example proximityquery in Figure 5.

The general structure of interior point methods is indicatedin Algorithm 1, where termination criterion1 is the endingcondition for the whole problem (Equation 11) and termi-nation criterion2 is the ending condition for approximatelysolving Equation 14 for the current value ofµ. The outerwhile loop determines the number of timesµ has to beupdated, i.e., the number of times Equation 14 has to beapproximately solved for the sequence ofµ values. Theinner while loop is a variant of Newton’s method used forapproximately solving Equation 14 for a fixed value ofµ. Thedifferent interior point implementations (KNITRO [8], [59],LOQO [56], [57], IPOPT [58]) vary in the way they calculatethe step lengths for a particular value ofµ, the terminationcriteria they use, and the way in which they updateµ.

Page 7: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 7

−1 0 1 2 3 4−1

−0.5

0

0.5

1

1.5

2

2.5

3

3.5

4Progress of the Iterates in Interior point method

x

y

Fig. 5. Example illustrating the sequence of closest point estimatesgenerated by the interior point method for two 2D superquadric objects,with indices( 23

11, 11

5), ( 76

7, 71

5) and semiaxes1. The iterates of the interior

point method are mapped to corresponding points in the objects.

Algorithm 1 Interior point algorithmInput: initial strictly feasiblex0, initial barrier parameterµ0, specified toleranceǫ, and KKT equationsOutput: Closest points solutionx

k ← 0while termination criterion 1 not satisfieddo

while termination criterion 2 not satisfieddoSolve the system of linear equations //determine

// Newton directionDetermine step lengthαk by line searchxk+1 ← xk + αk∆xk

sk+1 ← sk + αk∆sk

λk+1 ← λk + αk∆λk

k ← k + 1end whileµ ← cµ // c < 1, may be constant or adaptive

end whilereturn xk

VI. COMPUTATIONAL COMPLEXITY

The total cost of solving a problem using Algorithm 1 isthe product of the total number of iterations (considering bothloops) and the computational effort in solving the system oflinear equations to determine the Newton direction in eachiteration. The system of linear equations to be solved todetermine the Newton direction is

A1 A2

T 06×n

A2 0n×n In×n

06×n S L

∆x

∆λ∆s

=

−F1

−F2

−F3

(15)

whereA1 = ∇2f0(x) +∑n

i=1λi∇

2fi(x) is a 6× 6 matrix,A2 = ∇f(x) is a n × 6 matrix, the definitions ofS andL

are the same as before, andF1 = ∇f0(x) + (∇f(x))T λ,F2 = f(x) + s, F3 = LSe− µe.

In general, the computational cost of solving a system ofnlinear equations inn unknowns isO(n3). However, we nowestablish that the system of linear equations can be solved inO(n) time. By simple algebraic manipulation of the aboveequations, we obtain the following formulas for∆x, ∆λ, and∆s:

∆x = G−1(−F1 −AT2 (S−1L)(F2 + L−1F3))

∆λ = (S−1L)(A2∆x− F2 + L−1F3)

∆s = −L−1(F3 + S∆λ)

(16)

whereG = A1 +AT2 (S−1L)A2. SinceG is a6 × 6 matrix,

G−1 can be computed in constant time. Moreover,S andL

aren×n diagonal matrices, soS−1 andL−1 can be computedin linear time. Thus we can compute all the inverses inO(n).Moreover, noting the dimensions ofA1 and A2, we cansee by inspection that the matrix multiplication also requiresO(n) operations. So Equation 16 can be evaluated inO(n)time, or in other words, the computation of the Newtonstep takesO(n) time. Note that we have not made anyassumptions regarding the primitive surface describing theobject. Thus this analysis is valid for any implicit surface(including planes, quadrics, superquadrics, hyperquadrics,etc.) and for intersections of these implicit surfaces.

For general functions, there is no known bound on the totalnumber of iterations (including both while loops). However,if the log barrier function of the implicit surface constraintsis a self-concordant function (refer to Section III), the num-ber of Newton iterations (which is the number of timesEquation 15 must be solved) is polynomial in a parameterdepending on the structure of the function. For polyhedralconstraints and quadric constraints the number of Newtoniterations required for converging to the optimal solutionisO(n0.5). This implies that the theoretical complexity of ourapproach for polyhedra and quadrics isO(n1.5). Although al-gorithms with theoretical linear time guarantees are availablefor polyhedra, for the case of quadrics, as far as we know, thisis the best known bound. Moreover, our experiments indicatethe algorithm exhibits linear time behavior in practice, asshown in Figure 6 and Figure 7.

For superquadrics and hyperquadrics, the log barrier func-tion might not be self-concordant in the general case. How-ever, note that superquadric and hyperquadric functions haveself-concordant barriers because they define convex regions,and every convex region has a self-concordant barrier (itsuniversal barrier). If this barrier is too hard to find to beuseful computationally, an alternative is to decompose thefunction into simpler functions (for example, as second ordercones [41]) such that the sum of the barriers for the simplerfunctions gives a barrier for the original superquadric orhyperquadric. However these representations may lead tocomputationally slower solutions due to the increased number

Page 8: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 8

0 2000 4000 6000 8000 10000−500

0

500

1000

1500

2000

Number of Planes

Run

ning

Tim

e (m

illis

econ

ds)

Fig. 6. Plot showing observed linear time behavior of the interior pointalgorithm for polyhedra.

10 20 30 40 50 60 70 80 90 1000

1

2

3

4

5

6

7

8

9

Number of Quadric Constraints

Run

ning

Tim

e (m

illis

econ

ds)

Fig. 7. Plot showing observed linear time behavior of the interior pointalgorithm for quadrics.

of variables and constraints. Glineur and Terlaky [23] pro-vide self-concordant formulations forlp-norm minimizationthat apply to superquadrics and hyperquadrics. However thecomputational performance of these formulations has not yetbeen explored in the literature. Moreover, the observed timecomplexity of the interior point algorithm islinear for thisclass of shapes (Figure 8), which implies that in practice thenumber of iterations is constant, i.e., independent of the sizeof the problem. The observed linear time behavior of theinterior point algorithm even without self-concordant repre-sentations further justifies the use of an interior point-basedsolver for this generic nonlinear programming formulation.

VII. C ONTINUOUS PROXIMITY QUERIES FOR

TRANSLATING OBJECTS

We now address the problem of continuous proximityqueries for two linearly translating objects. Such queriescan be useful in identifying feasible object motions duringassembly planning. The goal is to determine the exact timeat which the two moving objects are closest, without discrete

10 20 30 40 50 60 70 80 90 1000

2

4

6

8

10

12

14

Number of Superquadric Constraints

Run

ning

Tim

e (m

illis

econ

ds)

Fig. 8. Plot showing observed linear time behavior of the interior pointalgorithm for superquadrics.

sampling of their configurations. This computation of theclosest distance between two swept objects is closely relatedto the problem of continuous collision detection ([12], [9],[61], [44], [45], [55]), where the time of first contact betweentwo colliding objects is to be determined; however mostprior work has been restricted to polyhedral objects. Theadvantage of such continuous collision detection methods isthe ability to detect collisions even for fast moving objectsin the presence of thin obstacles.

We address the continuous collision detection problem forlinearly translating objects by solving two related convexoptimization problems. Assume the objects are moving alongpiecewise linear paths. LetX andY be two objects describedby fX(xl) ≤ 0 and fY (yl) ≤ 0. Let the two objects belinearly translating along the directions specified by theunit vectors gx and gy with constant velocitiesvx andvy respectively. The following optimization problem findsthe minimum distance between the two objects in the timeinterval[0, tmax], where each object is moving along a singleline segment. If the minimum distance is greater than zero,the solution provides the closest points and the timet atwhich the objects are closest. See Figure 9.

Minimize ‖xg − yg‖22

subject to: xg = Rxxl + px + vxtgx

yg = Ryyl + py + vytgy

fX(xl) ≤ 0

fY (yl) ≤ 0

t ≤ tmax

t ≥ 0

(17)

When the objects intersect, the problem above has multiplesolutions corresponding to zero distance. The time of firstcontact can be obtained by solving another convex optimiza-tion problem using the solution of Equation 17. LetQ be

Page 9: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 9

−4 −3 −2 −1 0 1 2 3 4 5 −20

2−2

−1

0

1

2

3

4

5

6

yx

z

Fig. 9. Computing the instant of closest distance using the continuousproximity query. The bold blue line connects the closest points on the twoobjects, as they translate along the indicated line segments.

−4 −3 −2 −1 0 1 2 3 4 5−2

0

2

−2

−1

0

1

2

3

4

5

y

x

z

Fig. 10. Computing the time of first contact using the continuous proximityquery gives the solution to the continuous collision detection problem.

the set of intersecting points andq ∈ Q be a point specifiedin the global coordinate system. To obtain the time of firstcontact, we solve the problem below, starting from an initialfeasible guess that is the solution of Equation 17.

Minimize t

subject to: q = Rxxl + px + vxtgx

q = Ryyl + py + vytgy

fX(xl) ≤ 0

fY (yl) ≤ 0

tp ≥ t ≥ 0

(18)

where tp is the time obtained from the solution of Equa-tion 17. See the example in Figure 10.

We now establish that the computational complexity ofsolving the Newton step in the continuous collision detectionproblem along a single linear segment isO(n), which is thesame as for the static query problem. We can eliminatexl

and yl from Equation 17 and can write it in the form ofEquation 9 wherex is a 7 × 1 column vector that includes

t. Thus in Equation 15,A1 is a 7 × 7 matrix andA2 is ann×7 matrix. This implies thatG is still a constant sized7×7matrix and the complexity argument for solving Equation 16in Section VI applies directly. Similarly in Equation 18,x isa 4×1 vector consisting ofq andt. ThusA1 is a4×4 matrixandA2 is ann× 4 matrix andG is a 4× 4 matrix. Hencethe computation of the Newton step in both problems takesO(n) time irrespective of the implicit primitive. Moreover,as the constraints have a self-concordant log barrier functionfor the case of planes and quadrics, the overall complexity isO(n1.5) in these cases.

Obtaining the collision interval for motion with knownlinear paths:Computing the path intervals over which tworobots can collide is useful in multiple robot coordinationproblems where the robots travel along known paths [42].When we are given the paths traversed by the objectsand wish to determine the path intervals over which theobjects could collide with each other, we solve the followingoptimization problem.

Minimize sx

subject to: xg = Rxxl + px + sxgx

yg = Ryyl + py + sygy

fX(xl) ≤ 0

fY (yl) ≤ 0

fX(yg) ≤ 0

fY (xg) ≤ 0

sx, sy ≥ 0

(19)

Here sx and sy represent the path lengths traversed bythe objects. The inequalitiesfX(yg) ≤ 0 and fY (xg) ≤ 0describe all points in the intersection of both objects, andalsoencode the constraint that the distance between the objectsiszero. In fact, we have to solve three more variations of theabove problem with the objective function minimizing−sx,sy, and−sy to find the minimum and maximum values ofsx

and sy. These define corresponding collision intervals overthe path for each object.

VIII. R ESULTS

We now present results illustrating our approach. To solvethe distance computation problem, we used KNITRO 5.0,a commercially available interior point based solver ([8],[59]). We use the primal-dual feasible interior point methodin KNITRO, where all the iterates are feasible. We have aninitial feasible solution trivially from points at the centers ofthe objects. The barrier parameterµ is initially set to 0.1and reduced by an adaptive factor at each iteration based onthe complementarity gap. For each value ofµ the systemof nonlinear equations is approximately solved by Newton’smethod with the step size determined by a trust regionmethod [38].

Page 10: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 10

I II III

IV V VI

Fig. 11. Example objects. Objects I–III are superquadrics,IV is an intersection of superquadrics and halfspaces, and V–VI are hyperquadrics.

We depict six example objects in Figure 11, three of whichare superquadrics. The indices and semiaxes of the threesuperquadrics are(4

3, 7

5, 15

13) and (1, 0.7, 1.5) for Object I

(a diamond),(23

11, 11

5, 179

13) and (1, 1, 1.7) for Object II (a

soda can), and(76

9, 71

5, 179

13) and (1, 1, 1.5) for Object III (a

rounded cuboid). Object IV models a computer mouse andis represented as an intersection of a superquadric and4 halfspaces. The indices and semiaxes of the superquadric are(23

11, 11

5, 17

7) and (2, 1, 1.7). The half spaces arex1 ≥

−1

2,

x1 ≤1

2, x2 ≥ −0.75, andx3 ≥ 0.4 wherex1, x2, x3 are the

local coordinates of the object. Object V is (the convex hullof) a rounded hexagonal nut modeled as the hyperquadric

|x2|16 + |x1 + 0.5x2|

16 + |x1 − 0.5x2|16 + |2.5x3|

2 ≤ 1.

Object VI is a pyramid modeled as the hyperquadric

|x1+x3|16+|x2+x3|

16+|x3|16+|x1−x3|

16+|x2−x3|16 ≤ 1.

The run time performance of the algorithm on the exampleobjects is shown in Table I, with some test cases depicted inFigure 3. All data was obtained on a 2.2 GHz Athlon 64X2 4400+ machine with 2 GB of RAM. The running timesdemonstrate that the distance computation rate is about 1kHz, which is sufficiently fast for real-time dynamic simu-lations and interactive haptic simulations. We also generatedtriangulations of these objects with about 19,000 trianglesand found that the distance computation time (not collision

detection time) taken by PQP [28], a popular collision detec-tion software, was comparable for our examples. Note thatour randomly generated object configurations do not providethe benefits of coherence. We also compared our algorithmon quadric surfaces against SOLID [53], [54], which supportsproximity queries for quadrics without discretization. SOLIDruns about80 times faster than our approach for the case ofellipsoids. However, our algorithm has a theoretical guaran-tee, and SOLID cannot deal with general implicit surfaceslike superquadrics or hyperquadrics without discretization.

The timing data for translation-only continuous collisiondetection is shown in Table II. In cases where there is nocollision, the query time is the time to solve Equation 17.In cases with collision, we compute the exact time of firstcontact by solving the two optimization problems describedin Equation 17 and Equation 18.

Deforming Objects:As stated in Section IV, the linearconstraints in Equation 7 can represent a general affinetransformation. Thus this framework can easily handle globaldeformations such as nonuniform scaling. Figure 12 showsnonuniform scaling of Object I and Object III in10 steps. Thescaling matrices used for the two objects are diagonal matri-ces whose diagonal entries are(1, 0.5, 2) and (0.5, 3, 0.67)respectively. The approach can also handle any global de-formation where the convexity of the object is preserved.For example, consider the global shape deformation for su-

Page 11: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 11

TABLE I

SAMPLE RUN TIMES, IN MILLISECONDS, FOR PROXIMITY QUERIES

BETWEEN PAIRS OF OBJECTS USINGKNITRO 5.0. THE RUN TIMES

WERE COMPUTED FOR EACH PAIR BY AVERAGING THE RUN TIMES OVER

100,000RANDOM CONFIGURATIONS. ALL DATA WAS OBTAINED ON A

2.2 GHZ ATHLON 64 X2 4400+MACHINE WITH 2 GB OF RAM.

Objects Number of Proximity queryconstraints time (millisecs)

1 I, II 2 0.842 I, III 2 0.913 II, III 2 0.704 III, IV 6 0.855 II, IV 6 0.766 III, V 2 0.787 V, VI 2 0.898 III, VI 2 0.89

perquadrics (or hyperquadrics) due to changes in the indices.Note that if instead a polygonal representation of the objecthad been used for this kind of shape change, the polygonalrepresentation would have to be recomputed. Figure 13 showsthree snapshots of Object I being deformed to Object III in10steps. Table III shows the average distance computation timesfor both nonuniform scaling and index deformation. This datashows that both affine and index changing deformations canbe performed with similar running times to the rigid objectproximity query.

Numerical Robustness Issues:We have observed a smallnumber of cases where KNITRO failed to converge to theoptimal solution. For most objects, the failure rates weretypically less than 0.01%. The largest failure rate observedwas 0.4% when Object I was one of the objects. This may bebecause (as is evident from our formulation) the algorithmneeds the second derivatives of the functions representingtheobjects, but the second derivative does not exist everywherefor Object I. Despite this, the solver converges to the optimalsolution in most cases. Switching to a variant of the interiorpoint method that uses a conjugate gradient method, availablewithin KNITRO, enabled the solver to converge for some ofthe failure cases. Therefore adaptively using the two variantsof the method could improve robustness even further.

IX. CONCLUSION

This paper demonstrates that recently developed interiorpoint algorithms are particularly effective for computingthedistance between two or more convex objects, where eachobject is described as an intersection of implicit surfaces.This proximity query approach complements the proximityquery approaches of GJK [21], Lin-Canny [31], and similaralgorithms, since they focus on polyhedra while we focus onsmooth implicit surfaces. We demonstrated our algorithm onexample implicit surface objects including convex polyhedra,quadrics, superquadrics, hyperquadrics, and their intersec-tions. The global convergence properties of interior point

TABLE II

SAMPLE CONTINUOUS PROXIMITY QUERY RUN TIMES BETWEEN PAIRS

OF OBJECTS USINGKNITRO 5.0. THE RUN TIMES WERE COMPUTED

FOR EACH PAIR BY AVERAGING THE RUN TIMES OVER100,000PAIRS OF

RANDOM CONFIGURATIONS. FOR THE TIME OF FIRST CONTACT QUERIES,

ONLY THOSE CONFIGURATION PAIRS THAT RESULTED IN COLLISIONS

WERE USED AND THE REPORTED QUERY TIME IS THE TOTAL QUERY

TIME FOR SOLVING BOTH PROBLEMS.

Objects Query Number of Querytype constraints time (millisecs)

I, III Closest distance 2 1.32Time of first contact 2 2.03

II, III Closest distance 2 0.97Time of first contact 2 1.51

TABLE III

SAMPLE PROXIMITY QUERY RUN TIMES BETWEEN DEFORMING PAIRS OF

OBJECTS USINGKNITRO 5.0. THE RUN TIMES WERE COMPUTED FOR

EACH PAIR BY AVERAGING THE RUN TIMES AT EACH OF10 STEPS IN THE

SHAPE CHANGE, OVER 100,000RANDOM CONFIGURATIONS.

Objects Type of Number of Proximity queryDeformation constraints time (millisecs)

I, III Nonuniform Scaling 2 1.04II, III Nonuniform Scaling 2 0.75

I → III, III Index Change 2 0.87II → III, III Index Change 2 0.84

algorithms make them robust even in the absence of anyinitial information about the closest points. For the classof (convex polyhedra and) convex quadric surfaces, thisapproach has a theoretical complexity ofO(n1.5), wherenis the number of implicit function constraints. To the bestof our knowledge, this is the first bound on the runningtime of proximity queries for convex quadrics. Moreover,the practical running time behavior is linear in the number ofconstraints for all the classes of implicit surfaces that wehavestudied. The speed at which distance computations can beperformed enables real-time dynamic simulations and hapticinteractions at 1 KHz rates.

An important additional advantage of this method is thatit provides a uniform framework for distance computationbetween convex objects described as arbitrary intersectionsof polyhedra, quadrics, or any convex implicit surface. Fur-thermore, within this framework we can handle global affinedeformations of implicit surface objects, and index changedeformations of superquadrics (or hyperquadrics) withoutsignificant computational overhead. Finally, we show thatcontinuous collision detection for linearly translating implicitsurface objects can be performed by solving two related con-vex optimization problems. For polyhedra and quadrics, weestablish that the computational complexity of this continuouscollision detection problem isO(n1.5).

Future Work:There are several directions for future work.

Page 12: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 12

−2 0 2 4 6 8

−20246−2

−1

0

1

2

3

4

5

6

xy

z

−2 0 2 4 6 8

−20

24

6−2

−1

0

1

2

3

4

5

6

xy

z

−2 0 2 4 6 8

−202468−3

−2

−1

0

1

2

3

4

5

6

xy

z

(a) (b) (c)

Fig. 12. Proximity queries on deforming (superquadric) objects, with the deformation described by monotonic scaling.The deformation is performed in10 steps. (a) The original objects. (b) The objects midway through the scaling. (c) The scaled objects.

−2 0 2 4 60

24

60

1

2

3

4

5

6

7

xy

z

−2 0 2 4 60

24

60

1

2

3

4

5

6

7

xy

z

−2 0 2 4 60

24

60

1

2

3

4

5

6

7

xy

z

(a) (b) (c)

Fig. 13. Proximity queries on deforming superquadric objects, with the deformation governed by monotonic change of exponents. Object I is transformedto Object III in 10 steps. (a) The original objects. (b) Midway through the deformation, deformed Object I has indices( 196

45, 39

5, 97

13). (c) The final objects.

We plan to explore alternative interior point algorithms(LOQO [56] and IPOPT [58], for example) to test theirperformance on the minimum distance problem. Performingwarm starts, where a good initial estimate for the solutionis available, can potentially improve the running time whenthere is coherence. This may be best achieved by a combina-tion of interior point methods and sequential quadratic pro-gramming approaches. We would like to extend this approachto nonconvex objects, modeled as unions of convex shapesand incorporate it in a hierarchical framework. Longer termdirections for future research include tracking closest pointscontinuously for haptics applications, and extending thisapproach to performing continuous collision detection withboth rotational and translational motion. The approach canbeextended to compute the translational penetration depth inagiven motion direction for two intersecting objects. We areworking on developing an efficient method to compute theminimum translation penetration depth of two intersectingobjects when the motion direction is unknown. Finally, wewish to integrate the proximity query algorithm with anonlinear complementarity formulation of dynamic systemswith intermittent contact. This would allow us to study theeffects of shape variations and shape approximations in suchsystems.

ACKNOWLEDGMENTS

This work was supported in part by NSF under CAREERAward No. IIS-0093233. Thanks to Richard Waltz for helpwith KNITRO, Buck Clay for graphics software, and JeffTrinkle, Steve Berard, Binh Nguyen, and Frank Luk foruseful discussions.

REFERENCES

[1] D. Baraff. Curved surfaces and coherence for non-penetrating rigidbody simulation.Computer Graphics, 24(4):19–28, August 1990.

[2] A. H. Barr. Superquadrics and angle-preserving transformations.IEEEComputer Graphics and Applications, 1(1):11–23, Jan. 1981.

[3] M. S. Bazaraa, H. D. Sherali, and C. M. Shetty.Nonlinear Program-ming: Theory and Algorithms. John Wiley, New York, second edition,1993.

[4] S. Berard, B. Nguyen, J. Fink, J. C. Trinkle, and V. Kumar.daVinciCode physical simulation library, 2006. http://www.cs.rpi.edu/ sber-ard/dvc.

[5] J. E. Bobrow. A direct minimization approach for obtaining thedistance between convex polyhedra.International Journal of RoboticsResearch, 8(3):65–76, June 1989.

[6] S. Boyd and L. Vandenberghe.Convex Optimization. CambridgeUniversity Press, Cambridge, UK, 2004.

[7] M. Buss and T. Schlegl. A discrete-continuous control approach todextrous manipulation. InIEEE International Conference on Roboticsand Automation, pages 276–281, 2000.

[8] R. Byrd, M. E. Hribar, and J. Nocedal. An interior point method forlarge scale nonlinear programming.SIAM Journal on Optimization,9(4):877–900, 1999.

Page 13: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 13

[9] S. Cameron. Collision detection by four-dimensional intersectiontesting. IEEE Transactions on Robotics and Automation, 6(3):291–302, June 1990.

[10] S. Cameron. A comparison of two fast algorithms for computing thedistance between convex polyhedra.IEEE Transactions on Roboticsand Automation, 13(6):915–920, Dec. 1997.

[11] M.-P. Cani-Gascuel and M. Desbrun. Animation of deformable modelsusing implicit surfaces. IEEE Transactions on Visualization andComputer Graphics, 3(1):39–50, 1997.

[12] J. Canny. Collision detection for moving polyhedra.IEEE Transactionson Pattern Analysis and Machine Intelligence, 8(2):200–209, Mar.1986.

[13] N. Chakraborty, J. Peng, S. Akella, and J. Mitchell. Proximityqueries between convex objects: An interior point approachfor implicitsurfaces. In2006 IEEE International Conference on Robotics andAutomation, pages 1910–1916, Orlando, FL, May 2006.

[14] Y.-K. Choi, W. Wang, Y. Liu, and M.-S. Kim. Continuous collisiondetection for two moving elliptic disks. IEEE Transactions onRobotics, 22(2):213–224, Apr. 2006.

[15] D. Constantinescu, S. Salcudean, and E. Croft. Haptic rendering ofrigid contacts using impulsive and penalty forces.IEEE Transactionson Robotics, 21(3):309–323, June 2005.

[16] V. Copolla and J. Woodburn. Determination of close approachesbased on ellipsoidal threat volumes. InAdvances in the AstronomicalSciences: Spaceflight Mechanics, volume 102, pages 1013–1024, 1999.

[17] J. Czyzyk, M. Mesnier, and J. More. The NEOS server.IEEEJournal on Computational Science and Engineering, 5:68–75, 1998.http://www.mcs.anl.gov/neos/Server/.

[18] D. P. Dobkin and D. G. Kirkpatrick. A linear algorithm for determiningthe separation of convex polyhedra.Journal of Algorithms, 6:381–392,1985.

[19] A. Garcia and M. Hubbard. Spin reversal of the rattleback: Theoryand experiment.Proceedings of the Royal Society of London. Series A,Mathematical and Physical Sciences, 418(1854):165–197, July 1988.

[20] E. G. Gilbert and C.-P. Foo. Computing the distance between generalconvex objects in three-dimensional space.IEEE Transactions onRobotics and Automation, 6(1):53–61, Feb. 1990.

[21] E. G. Gilbert, D. W. Johnson, and S. S. Keerthi. A fast procedure forcomputing the distance between complex objects in three-dimensionalspace.IEEE Transactions on Robotics and Automation, 4(2):193–203,Apr. 1988.

[22] P. E. Gill, W. Murray, and M. A. Saunders. SNOPT: An SQPalgorithm for large-scale constrained optimization.SIAM Journal onOptimization, 12(4):979–1006, 2002.

[23] F. Glineur and T. Terlaky. Conic formulation forlp-norm optimization.Journal of Optimization Theory and Applications, 122(2):285–307,Aug. 2004.

[24] A. J. Hanson. Hyperquadrics: smoothly deformable shapes with convexpolyhedral bounds.Computer Vision, Graphics, and Image Processing,44(2):191–210, Nov. 1988.

[25] P. Jimenez, F. Thomas, and C. Torras. 3D collision detection: A survey.Computers and Graphics, 25(2):269–285, 2001.

[26] D. E. Johnson and E. Cohen. A framework for efficient minimumdistance computations. InIEEE International Conference on Roboticsand Automation, pages 3678–3684, Leuven, Belgium, May 1998.

[27] P. G. Kry and D. K. Pai. Continuous contact simulation for smoothsurfaces.ACM Transactions on Graphics, 22(1):106–129, Jan. 2003.

[28] E. Larsen, S. Gottschalk, M. Lin, and D. Manocha. Fast distancequeries using rectangular swept sphere volumes. InIEEE Interna-tional Conference on Robotics and Automation, pages 3719–3726, SanFrancisco, CA, Apr. 2000.

[29] A. Lin and S.-P. Han. On the distance between two ellipsoids. SIAMJournal of Optimization, 13(1):298–308, 2003.

[30] M. Lin and D. Manocha. Efficient contact determination in dynamicenvironments.International Journal of Computational Geometry andApplications, 7(1 and 2):123–151, 1997.

[31] M. C. Lin and J. F. Canny. A fast algorithm for incrementaldistance calculation. InIEEE International Conference on Roboticsand Automation, volume 2, pages 1008–1014, Sacramento, CA, Apr.1991.

[32] M. C. Lin and D. Manocha. Collision and proximity queries. InJ. E. Goodman and J. O’Rourke, editors,Handbook of Discrete andComputational Geometry, pages 787–808. Chapman and Hall/CRCPress, Boca Raton, FL, second edition, 2004.

[33] Q. Luo and J. Xiao. Physically accurate haptic rendering with dynamiceffects. IEEE Computer Graphics and Applications, 24(6):60–69,Nov./Dec. 2004.

[34] B. Mirtich. V-Clip: Fast and robust polyhedral collision detection.ACM Transactions on Graphics, 17(3):177–208, July 1998.

[35] B. Mirtich and J. Canny. Impulse-based dynamic simulation. InK. Y. Goldberg, D. Halperin, J.-C. Latombe, and R. H. Wilson,editors,Algorithmic Foundations of Robotics. A. K. Peters, Wellesley,Massachusetts, 1995.

[36] D. J. Montana. The kinematics of contact and grasp.InternationalJournal of Robotics Research, 7(3):17–32, 1988.

[37] R. M. Murray, Z. Li, and S. S. Sastry.A Mathematical Introductionto Robotic Manipulation. CRC Press, Boca Raton, FL, 1994.

[38] J. Nocedal and S. J. Wright.Numerical Optimization. Springer-Verlag,New York, 1999.

[39] V. Patoglu and R. B. Gillespie. Feedback stabilized minimum distancemaintenance for convex parametric surfaces.IEEE Transactions onRobotics, 21(5):1009–1016, Oct. 2005.

[40] R. Pelossof, A. Miller, P. Allen, and T. Jebara. An SVM learningapproach to robotic grasping. InIEEE International Conference onRobotics and Automation, pages 3512–3518, New Orleans, LA, Apr.2004.

[41] J. Peng.Multiple Robot Coordination: A Mathematical ProgrammingApproach. PhD thesis, Department of Mathematical Sciences, Rens-selaer Polytechnic Institute, May 2005.

[42] J. Peng and S. Akella. Coordinating multiple robots with kinodynamicconstraints along specified paths.International Journal of RoboticsResearch, 24(4):295–310, Apr. 2005.

[43] S. Quinlan. Efficient distance computation between non-convex ob-jects. In IEEE International Conference on Robotics and Automation,pages 3324–3329, San Diego, CA, May 1994.

[44] S. Redon, A. Kheddar, and S. Coquillart. Fast continuous collision de-tection between rigid bodies.Computer Graphics Forum (Eurographics2002 Proceedings), 21(3), 2002.

[45] S. Redon, Y. J. Kim, M. C. Lin, and D. Manocha. Fast continuouscollision detection for articulated models. InProceedings of ACMSymposium on Solid Modeling and Applications, 2004.

[46] E. Rimon and S. Boyd. Obstacle collision detection using best ellipsoidfit. Journal of Intelligent and Robotic Systems, 18(2):105–125, Feb.1997.

[47] J. Sauer, E. Schomer, and C. Lennerz. Real-time rigid body simulationsof some classical mechanics toys. In10th European SimulationSymposium and Exhibition, ESS’98, pages 93–98, 1998.

[48] E. Schomer, J. Reichel, T. Warken, and C. Lennerz. Efficient collisiondetection for curved solid objects. InProceedings of 7th ACMSymposium on Solid Modeling and Applications (SM 02), pages 321–328, Saarbrucken, Germany, June 2002.

[49] K.-A. Sohn, B. Juttler, M.-S. Kim, and W. Wang. Computing thedistance between two surfaces via line geometry. InProceedings ofthe Tenth Pacific Conference on Computer Graphics and Applications,pages 236–245, 2002.

[50] P. Song, J. Trinkle, V. Kumar, and J. Pang. Design of partfeeding andassembly processes with dynamics. InIEEE International Conferenceon Robotics and Automation, pages 39–44, New Orleans, LA, May2004.

[51] D. E. Stewart and J. C. Trinkle. An implicit time-stepping scheme forrigid body dynamics with inelastic collisions and Coulomb friction.International Journal of Numerical Methods in Engineering, 39:2673–2691, 1996.

[52] C. Turnbull and S. Cameron. Computing distances between NURBS-defined convex objects. InIEEE International Conference on Roboticsand Automation, pages 3685–3690, Leuven, Belgium, May 1998.

[53] G. van den Bergen. A fast and robust GJK implementation for collisiondetection of convex objects.Journal of Graphics Tools, 4(2):7–25,1999.

Page 14: Proximity Queries between Convex Objects: An Interior ... · for some object classes. We use a primal-dual interior point algorithm that solves the KKT conditions obtained from the

SUBMITTED AS A REGULAR PAPER TO THE IEEE TRANSACTIONS ON ROBOTICS, AUGUST 2006 14

[54] G. van den Bergen.Collision Detection in Interactive 3D Environ-ments. Morgan Kaufmann, 2004.

[55] G. van den Bergen. Ray casting against general convex objects withapplication to continuous collision detection.Journal of GraphicsTools, 2004. Submitted.

[56] R. J. Vanderbei. LOQO user’s manual – version 3.10. Technical ReportSOR 97-08, Statistics and Operations Research, Princeton University,Dec. 1997.

[57] R. J. Vanderbei and D. Shanno. An interior-point algorithm fornonconvex nonlinear programming.Computational Optimization andApplications, 13:231–252, 1999.

[58] A. Wachter and L. T. Biegler. On the implementation of aninterior-point filter line-search algorithm for large-scale nonlinear program-ming. Mathematical Programming, 106(1):25–57, 2006.

[59] R. A. Waltz. KNITRO 4.0 User’s Manual. Ziena Optimization, Inc.,Evanston, IL, Oct. 2004.

[60] S. J. Wright. Primal-Dual Interior-Point Methods. Society forIndustrial and Applied Mathematics, Philadelphia, 1997.

[61] P. G. Xavier. Fast swept-volume distance for robust collision detection.In IEEE International Conference on Robotics and Automation, pages1162–1169, Albuquerque, NM, Apr. 1997.

[62] S. Zeghloul, P. Rambeaud, and J. Lallemand. A fast distance cal-culation between convex objects by optimization approach.In IEEEInternational Conference on Robotics and Automation, pages 2520–2525, Nice, France, May 1992.