Certified Polyhedral Decompositions of Collision-Free Configuration Space
Hongkai Dai, Alexandre Amice, Peter Werner, Annan Zhang, Russ Tedrake

TL;DR
This paper introduces C-IRIS, a novel method that rigorously decomposes the collision-free configuration space into certified convex polyhedral regions using convex optimization, enabling scalable motion planning in complex robotic systems.
Contribution
It presents the first practical, certified polyhedral decomposition method for C-free spaces using rational parametrization and semidefinite programming, applicable in arbitrary dimensions.
Findings
Successfully decomposes C-free space in 2-DOF examples
Scales to high-dimensional manipulators like 7-DOF KUKA iiwa
Provides open-source implementation and interactive examples
Abstract
Understanding the geometry of collision-free configuration space (C-free) in the presence of task-space obstacles is an essential ingredient for collision-free motion planning. While it is possible to check for collisions at a point using standard algorithms, to date no practical method exists for computing C-free regions with rigorous certificates due to the complexity of mapping task-space obstacles through the kinematics. In this work, we present the first to our knowledge rigorous method for approximately decomposing a rational parametrization of C-free into certified polyhedral regions. Our method, called C-IRIS (C-space Iterative Regional Inflation by Semidefinite programming), generates large, convex polytopes in a rational parameterization of the configuration space which are rigorously certified to be collision-free. Such regions have been shown to be useful for both…
| Body | , | |
|---|---|---|
| V-rep Polytope with vertices {v_1, …, v_m}. | ||
| Sphere with center and radius . | ^2 ≤r^2 | |
| Capsule, the convex hull of two spheres with centers and and radii and . | ||
| Cylinder, the convex hull of two circles with centers and , and with radii and . |
| Body | Psatz Condition for (23b) |
|---|---|
| V-rep Polytope with vertices at position | Enforce (19) for each vertex . |
| Sphere with center at position and radius | Enforce (22) for the center with radius . Also enforce (19) for the center . |
| Capsule, the convex hull of two spheres with centers and at positions and radii , | For enforce (22) for center with radius . Also enforce (19) for . |
| Cylinder, the convex hull of two circles with centers and , at position , lying in the plane normal to , and with radii and . | See Appendix D. |
| Joint | Restriction | Definition of |
|---|---|---|
| R | ||
| P | ||
| C | ||
| E | ||
| S | see equation (41) |
| Body | Variables | Description of as a semi-algebraic set |
|---|---|---|
| V-rep Polytope with vertices at position | ||
| Sphere with center at position and radius | ||
| Capsule, the convex hull of two spheres with centers and at positions and radii , | ||
| Cylinder, the convex hull of two circles with centers and , at position , lying in the plane normal to , and with radii and . |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsRobotic Mechanisms and Dynamics
Certified Polyhedral Decompositions of Collision-Free Configuration Space
Hongkai Dai**affiliationmark: 22affiliationmark:
Alexandre Amice**affiliationmark: 11affiliationmark:
Peter Werner11affiliationmark:
Annan Zhang11affiliationmark:
Russ Tedrake1,21,2affiliationmark:
11affiliationmark: Massachusetts Institute of Technology (MIT), 22affiliationmark: Toyota Research Institute, **affiliationmark: equal contribution
(January 2023)
Abstract
Understanding the geometry of collision-free configuration space (C-free) in the presence of task-space obstacles is an essential ingredient for collision-free motion planning. While it is possible to check for collisions at a point using standard algorithms, to date no practical method exists for computing C-free regions with rigorous certificates due to the complexity of mapping task-space obstacles through the kinematics. In this work, we present the first to our knowledge rigorous method for approximately decomposing a rational parametrization of C-free into certified polyhedral regions. Our method, called C-Iris (C-space Iterative Regional Inflation by Semidefinite programming), generates large, convex polytopes in a rational parameterization of the configuration space which are rigorously certified to be collision-free. Such regions have been shown to be useful for both optimization-based and randomized motion planning. Based on convex optimization, our method works in arbitrary dimensions, only makes assumptions about the convexity of the obstacles in the task space, and is fast enough to scale to realistic problems in manipulation. We demonstrate our algorithm’s ability to fill a non-trivial amount of collision-free C-space in several 2-DOF examples where the C-space can be visualized, as well as the scalability of our algorithm on a 7-DOF KUKA iiwa, a 6-DOF UR3e and 12-DOF bimanual manipulators. An implementation of our algorithm is open-sourced in Drake. We furthermore provide examples of our algorithm in interactive Python notebooks.
1 Introduction
The notion of configuration space (C-space) has played a foundational role in robot motion planning since its proposal in the seminal work lozano1983spatial. In the presence of obstacles in the Cartesian task space, a fundamental challenge is describing the collision-free C-space (C-free): the full range of configurations for which a robot is not in collision. Prior work has taken two complementary approaches to this problem.
The first approach attempts to find an explicit description of the C-space obstacles from their task-space description and the inverse kinematics (IK). We refer to this approach as the negative approach, as C-free is described as the complement of the set of C-space obstacles. In its full generality, the problem of describing C-space obstacles is intractable canny1988complexity, and so limiting assumptions on the robot are often made. For example, kavraki1995computation develops a method for computing C-space obstacles based on the Fast Fourier Transform under the assumption that the robot can only translate in the workspace. In branicky1990computing, explicit descriptions of C-space obstacle due to the presence of point, line, and planar task-space obstacles are presented for two and three degree of freedom (DOF) robots. A thorough review of describing C-space obstacles can be found in (latombe2012robot, Chapter 3). There it is shown that if all the task-space obstacles are described as semi-algebraic sets (i.e. as the intersection and union of polynomial inequalities) then C-space obstacles are also semi-algebraic. This is an important result from a complexity-theoretic standpoint as it shows that describing the C-space obstacles is at least decidable, though still very hard.
We refer to the second approach as the positive approach, as it seeks to directly describe C-free as a union of simpler sets. This description is attractive as a variety of optimization-based motion planning methods can efficiently leverage such descriptions, particularly when the simpler sets are convex deits2015efficient; schouwenaars2001mixed; marcucci2021shortest; marcucci2022motion.
Rapidly-exploring Random Trees (RRT) lavalle1998rapidly, Probabilistic Roadmaps (PRM) kavraki1996probabilistic, and their variants can all be considered examples of this approach, describing C-free using piecewise-linear paths. Frequently, these methods provide probabilistic guarantees that the paths contain no collisions via sampling along the paths. To avoid false positive claims of non-collision, rigorous certification procedures such as schwarzer2004exact can be used. Works such as verghese2022configuration; han2019configuration; wong2014adaptive all seek to describe non-zero volume subsets of C-free. Similar to RRTs and PRMs, these methods have the advantage of working in arbitrary configuration spaces, make no assumptions on the C-space obstacles, and proceed via sampling. Therefore, they are typically relatively simple to implement and quite fast in low dimensions. Unfortunately, these methods only provide probabilistic guarantees of non-collision.
When the C-space obstacles are assumed to be convex, rigorous descriptions of C-free may be possible, though hardness results exist. For example, in two and three dimensions with polyhedral C-space obstacles, it is known that finding a minimal decomposition is NP-hard lingas1982power to solve exactly and even APX-hard eidenbenz2003approximation to approximate111A problem is said to be APX-hard if no polynomial time algorithm can achieve an approximation ratio of for some unless .. Works such as lien2007approximate and ghosh2013fast overcome these hardness results by finding decompositions that are unions of approximately convex sets.
In arbitrary dimensions and under the assumption of known, convex C-space obstacles, C-free can be decomposed into convex polyhedra by using the Iris algorithm of deits2015computing. As it is based on convex programming, Iris is relatively fast, and is also able to generate rigorous certificates of non-collision. Unfortunately, it is often the case that obstacles are naturally described as convex sets in task space, which are rarely convex in C-space.
In this work, we similarly provide a method for describing C-free using convex polyhedra in a bijective, rational parametrization of C-space known as the tangent configuration space (TC-space). Our primary technical contributions are two convex (specifically Sums-of-Squares (SOS)) programs which can certify that a polyhedron in TC-space contains no collision when the obstacles are specified as convex sets in task space. Similar to deits2015computing, we then construct certified, collision-free polytopic regions by alternating between a pair of convex programs. Our method works in arbitrary dimensions and is the first to our knowledge to provide rigorous certificates for non-zero volume sets in this setting. Moreover, we provide a fast, mature implementation technique in the open-source robotics toolbox Drake222https://drake.mit.edu/.
A conference version of this paper is published in amice2022finding, which assumes a robotic manipulator composed of revolute joints operating in a scene where all task-space obstacles are decomposed as a union of vertex representation (V-rep) polytopes. This journal version extends these results in many ways.
First, we demonstrate how our approach can be extended to handle other common, non-polytopic geometries such as spheres, capsules, and cylinders. Moreover, we describe how to extend our approach to handle a robot composed of any of the algebraic joints: revolute, prismatic, spherical, planar, and cylindrical. Our second technical contribution introduces a second method for certifying non-collision inspired by the dual of the separating hyperplane approach used in the conference paper. This approach takes the form of certifying the emptiness of a set of polynomial equations and inequalities which can also be written as an optimization program. The third technical contribution of this work is to show that feasibility of the optimization programs we use for certification is not only sufficient, but also necessary for a TC-space region to be collision free provided the degree of certain polynomials are chosen sufficiently large. Finally, we provide new examples of our algorithm deployed on various robots including 2-DOF robots to visualize the TC-space, a robot containing a prismatic joint, and a UR3e robot with collision geometries approximate by cylinders.
We begin in Section 2 by formally introducing our problem and our assumptions. We proceed in Section 3 by introducing necessary mathematical background for describing our technical approach. In Section 4, we present our most technical results: two convex programs which can certify whether a region of TC-space is collision-free. We also state the conditions under which feasibility of these programs are guaranteed when a proposed region is collision-free. We describe how to leverage the certification programs to generate convex decompositions of TC-free in Section 5. We conclude in Section 6 with examples of our algorithm deployed on various robots. We will first illustrate the algorithm on two simple 2-DOF systems where both the task and configuration spaces can be visualized and the entire configuration space can be quickly covered. We next demonstrate the ability of our algorithm to certify a wide range of postures for two realistic, 7-DOF manipulators interacting with a shelf. We conclude by showing our algorithm’s ability to scale by exploring two 12-DOF, bimanual manipulators.
Notation: Throughout the paper, we will use calligraphic letters () to denote sets, Roman capitals () to denote matrices, and Roman lower case () to denote vectors. We use , denote the set of all multivariate polynomials in the vector of variables as , and denote the cone of Sums-of-Squares (SOS) polynomials as . Additionally, we will adopt the monogram notation of tedrakeManip for rigid transforms.
2 Problem Statement
We consider a known, task-space environment where our robot and all obstacles have been decomposed as a union of compact, convex bodies333For technical reasons, we formally assume that the bodies are compact, convex sets expressible as a Archimedean, basic semi-algebraic sets. See Appendix B for the definition of Archimedean for example cylinders, capsule, spheres, or vertex representation (V-rep) polytopes. Such collision geometries of our task space are readily available through standard tools such as V-HACD mamou2009simple and are often a required step for simulating any given environment.
Our robot is a mechanism composed of links connect via either revolute or prismatic joints wampler2011numerical:
- •
Revolute (R): a 1-DOF joint permitting revolution about an axis of symmetry. An example is a door handle.
- •
Prismatic (P): a 1-DOF joint permitting translation along an axis. An example is a linear rail.
We will assume that all revolute joints are constrained from undergoing complete rotations and all prismatic joints have bounded translation. Formally, if is the configuration-space variable associated to revolute joint, then:
[TABLE]
and if is the configuration-space variable associated to a displacement then:
[TABLE]
where the bounds , , , and are fixed constants.
Our objective is to find large, convex regions of TC-free regardless of the dimension of the configuration space. This objective is beyond the scope of current decomposition for non-convex spaces/objects such as V-HACD due to the dimensionality of the problem for interesting robots and the complexity of the non-linear kinematics.
Remark 1**.**
Our approach can handle a robot composed of any of the five algebraic joints: revolute, prismatic, planar, cylindrical, planar, and spherical wampler2011numerical. We restrict ourselves to R and P joints as the other joints can be seen as a composition of these two (see appendix A for details).
3 Background
This section introduces key notions from convex analysis and algebraic geometry that will be essential for our approach presented in Section 4. We begin by recalling some classic theorems pertaining to the separation of convex bodies. We next review the Positivstellensatz, a central theorem from algebraic geometry that forms the basis for many applications of the Sums-of-Squares method that we will leverage. We conclude by recalling a parameterization of a robot’s forward kinematics using rational functions.
3.1 Separating Convex Bodies
In this section, we review two dual ways to check whether two compact, convex sets and intersect by using convex optimization. Our certification programs in Section 4 will rely on generalizations of the programs introduced in this section.
A well-known result from convex optimization theory is the Separating Hyperplane Theorem (boyd2004convex, Section 2.5) which states that and do not intersect, if and only if there exists a hyperplane which strictly separates the two bodies. The hyperplane serves as a certificate of non-intersection. Such a hyperplane is visualized in Figure 1 and is described by the solution to program (3). Many previous works brossette2017collision; lin2022reduce have applied the Separating Hyperplane Theorem to find a single collision-free posture; in this paper we apply the theorem to find a convex set of collision-free postures.
Conversely, if and do intersect, then it is possible to certify this by finding a point in . Such a point can be found by solving the convex optimization program (4). A certificate of the infeasibility of (4) proves that and do not intersect. Finding a certificate of infeasibility can be obtained by considering the dual of (4) and is a standard notion in convex optimization (boyd2004convex, Section 5.8).
A solution to program (3) has the advantage of being able to quantify the magnitude of separation between the two bodies. Therefore, in Section 5 we will prefer to base our algorithm on a generalization of (3). However, we will see that certain results will be easier to show by considering the infeasibility of program (4).
We conclude by noting that programs (3) and (4) are strong alternatives; exactly one of the two programs is feasible. The key to solving either program is to find a finite parameterization of conditions (3a), (3b), and (4a). In Table 5, we provide a convenient reference for some common geometries.
Remark 2**.**
Problem (3) is frequently written with non-strict inequalities (3a) and (3b) to make it compatible with modern solvers. Such a formulation requires excluding the trivial solution via extra constraints as well as planes which are not strictly separating. The conditions given in Table 5 accomplish both with the constraint with for polytopic geometries and for sphere, cylinder, and capsules.
3.2 Certificates of Positivity and Infeasibility
In Section 4, we will show how to generalize programs (3) and (4) to be able to certify non-collision for a range of robot configurations. Both generalizations will reduce to well-studied polynomial problems. Specifically, given the set
[TABLE]
where and are all given polynomial functions of , then certifying the separating hyperplane conditions (3a) and (3b) will be akin to a certifying a polynomial implication of the form
[TABLE]
where is again a polynomial.
Moreover, certifying the infeasibility of (4) will be akin to certifying that
[TABLE]
Both of these polynomial problems are tractable. In particular, a class of results known as Positivstellensatz Theorems (Psatz) can be used to reduce both problems to a convex optimization program parrilo2000structured; blekherman2012semidefinite. In this section, we review the Psatz results that we will use.
Our assumption (1) and (2) that our robot has joint limits implies that the subsets of TC-free we wish to certify will be Archimedean sets, a property slightly stronger than compactness formally defined in Appendix B. This will enable us to use a very strong Psatz Theorem for proving implications of the form (5) known as Putinar’s Positivstellensatz.
Theorem 1** (Positivstellensatz putinar1993positive).**
Suppose is Archimedean and suppose that for all . Then there exists polynomials and SOS polynomials such that:
[TABLE]
Moreover, if is any polynomial that can be expressed as in (7), then
[TABLE]
As an immediate corollary, the previous theorem can be used to prove that is empty.
Theorem 2** (parrilo2004sum).**
Suppose is Archimedean. Then if and only if there exists polynomials and SOS polynomials such that
[TABLE]
In both cases, the multiplier polynomials and serve as certificates that the conditions (5) or (6) hold. These certificates can be searched for using a convex optimization technique known as Sums-of-Squares (SOS) programming, a subset of semidefinite programming (SDP) parrilo2000structured. The SOS technique has been widely used in robotics, for example in stability verification tedrake2010lqr; majumdar2017funnel; shen2020sampling, reachability analysis jarvis2003some; yin2021backward and geometric modeling ahmadi2016geometry. In this paper, we will use SOS programming to generate certificates that subsets of TC-space are contained in TC-free.
3.3 Rational Forward Kinematics
Our method in Section 4 will rely critically on parameterizing the forward kinematics of our robot using polynomials. Many robots contain rotational joints and so their forward kinematics are naturally specified as trigonometric functions. In this section, we review a standard change of variables of our robot kinematics which will enable us to parameterize the forward kinematics as a rational function.
The forward kinematics of a rigid-body robot with joints can be written by composing rigid transforms craig2005introduction; tedrakeManip. Written in homogeneous coordinates, and using the monogram notation tedrakeManip666In monogram notation, the pose of a frame expressed in a frame is denoted as ., the pose of a frame , expressed in the reference frame , as a function of the robot configuration assumes the form:
[TABLE]
In equation (10), is the set of joints lying on the kinematic chain between and . We attach two frames to each joint, with rigidly fixed to the parent link of the th joint, and rigidly fixed to the child link of the same joint. The two frames and coincide when the joint configuration . The subset of configuration variables defines the degrees of freedom at the th joint, is the relative transform of the joint after the joint moves by . The rigid transform describes the physical properties of the th link such as its length. We assume that the reference frame is the , the parent frame of the first joint ; while the frame is , the child frame of the last joint . 777Since joint is the last joint on this chain , we assume . We choose to be explicit about the reference frame at the risk of being pedantic, as the choice of reference frame will have important consequences for the scalability of the approach described in Section 5 (see Appendix F.1 for a detailed discussion).
The matrices assume the following forms wampler2011numerical
[TABLE]
Expression (10) expresses the position of our robot as an multilinear trigonometric polynomial function. Concretely, the th component (where ) of the position of relative to and expressed in is an expression of the form:
[TABLE]
with . The scalar constants are determined by the robot kinematic parameters (link length, joint axis, etc). Therefore, our configuration-space variables are
[TABLE]
Multilinear trigonometric functions have many fortunate algebraic properties which we exploit throughout this paper, the first of which will be a change of variables enabling us to write (12) as a rational function.
Specifically, we will introduce the substitution:
[TABLE]
which allows us to write
[TABLE]
This substitution is known as the stereographic projection spivakCalc and is bijective if which we have assumed is the case for our robotic system888An alternative approach is to write the forward kinematics as a multilinear polynomial of indeterminates and , with the additional constraints . We don’t choose this parameterization as it is hard to integrate the volume on the quotient ring . Also this parameterization requires introducing two variables for each revolute joint, rather than one variable .. After performing this change of variables, our forward kinematics variables are
[TABLE]
We refer to the configuration-space variable as the tangent-configuration-space (TC-space) variable.
In the TC-space variable, our forward kinematics are a rational function with a polynomial numerator and positive, polynomial denominator. This is an expression of the form
[TABLE]
where
[TABLE]
We will abbreviate the vector quantity:
[TABLE]
where is a vector of polynomials and is a single, positive polynomial. Notice that since each denominator , which is strictly positive.
We emphasize again that we have assumed:
[TABLE]
and therefore generically component-wise.
Therefore, our substitution between and is bijective and so trajectories in TC-space correspond unambiguously to trajectories in C-space. Moreover, this assumption on boundedness of our configuration space allows us to seek collision-free regions that are contained within , a polytope encoding our joint limit: .
Example 1**.**
As an example, we consider the double pendulum underactuated.
The pose of the tip of the second pendulum can be written as:
[TABLE]
The difference in the sign of the trigonometric part ensures that the -axis is pointing down. Expanding out this product enables us to write the coordinate of the tip of the system as:
[TABLE]
Notice that these are multilinear trigonometric polynomials, i.e. no term contains . We can perform the substitution given in (13) to express the position as a rational function:
[TABLE]
.
4 Certification of Set-Membership in TC-Free
In this section, we will consider the problem of certifying the non-collision of two convex bodies and whose poses in task space are a function of the configuration of our robot. While programs (3) and (4) can be used to certify non-collision between and for any fixed configuration, they are insufficient to certify and do not intersect for all configurations in an entire region of the configuration space. Therefore, in Sections 4.1 and 4.2, we will show how to combine the ingredients of Section 3 to generalize programs (3) and (4).
The presence of trigonometric functions when the forward kinematics are expressed in the variable precludes using SOS programming, our tool of choice. Therefore, we will assume that and are convex sets in task space with their poses expressed as rational functions in the TC-space variable . This can be achieved using the developments in Section 3.3. Our objective will be to certify that and do not intersect for all .
Under these assumptions, the generalizations of (3) and (4) will respectively take the form of certifying a polynomial implication and certifying the emptiness of a basic-semialgebraic set. We give a formulation of each as a SOS program. We will conclude in Section 4.3 by proving that feasibility of our convex optimization programs is both necessary and sufficient for to be collision-free.
4.1 Parametrized Hyperplane Certificates of Non-Collision
In this section, we generalize (3) and use SOS to search for a polynomial family of hyperplanes parametrized by the TC-space variable which will certify the non-collision of and for all .
We begin by remarking that even if and do not collide for all , there may not be a single, static hyperplane which certifies this fact. An example of this can be seen in Figure 3.
We therefore will look for a polynomial family of hyperplanes parametrized by our TC-space variable . Inspection of Table 5 shows that we must generalize
[TABLE]
for particular points specific to each of the geometries, and
[TABLE]
for center if is either a sphere or capsule. The generalization of the conditions for the cylinder are similar to those of the sphere and capsule, and so we defer its complete derivation to Appendix D.
To generalize (16) and (17), we recall that the position of any point (and similarly ) can be expressed as a rational function where .
Therefore, we can express (16) as:
[TABLE]
This is an polynomial implication of the form (8). As is compact polytope, is Archimedean (marshall2008positive, Theorem 7.1.3) and so we can use Theorem 1 to express condition (16) as:
[TABLE]
where are all SOS polynomials.
The condition (17), can be expressed as a polynomial, matrix inequality using the Schur complement999 We have that if and only if the Schur complement .
boyd2004convex
[TABLE]
This is known as a matrix SOS condition which can be represented as a set of semidefinite constraints nie2011polynomial. Specifically, by introducing a vector auxillary variable , we can write (20) as:
[TABLE]
which can be expressed as the SOS condition:
[TABLE]
where are all SOS polynomials, and . We introduce the additional equality to make the set an Archimedean set.
We are now ready to describe our convex program certifying that is a region of TC-space containing no collision. For each pair of bodies and which can collide in the scene, we search for a polynomial hyperplane via the optimization program:
[TABLE]
where are the parameters of the polynomial hyperplane separating and , the polynomials and collect all the multiplier polynomials for enforcing (23b), and and collect all the multiplier polynomials for enforcing (23c) by using (19) and (22) depending on the geometry of and . We stress in the above program that the decision variables are the coefficients of the polynomials , , and the multiplier polynomials. The symbols and are known as indeterminates and are not explicitly searched over.
In Table 2, we summarize the conditions for enforcing (23b) and (23c) for common families of sets. We call a feasible solution to (23) a certificate for the polytope which we denote:
[TABLE]
4.2 Polynomial Infeasibility Certificates
As we remarked in section 3.1, non-collision of two convex shapes and can be checked by certifying the infeasibility of (4). The infeasibility of (4) can be extended to the case when the locations of and are a function of .
[TABLE]
An equivalent, and perhaps more instructive, way of expressing (25) is to consider the set
[TABLE]
and to consider the problem
[TABLE]
In (31), and are the polynomials encoding the condition that and collects any extra variables needed to write this condition. Similarly, , , and encode that . We provide explicit expressions for and in Table 4 (given in Appendix C) for a few common geometries.
Example 2**.**
If is a polytope with vertices given by , and is a sphere with center and radius , then we can write
[TABLE]
Now, we note that is an Archimedean set. This implies that we can use Theorem 2 to write (32) as an optimization problem. Denoting , this can be written explicitly as
[TABLE]
We again emphasize that in program (33) the decision variables are the coefficients of , while the symbols are not decision variables but rather polynomial indeterminates. Similar to the program in (23), a certificate of non-collision can be obtained by solving (33) for each pair with the multipliers acting as the certificate.
4.3 Power of the Certification Programs
In this section, we consider the power of both certification programs. Specifically, in Sections 4.1 and 4.2 we argued that feasibility of (23) and (33) are sufficient to prove that is collision-free. In this section, we present two theorems showing that the feasibility of these programs is also necessary.
Such a result is important given the fact that as stated, (23) and (33) are infinite dimensional and therefore in practice must be solved by selecting a basis of finite degree for the polynomials. Other subtleties about the power of our formulation are discussed in Appendix E. Fortunately, we can prove that there do exist finite degrees such that both programs become feasible when is truly collision-free.
Theorem 3**.**
Let all multiplier polynomials from (23) have degree at least and let all of the polynomials in the parameterization of the hyperplane have degree at least . Suppose is a subset of TC-free.
Then there exists finite and sufficiently large such that (23) is feasible.
A similar theorem can be stated for the program in (33).
Theorem 4**.**
Let be a compact, polytopic subset of TC-free and let all multiplier polynomials from (33) have degree at least . There exists a finite sufficiently large such that (33) is feasible.
We delay the proofs and further discussion of these results to Appendix E. For now, we simply remark that Theorems 3 and 4 assert that the certification programs presented in this section are both complete in the sense that any collision-free polytope can be certified with our technique.
5 Polyhedral Decomposition of TC-free
In this section, we describe our algorithm for rapidly generating certified, polyhedral decomposition of TC-free. Our algorithm can be seen as a generalization of the Iris algorithm of deits2015computing to non-convex TC-space obstacles and so we name it C-Iris (Configuration-Space, Iterative Regional Inflation by Semidefinite programming). The key idea is to iteratively grow certified convex polytopes of increasing size around various important configurations in the TC-space. This is achieved by solving a series of convex optimization programs. The complete algorithm is summarized in Algorithm 1.
We begin by discussing how we will measure the size of our polytope . While it may be attractive to measure the size of a polytope by its volume, it is known that computing the volume of a half-space representation (H-Rep) polytope is #P-hard101010#P-hard problems are at least as hard as NP-complete problems provan1983complexity. dyer1988complexity and therefore intractable as an objective. A useful surrogate for the volume of used in deits2015computing is the volume of the maximum volume inscribed ellipse of : the set where is a positive-semidefinite matrix describing the shape of the ellipsoid and its center. The problem of finding the maximum volume inscribed ellipsoid in a polytope is a semidefinite program described in (boyd2004convex, Section 8.4.2).
[TABLE]
As we wish our polytopes to cover diverse areas of TC-free, we will grow each polytope around some nominal configuration we call the seed point. New seed points are typically chosen using rejection sampling to obtain a point outside of the existing certified regions. The polytope is required to contain as it grows.
A maximal volume, certified polytope around can be obtained by solving the following optimization program which combines the ellipsoidal program (34) with the certification program (23) from Section 4.1.
[TABLE]
The condition is given by the constraints (35b). Constraint (35c) enforces that grows around . The added constraint (35d) prevents numerically undesirable scaling. Finally, (35e) enforces that we search for hyperplanes which separate each collision pair and .
While this program is attractive as a specification, it is not convex due to bilinearity between and in (34b) and the bilinearity between the multipliers and the defining equations of implicit in (35e) (see Section 4.1). This bilinearity precludes simultaneous search of the polytope , inscribed ellipsoid , and the corresponding certificate . Therefore, we will approximate the solution to (35) by alternating between two convex programs; one of which will generate certificates of non-collision and one which will improve our polytope without violating the previous certificate.
Remark 3**.**
It is possible to replace (35e) with the equivalent constraints from program (33). We prefer to base our algorithm on (23) as it can be visualized (i.e. planes in the task space) and the polynomials contain fewer indeterminates and hence the optimization problem size is smaller. Also the separating planes approach produces separating certificates with quantifiable margins by measuring the distance from the collision geometries to the plane in task space.
We begin by demonstrating how a certified polytopic region can be improved. Suppose that a convex polytope has been certified with certificate and the maximum inscribed ellipse has been computed using (34). A new, larger polytope can be found by solving the convex optimization program (36) which pushes the faces of as far away from the surface of without violating the certificate . This procedure is visualized in Figure 4.
This can be achieved with the following optimization program:
[TABLE]
where is some positive constant ensuring that the objective is never [math]. We recall that (36c) is either a constraint of the form (19) or (22). We emphasize that in (36), are all fixed and it is the variables and which are searched over.
Our complete algorithm proceeds in three steps. First, an initial, collision-free polytope containing a seed point is certified using (24) to obtain . Next, the maximum inscribed ellipsoid is computed using (34). Finally, is improved using (36) to obtain a new polytope . This polytope has the same number of defining inequalities as . We iterate this process until the volume of stops improving. This algorithm is formalized in Algorithm 1. Every step of this process involves solving an convex program for which very fast, commercial solvers exist mosek; andersen2000mosek.
Remark 4**.**
Some practical considerations for improving the runtime of Algorithm 1 are discussed in the appendices. Specifically, in Appendix F we expand on design choices which substantially impact the size of the optimization programs as well as which part of Algorithm 1 can be parallelized. Additionally, in Appendix G we discuss a heuristic strategy for proposing a large, initial regions .
6 Results
We demonstrate the use of Algorithm 1 on systems of varying complexity. We begin with very simple robots where both the task and configuration space can be visualized and demonstrate that our algorithm can find very large portions of TC-space and achieve near-complete coverage for simple systems in reasonable time.
We then demonstrate the use of Algorithm 1 on various robots commonly found in industry. These include a KUKA iiwa reaching into a shelf, a bimanual KUKA iiwa, and similar setups for the Franka UR3. Our objective is show the scalability of our algorithm in realistic settings as well as demonstrate the diversity of shapes our approach can handle.
A mature implementation of our algorithm is available in the open-source robotics toolbox Drake drake. We furthermore provide examples of our algorithm in interactive Python notebooks. Animations of various figures in this section can also be found on this project’s website.
The implementation details of all experiments in this section, such as the choice of reference frame for each plane, the degree of the polynomials parametrizing the hyperplanes, and the degree of the multipliers polynomials in each program are expounded on in Appendix F.
6.1 Simple Robots
In this section, we consider two simple robots each containing only two degrees of freedom. This enables us to visualize both the task space, as well as the configuration space. Though containing few degrees of freedom, each environment maintains rich, realistic collision geometries.
6.1.1 Pendulum on a Rail
Our first robot shown in Figure 5 consists of a single arm, shown in orange, connected to a base via a revolute joint and placed within a box. The base of the robot is connected to the box via a prismatic joint. The collision geometries of the robot and box are approximated using polytopic boxes. A total of pairs of geometries can collide in this scene (i.e. certifying non-collision requires solving instances of either (23) or (33)). In Figure 5, we visualize the two dimensional tangent configuration space of our robot with the TC-space obstacle shown in red. We emphasize the highly non-convex shape of TC-free.
We run Algorithm 1 starting with a regular octagon of side length centered at the configuration , a configuration with the arm fully extended upwards and centered in the box. We obtain a sequence of certified polytopes of increasing size in the TC-space which are plotted in varying colors in Figure 5.
The algorithm terminates after 86 iterations of the while loop from Algorithm 1 taking a total of 314 seconds of wall time. During the course of the algorithm, the volume of the maximum inscribed ellipsoid improves by a factor of , from a starting value of to . The improvement in the volume of the inscribed ellipsoid, as well as the average time to solve both the certification program (23) and (36) are reported in Figure 6(a) and Table 6(b) respectively.
After completion, we select a single random configuration within our final certified region. In Figure 5, we highlight the tip of the pendulum in black. Additionally, we color each collision body for which the tip can collide in a separate color and plot the separating plane certificate between the tip and the body in the same color.
6.1.2 Pinball Flipper
We refer to our second system shown in Figure 7(a) as the pinball flipper. Each orange arm is connected to its gray base via a revolute joint. Each collision geometry in the scene is approximated with a box and a total of collision pairs exist. We similarly plot the TC-space in Figure 7(b) with the TC-space obstacle highlighted in red. In this experiment, we attempt to almost completely cover TC-free with polytopic regions in order to enable a motion plan where the flippers exchange positions. Overall, this scene exhibits a much more complicated TC-space obstacle as well as substantially more collision pairs when compared to the system from Section 6.1.1.
We run Algorithm 1 seeded with octagonal regions of side length , each centered at one of different configurations shown as the black dots in Figure 7(b). The resulting regions are also plotted in Figure 7(b) and almost completely cover the space. Though each region was initially seeded with a polytope of the same shape, our algorithm successfully adapts the shape of each polytope to fill the space. Our algorithm also is not conservative; it successfully finding regions which are tight to the TC-space obstacle in all cases.
The change in volume of the maximum inscribed ellipsoid of each region is shown in Figure 8(a). We remark that the volume of each region exhibits a diverse set of behaviors over the iterations. Each region was grown sequentially, with a total wall time to cover the space of s. This wall time could easily be improved by growing each region in parallel.
In Figure 9, we demonstrate the behavior of our certificates for various poses of our robot. In the top panel, we highlight in black the two tips of each flipper. The current configuration is highlighted as the green dot in the bottom panel. For each configuration, we also plot the hyperplane that proves the separation between the two black tips. Notice that in Figures 9(g), 9(h), and 9(i), the current configuration is contained in multiple regions at once. Therefore, each hyperplane in Figure 9(a)
We draw attention to the fact that at every configuration in TC-free, many different separating hyperplanes exist. The hyperplane obtained by evaluating the output of our certifier at is highly dependent on the region which is being certified. For example, in Figure 9(h), the blue region corresponds largely to a change in the position of the left flipper, while the green region corresponds largely to a change in the right flipper. We see in Figure 9(c), that the algorithm finds different separating planes for the blue and the green region, even for the same configuration, so as to accommodate the different range of robot motion in each region. For the blue region, which includes a large rotation of the left flipper, the blue plane would continue to separate the left flipper from the right flipper as the left flipper moves. Similarly, the green plane would continue to separate the right flipper from the left as the right flipper moves.
6.2 KUKA IIWA robot
In this section we demonstrate our algorithm deployed on the KUKA iiwa arm in two scenes relevant to robot manipulation. The collision geometry of the iiwa is approximated as a union of convex polytopes as are all obstacles in the scene. We begin by considering a single iiwa to demonstrate the practicality of our algorithm before considering a bimanual manipulator to demonstrate the scalability of our approach.
6.2.1 7-DOF IIWA With a Shelf
We apply Algorithm 1 to the scene shown in Figure 10: a 7-DOF KUKA iiwa arm reaching into a shelf. Our approach successfully finds many collision-free configurations, and we plot in green the separating hyperplane certificate between the end-effector, highlighted in blue, and the top shelf highlighted in red.
The run time of Algorithm 1 is dominated by the certification of non-collision between the pairs with the longest kinematic chain, as this leads to the highest degree polynomials and hence semidefinite variables in programs (23) and (36). For this program, the largest positive semidefinite matrix variable has rows. Overall, the largest certification program (23) takes 54s to solve, while the program (36) takes on average 8s to solve.
In Figure 11, we demonstrate the behavior of one certified region. In Figure 11(a), we show that the configurations of one of our certified polytopic region of TC-space (with 24 faces in the polytope) corresponds to many task-space end-effector positions. The configurations from Figure 11(a) are drawn from a region which grows by a factor of using iterations of Algorithm 1. This improvement in volume is reported in Figure 11(b), where we also compare the volume of the maximum volume inscribed ellipsoid against the volume of the polytopic region.
6.2.2 12-DOF Bimanual KUKA IIWA Example
We next consider designing regions to avoid self-collision for a robot consisting of two KUKA iiwa arms with the final joint welded (rotation of the final joint does not change the configuration of any geometry for this robot). This robot contains 12-DOF. This system tests the scalability of our algorithm due to the degree of the polynomials involved in the forward kinematics, as well as the complexity of the collision geometries.
Solving the largest certification program in (23) takes 105 minutes, while the program in (36) takes 4 minutes. The increase in solve times compared to the single iiwa environment from Section 6.2.1 is best attributed to the increase in the size of the semidefinite variables due to the larger DOF. The largest semidefinite matrix in both programs have rows and correspond to certifying that the two tips of the iiwas do not collide.
Nonetheless, our algorithm again finds certified, 30-face polytopic regions of TC-space which correspond to a wide range of task-space positions as seen in Figure 12(a). Moreover, the same region is quite tight to the TC-space obstacle; one sampled configuration in the certified region, shown in Figure 12(b), corresponds to just mm of separation between the two arms.
6.3 UR3e Robot
In this section, we test our algorithm on a UR3e robot with a gripper mounted at the wrist. The robot’s links are approximated by cylinders and we weld the gripper’s prismatic joints so that each UR3e has a total of 6 DOFs. This section differs from the KUKA iiwa experiment in Section 6.2 due to the introduction of non-polytopic collision geometries into the scene. Similar to Section 6.2, we test our approach for a scene where the robot is reaching into a shelf, as well as a bimanual set up.
6.3.1 6-DOF UR3e With a Shelf
In Figure 13, we consider a UR3e robot reaching into a shelf to grasp a small box shaped object. To simulate a situation where the robot is attempting to pick up the red object, we use Algorithm 1 to grow a certified, TC-free polytope (with 12 faces) near the object. Figure 13 shows a variety of postures sampled from the final TC-free polytope and demonstrates that within a single region, our robot is able to reach into the shelf to grasp the object, retract away from the shelf, and maneuver within the shelf while avoiding the object.
Similar to Section 6.2.1, the largest semidefinite variables in programs (23) and (36) has rows with program (23) taking about s to solve.
6.3.2 12-DOF Bimanual UR3e
Finally, we demonstrate our algorithm on a dual UR3e platform shown in Figure 14. Again, we emphasize that we are able to find large regions of TC-configuration space which correspond to diverse positions in task space with the postures in Figure 14(a) and 14(b) being drawn from the same certified region (a 13-face polytope). Moreover, these regions are very tight to the TC-configuration space obstacle with the two bodies highlighted in red in Figure 14(b) being just mm apart. For this example, the largest positive semidefinite matrices in (23) and (36) has 128 rows with the largest program taking about minutes to solve. This program solves faster than the analogous program for the bimanual iiwa from Section 6.2.2 because we require fewer polynomial positivity conditions to certify that the UR3e’s cylindrical geometries are on a given side of a plane compared to the polytopic approximation used for the iiwa.
7 Conclusion
Understanding the complicated geometry of C-free is an essential step to designing safe, collision-free motion plans. In this work, we presented an approach for describing a rational parametrization of C-free, known as TC-free, using a union of polytopes. Our primary contributions are two Sums-of-Squares program (23) and (33) which can certify that a polytopic region of TC-space is collision-free, as well as another program (36) which finds a local improvement that increases the size of a TC-free polytope. We prove that feasibility of our certification programs (23) and (33) are both necessary and sufficient for proving that a polytopic region of TC-space is collision-free and we combine programs (23) and (36) into a practical algorithm for describing TC-free as a union of certified, collision-free polytopes in the TC-space. We deployed our algorithm on both simple and realistic environments and demonstrate that Algorithm 1 finds large TC-space regions which correspond to diverse positions in task space. We demonstrate that these regions are not conservative and very tight to the TC-space obstacle even for 12-DOF systems by showing postures with just millimeters of separation.
The presented method works for TC-spaces of arbitrary dimensions, makes only very mild assumptions on the kinematics of our robot, and makes no assumptions about the shape of the TC-space obstacles. Moreover, it only relies on the mild assumption that obstacles in the task space are described as unions of convex sets, an assumption that is frequently satisfied whenever a given environment is simulated.
Such certified descriptions of TC-free find practical application in both randomized and optimization-based collision-free motion planning algorithms, providing a means to certify safety of an entire trajectory by checking membership in a set rather than by finite sampling which can be prone to false assertions of safety. Moreover, the convexity of the generated regions is particularly attractive to optimization-based methods such as the GCS framework of marcucci2022motion. Future work intends to further explore these applications as well as practical algorithms for seeding Algorithm 1 to obtain good coverage of TC-free with few regions.
8 Acknowledgement
This work was supported by the MIT Quest For Intelligence.
Appendix A Algebraic Kinematics
An in depth review of algebraic kinematics and low order pairs can be found in (wampler2011numerical, Chapter 4). We include a brief review in this appendix for completeness.
A mechanism composed of links is considered algebraic if each link is connected by one of the following five joints:
- •
Revolute (R): a 1-DOF joint permitting revolution about an axis of symmetry. An example is a door handle.
- •
Prismatic (P): a 1-DOF joint permitting translation along an axis. An example is a linear rail.
- •
Cylindrical (C): a 2-DOF joint permitting both revolution about an axis of symmetry and independent translation along a given axis. An example is the rods of a Foosball table.
- •
Planar (E): A 3-DOF joint permitting translation and rotation in a two-dimensional plane. An example is hockey puck moving on the surface of the ice.
- •
Spherical (S): A 3-DOF joint permitting free rotation between two links. An example is the human shoulder.
We recall from Section 3.3 that the pose of a point expressed in the reference frame , written as a function of the robot configuration can be expressed as
[TABLE]
where is a rigid transform describing the relative motion allowed by the th joint. The matrices are in general restriction of the following forms
[TABLE]
The specific restrictions for R, P, C, and E joints are given in Table 3. The matrix is an element of parametrized using Euler angles .
We remark that the joints C, E, and S can be constructed by the composition of R and P joints.
- •
A C joint is a composition of an R joint and a P joint:
[TABLE]
- •
An E joint is the composition of one R joint and two P joints
[TABLE]
- •
An S joint is the composition of three R joints expressed as Euler angles.
[TABLE]
Our approach presented for a robot composed of R and P joints can be extended to handle any algebraic mechanism by consider the other algebraic joints as compositions of R and P joints.
Appendix B Definition of Archimedean
In this section we formally define the Archimedean property that appears in Theorem 1 and Theorem 2.
Definition 1**.**
A semialgebraic set is Archimedean if there exists and such that:
[TABLE]
Appendix C Semialgebraic Descriptions of Set Membership for Common Convex Bodies
Appendix D Parametrized Hyperplane Separation Condition for the Cylinder
To derive the hyperplane separation condition for cylinder, we first attach a geometric frame to the cylinder, as shown in Fig.15. The cylinder’s geometric frame ’s origin coincides with the cylinder’s center, with the axis of the frame along the cylinder axis. The height of the cylinder is , with the top/bottom circle radius being and respectively.
We first write the plane with its parameters in the cylinder’s geometric frame and derive the conditions on . The cylinder is in the positive side of the plane if and only if both its top and bottom rim are on the positive side of the plane, namely
[TABLE]
Taking the infimum of both sides with respect to makes the above conditions equivalent to
[TABLE]
Next, we use the Schur complement, to reformulate (43a) and (43b) the positive semidefinite matrix conditions. For example, (43a) is equivalent to
[TABLE]
As explained in Section 4.1, this polynomial PSD condition can be reformulated as the condition
[TABLE]
To avoid the trivial solution (which is not in fact a separating plane), we add the extra constraint . Here is the position of the cylinder center expressed in the geometric frame which coincides with the frame’s origin. Therefore , and so it is sufficient to introduce the constraint
[TABLE]
to exclude the trivial solution .
In our optimization program, we express the separating plane in a frame (where the choice of frame is discussed in F.1), not in cylinder’s geometric frame . Hence we need to compute from their corresponding terms expressed in frame and the relative transform between the two frames
[TABLE]
As described in Section 3.3, both the position and orientation are rational functions of . By replacing in (44b) and (45) with (46) and requiring the resulting numerator of the rational function to be non-negative, we derive that the plane separating cylinders can be enforced via a polynomial non-negativity condition which can be formulated as sums-of-squares condition.
Appendix E The Certification Programs are Necessary and Sufficient
In this section, we expand our discussion on the power of the certification programs presented in Sections 4.1 and 4.2. As remarked previously, Theorems 4 and 3 are necessary as programs (33) and (23) are infinite dimensional. It is not immediately obvious that for every robot and every scene, there exists a finite degree where in each program must become feasible when truly contains no collisions.
A second subtlety applies specifically to (23). When generalizing (3), we argued that it was beneficial to search for a parametric hyperplane as a function of our TC-space variable and asserted that a polynomial parameterization was a good choice. However, it is not obvious that a polynomial parameterization is sufficient, and perhaps we require a rational or even more complicated parameterization of the plane.
These questions about the power of SOS programming arise in other domains. For example, SOS is commonly used to search for polynomial Lyapunov functions to prove the stability of polynomial dynamical systems majumdar2017funnel. However, it is known that not every stable polynomial dynamical system admits a polynomial Lyapunov function ahmadi2011globally, and therefore SOS programming is a sufficient, but not necessary tool for proving the stability of dynamical systems.
Fortunately, our certification programs from 4.1 and 4.2 are indeed necessary and sufficient, in the sense that there will always exist a finite degree such that the programs become feasible if contains no collision. The proof of this for the program (33) follows immediately from Theorem 2.
Proof.
(of Theorem 4) Our assumptions on , and imply that is an Archimedean set. Therefore, the feasibility of (33) for sufficiently high degree follows immediately from “effective” versions of Theorem 2 such as those given in nie_complexity_2007; baldi2021moment which give explicit degree bounds. ∎∎
Though the proof of Theorem 3 is more technically involved, the key idea is simple. In short, we construct a family of continuous functions which map each TC-space configuration to a separating plane. We then argue that this family of continuous functions must contain hyperplanes which are parametrized as polynomials. Finally, we again appeal to “effective” versions of Theorem 1 such as those given in nie_complexity_2007; baldi2021moment to show that these polynomials can be found using SOS programming.
We proceed in steps, first establishing that the set of separating planes at a point in TC-free is open.
Proposition 1**.**
Let denote the set of strictly separating hyperplanes at the point for bodies and and let be a non-empty, polytopic subset of TC-free. Then implies that is a non-empty, open set. ∎
Proof.
By definition, a hyperplane strictly separates and if and only if there exist positive constants and such that and . Since the bodies and are strictly separating for every point , the Separating Hyperplane theorem guarantees the existence of such a vector and so is non-empty.
Now consider and its neighborhood
[TABLE]
with .
We have that for all
[TABLE]
and similarly for all
[TABLE]
Letting and , we have that all planes are separating if
[TABLE]
and so is open. ∎∎
Proposition 2**.**
Define
[TABLE]
For all there exists , not necessarily finite such that, is non-empty and open for every .
Proof.
Recall that the position of every point in is a continuous function of and that the distance from a point to a set is a continuous function rudin1976principles. Therefore, the distance of every point in to every element of changes continuously. For every and we define:
[TABLE]
We have that
[TABLE]
Moreover, if , then . By continuity and monotonicity, as and so there exists sufficiently small such that . A similar argument shows that can be chosen sufficiently small such that the plane continues to satisfy the separating plane conditions for . Therefore for all such that if is chosen sufficiently small. It is clear that choosing smaller continues to ensure that is non-empty. Openness is immediate following a similar argument to Proposition 1. ∎∎
The above proposition enables us to establish that there exists an open family of continuous functions such that their outputs are always separating hyperplanes.
Proposition 3**.**
Let be the set of continuous functions mapping
[TABLE]
such that for all . The set is non-empty and open under the pointwise metric
[TABLE]
Proof.
Suppose were empty. Then every function satisfying is not a continuous function. Namely, for every there exists a point such that for all , but . This contradicts the openness of for a sufficiently small from Proposition 2 and so is non-empty. Openness follows from the fact that if is chosen sufficiently small, then for every continuous satisfying , then must also separate and for every .
∎∎
We are now ready to prove Theorem 3
Proof.
(of Theorem 3) By Proposition 3, is a non-empty open subset of continuous functions defined on the compact domain . The Stone-Weierstrass theorem rudin1976principles states that the set of polynomial functions on a compact domain is dense in the set of continuous functions in that domain under the pointwise metric. Therefore, must contain a map such that each component is a polynomial. This polynomial is of finite degree and is a strictly separating hyperplane and therefore by “effective” versions of Theorem 1 such as nie_complexity_2007; baldi2021moment, there exists a Putinar certificates of finite degree certifying that is a separating hyperplane. ∎∎
Appendix F Practical aspects
In this section, we discuss some practical aspects for essential for enabling Algorithm 1 to realistic examples. These include the choice of reference frame in which to express the forward kinematics, the selection of a finite basis for the polynomials in our SOS programs, and which aspects of 1 can be parallelized.
F.1 Choosing the Reference Frame
The polynomial implications upon which the certification program (23) and polytope growth program (36) are based require choosing a coordinate frame between each collision pair and . However, as the collision-free certificate between two different collision pairs can be computed independently of each other, we are free to choose a different coordinate frame to express the kinematics for each collision pair. This is important in light of (10) and (14) that indicate that the degree of the polynomials and are equal to two times the number of joints lying on the kinematic chain between frame and the frame for . For example, the tangent-configuration-space polynomial in the variable describing the position of the end-effector of a 7-DOF robot is of total degree when written in the coordinate frame of the robot base. However, when written in the frame of the third link, the polynomial describing the position of the end effector is only of total degree . This observation is also used in trutman2020globally to reduce the size of the optimization program.
The size of the semidefinite variables in (23) and (36) scale as the square of the degree of the polynomial used to express the forward kinematics. Supposing there are links in the kinematics chain between and , then choosing the th link along the kinematics chain as the reference frame leads to scaling of order . Choosing the reference frame in the middle of the chain minimizes this complexity to scaling of order and we therefore adopt this convention in our experiments.
F.2 Basis Selection
The condition that a polynomial can be written as a sum of squares can be equivalently formulated as an equality constraint between the coefficients of the polynomial and an associated semidefinite variable known as the Gram matrix parrilo2004sum. Namely, a polynomial is sums-of-squares if and only if where is a vector of monomials and is the Gram matrix. The number of rows in the positive semidefinite Gram matrix equals to the size of the vector . In general, a sums-of-squares polynomial in variables of total degree requires a Gram matrix of size to represent which can quickly become prohibitively large. Fortunately, the polynomials in our programs contain substantially more structure which will allow us to select a small-sized vector of monomials , and hence drastically reduce the size of the Gram matrices and speed up the optimization problem.
F.2.1 Polytopic collision geometry
We begin with the separating plane condition for polytopic collision geometries. Note that from (14) that while both the numerator and denominator of the forward kinematics are of total degree , with the number of links of the kinematics chain between frame and , both polynomials are of coordinate degree of at most two (i.e. the highest degree of in any term is ). We will refer to this basis as which is a vector containing terms of the form with for all possible permutations of the exponents .
We recall that we parametrize our hyperplane using polynomial entries. If , for some basis in the variable . The position of is expressed in basis , then the left hand side of (19) can be expressed as a linear function of the basis , where contains all the possible entries that appear in the outer product .
Example 3**.**
Suppose
[TABLE]
and
[TABLE]
.
Then:
[TABLE]
Namely contains the monomials whose degree for each is at most 3, and only one of can have degree 3 (hence is not included in ).
Similarly, we must select a basis for our multiplier polynomials . The equality in (19) determines the minimum necessary basis . If the polynomial is expressed in basis , then the minimal such basis is related to an object known in computational algebra as the Newton polytope of denoted sturmfels1994newton. Denoting the linear basis
[TABLE]
then exact condition is that
[TABLE]
where the sum in this case is the Minkowski sum.
By using affine polynomials for separating plane parameters , we know that is the same as the linear basis , then we obtain the condition that and since is a dense, even degree basis we must take . A sums-of-squares polynomial in the basis of has Gram matrix with rows. Choosing as the constant basis would in fact result in the same condition, and therefore searching for separating planes which are linear functions of the tangent-configuration-space variable does not increase the size of the semidefinite variables. As the complexity of (23) and (36) are dominated by the size of these semidefinite variables, separating planes which are linear functions changes do not substantially affect the solve time but can dramatically increase the size of the regions which we can certify.
Because of this, we choose to parametrize all of our hyperplanes throughout our experiments as linear functions of the TC-space variables. We stress that in general, the choice of a linearly parametrized hyperplane, and the selection of to be the minimum size to match the degree of the left hand side of (19) may not be sufficient to prove that a region is collision-free, even if truly is collision-free. Indeed due of many complexity-theoretic results, we expect that in general and may need to have exponentially high degree for some robots, scenes, and polytopes stengle1996complexity. However, in practice we have observed that the choices in this section are sufficient to certify many regions of interest, while keeping the optimization problem size tractable for state-of-art numerical solvers.
Remark 5**.**
Attempting to certifying that the end-effector of a 7-DOF robot will not collide with the base using program (23) using linearly parametrized hyperplanes and choosing to express conditions (19) in the world frame with naïvely chosen bases would result in semidefinite variables of size . Choosing to express the same conditions according to the discussion in Section F.1 and choosing the basis described in this section results in semidefinite matrices of rows at most . The division by 2 comes from choosing the middle link as the expressed frame, hence halving the kinematic chain length.
F.2.2 Non-polytopic collision geometry
In this section, we use the sphere as a running example for explaining how we choose the monomial bases for certifying separation of the non-polytopic geometries; the monomial bases for capsules and cylinders can be derived in a similar manner.
As mentioned in (20), we need to impose
[TABLE]
By the definition of positive semidefinite matrix 111111A matrix is positive semidefinite if and only if , we know that the matrix in the right of in (47) is positive semidefinite if and only if
[TABLE]
We impose the following sufficient condition for (47), where
[TABLE]
Now we analyze the degree of the polynomial defined in (48). As mentioned in the previous subsection, each monomial in are of the form . Combining this with the choice of a separating plane being affine functions of , we derive that each monomial in is of the form , , and at most one of can be 3. As an example, is a valid monomial in but is not (because doesn’t contain the cross product between ). Similarly, is not in the basis because at most one of can have degree 3. Given these properties on the monomials in - specifically there being no cross-product term in - we can write the positive polynomials as the summation of three SOS polynomials
[TABLE]
For each monomial in the SOS polynomial , the degree of for is either 0, 1, or 2. Hence the number of rows in the Gram matrix in is of size . By choosing the reference frame according to the convention from Appendix F.1, is no larger than where is the number of joints in the robot.
Remark 6**.**
For a 6-DOF UR3erobot whose collision geometries are approximated by cylinders, to certify the collision-avoidance between the robot and objects in the world (or self-collision), the largest positive semidefinite matrix in our optimization problem has rows at most , where the division by 2 comes from choosing the middle link as the expressed link, hence halving the kinematic chain length to .
F.3 Parallelization
While it is attractive from a theoretical standpoint to write (23) as a single, large program it is worth noting that it can in fact be viewed as individual SOS programs, where is the number of collision pairs in the environment. Indeed, certifying whether pairs are collision-free for all in the polytope can be done completely independently of the certification of another pair as the constraint are not coupled between any pairs. Similarly, the search for the largest inscribed ellipsoid can be done independently of the search for the separating hyperplanes.
Solving the certification program (23) as individual SOS programs has several advantages. First, as written (23) has semidefinite variables of various sizes, where is the number of inequalities in and denotes the number of inequalities required to express that body is on a particular side of the plane (see Table 4). In the example from Section 6.1.2 this corresponds to semidefinite variables. This can be prohibitively large to store in memory as a single program as the size of these semidefinite variables grow. Solving for the separating plane for each pair of collision bodies independently also enables us to determine which collision bodies cannot be certified as collision-free and allows us to terminate our search as soon as a single pair cannot be certified. Finally, decomposing the problems into subproblems enables us to increase computation speed by leveraging parallel processing.
The program (34) can also be solved completely independently of the certification program (23) and is in general a much smaller SDP than any individual certification program. Therefore, lines and of Algorithm 1 can be solved in parallel.
We note that (36) cannot be similarly decomposed as on this step the variables and affect all of the constraints. However, this program is substantially smaller as we have fixed of the semidefinite variables as constants and replaced them with linear variables representing the polytope. This program is much more amenable to being solved as a single program.
Appendix G Seeding Algorithm 1
Algorithm 1 must be initialized with a polytope for which (23) is feasible. In principle, the alternation proposed in Section 5 can be seeded with an arbitrarily small polytope around a collision-free seed point. This seed polytope is then allowed to grow using Algorithm 1. However, this may require running several dozens of iterations of Algorithm 1 for each seed point which can become prohibitive as the number of degrees of freedom in our robot or the complexity of the scene grows. It is therefore advantageous to seed with as large a region as can be initially certified.
Here we discuss an extension of the Iris algorithm in deits2015computing which uses nonlinear optimization to rapidly generate large regions in TC-space. These regions are not guaranteed to be collision-free and therefore they must still be passed to Algorithm 1 to be certified, but do provide good initial guesses. In this section, we will assume that the reader is familiar with Iris and will only discuss the modification required to use it to grow TC-space regions. Detailed pseudocode is available in Appendix H.
Iris grows regions in a given space by alternating between two subproblems: SeparatingHyperplanes and InscribedEllipsoid. The InscribedEllipsoid is exactly the program described in (boyd2004convex, Section 8.4.2) and we do not need to modify it. The subproblem SeparatingHyperplanes finds a set of hyperplanes which separate the ellipse generated by InscribedEllipsoid from all of the obstacles. This subproblem is solved by calling two subroutines: ClosestPointOnObstacle and TangentPlane. The former finds the closest point on a given obstacle to the ellipse, while the latter places a plane at the point found in ClosestPointOnObstacle that is tangent to the ellipsoid.
The original work of deits2015computing assumes convex obstacles which enables ClosestPointOnObstacle to be solved as a convex program and for the output of TangentPlane to be globally separating plane between the obstacle and the ellipsoid of the previous step. Due to the non-convexity of the TC-space obstacles in our problem formulation, finding the closest point on an obstacle exactly becomes a computationally difficult problem to solve exactly ferrier2000computation. Additionally, placing a tangent plane at the nearest point will be only a locally separating plane, not a globally separating one.
To address the former difficulty, we formulate ClosestPointOnObstacle as a nonlinear program. Let the current ellipse be given as and suppose we have the constraint that . Let and be two collision pairs and be some point in bodies and expressed in some frame attached to and . Also, let and denote the rigid transforms from the reference frames and to the world frame respectively. We remind the reader that this notation is drawn from tedrakeManip. The closest point on the obstacle subject to being contained in can be found by solving the program
[TABLE]
This program searches for the nearest configuration in the metric of the ellipse such that two points in the collision pair come into contact. We find a locally optimal solution to the program using a fast, general-purpose nonlinear solver such as SNOPT gill2005snopt. The tangent plane to the ellipse at the point is computed by calling TangentPlane, then appended to the inequalities of to form . This routine is looped until (51) is infeasible at which point InscribedEllipse is called again.
Once a region is found by Algorithm 2, it will typically contain some minor violations of the non-collision constraint. To find an initial, feasible polytope to use in Algorithm 1, we search for a minimal uniform contraction of such that is collision-free. This can be found by bisecting over the variable and solving repeated instances of (23).
Seeding Algorithm 1 with a as above can dramatically reduce the number of alternations required to obtain a fairly large region and is frequently faster than seeding Algorithm 1 with an arbitrarily small polytope.
Appendix H Supplementary Algorithms
We present a pseudocode for the algorithm presented in Appendix G. A mature implementation of this algorithm can be found in Drake121212https://github.com/RobotLocomotion/drake/blob/2f75971b66ca59dc2c1dee4acd78952474936a79/geometry/optimization/iris.cc#L440.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1Ahmadi et al. (2016) Ahmadi AA, Hall G, Makadia A and Sindhwani V (2016) Geometry of 3d environments and sum of squares polynomials. ar Xiv preprint ar Xiv:1611.07369 .
- 2Ahmadi et al. (2011) Ahmadi AA, Krstic M and Parrilo PA (2011) A globally asymptotically stable polynomial vector field with no polynomial lyapunov function. In: 2011 50th IEEE Conference on Decision and Control and European Control Conference . IEEE, pp. 7579–7580.
- 3Amice et al. (2022) Amice A, Dai H, Werner P, Zhang A and Tedrake R (2022) Finding and optimizing certified, collision-free regions in configuration space for robot manipulators. In: Algorithmic Foundations of Robotics XV: Proceedings of the Fifteenth Workshop on the Algorithmic Foundations of Robotics . Springer, pp. 328–348.
- 4Andersen and Andersen (2000) Andersen ED and Andersen KD (2000) The mosek interior point optimizer for linear programming: an implementation of the homogeneous algorithm. High performance optimization : 197–232.
- 5Ap S (2019) Ap S M (2019) The MOSEK optimization toolbox for MATLAB manual. Version 9.0. URL http://docs.mosek.com/9.0/toolbox/index.html .
- 6Baldi and Mourrain (2021) Baldi L and Mourrain B (2021) On moment approximation and the effective putinar’s positivstellensatz. ar Xiv preprint ar Xiv:2111.11258 .
- 7Blekherman et al. (2012) Blekherman G, Parrilo PA and Thomas RR (2012) Semidefinite optimization and convex algebraic geometry . SIAM.
- 8Boyd et al. (2004) Boyd S, Boyd SP and Vandenberghe L (2004) Convex optimization . Cambridge university press.
