Approximating Robot Configuration Spaces with few Convex Sets
using Clique Covers of Visibility Graphs
Abstract
Many computations in robotics can be dramatically accelerated if the robot configuration space is described as a collection of simple sets. For example, recently developed motion planners rely on a convex decomposition of the free space to design collision-free trajectories using fast convex optimization. In this work, we present an efficient method for approximately covering complex configuration spaces with a small number of polytopes. The approach constructs a visibility graph using sampling and generates a clique cover of this graph to find clusters of samples that have mutual line of sight. These clusters are then inflated into large, full-dimensional, polytopes. We evaluate our method on a variety of robotic systems and show that it consistently covers larger portions of free configuration space, with fewer polytopes, and in a fraction of the time compared to previous methods.
I Introduction
Approximating complex sets as a union of simpler sets is a common pre-processing method for accelerating downstream computations. Familiar examples include clustering methods for high-dimensional data in machine learning [1, §2.5.2], approximating complex shapes via triangular meshes to facilitate graphics rendering [2], and describing geometries as unions of convex sets for efficient collision checking [3]. Similarly, recently developed methods for robot motion planning rely on (conservative) decompositions of the environment into convex sets to design smooth trajectories around obstacles using efficient convex optimization [4, 5, 6, 7, 8]. These motion planners have demonstrated great potential, and performance frequently superior to widely used sampling-based methods [5]. However, the required decomposition of the environment is a daunting task, often demanding a substantial degree of human supervision. This is largely due to the fact that the collision-free subset of a robot’s configuration space () is intractable to describe analytically [9, §3], even if the robot’s task space is relatively simple (e.g. see Figure 1).
In [10], the authors proposed an algorithm called IRIS to quickly compute large convex subsets of . This method takes as input a “seed” configuration and inflates a large polytopic region around this seed point using convex optimization. While originally limited to the case of convex obstacles, the IRIS algorithm has been recently extended to handle nonconvex obstacles and the complicated configuration spaces of multi-link robot manipulators [11, 12, 13]. The polytopes generated with these algorithms have been used with great success for motion planning in high dimensions [5, 6, 7]. Nevertheless, seeding collections of these regions so that they cover diverse areas of remains a challenge: manual seeding is tedious, and naively growing regions around randomly chosen configurations leads to very inefficient decompositions.
In this paper, we propose an efficient method for the approximate decomposition of robot configuration spaces into few large convex sets, without any human supervision. A guiding illustration is shown in Figure 2.
Similar to some motion-planning algorithms [14, 15], our method constructs a visibility graph by sampling points in . The vertices of this graph are collision-free samples, and the edges connect pairs of points with mutual line of sight. The visibility graph contains rich information about the geometry of . In particular, our key observation is that, as the number of samples grows, fully connected subgraphs of this visibility graph (so-called “cliques”) tend to represent better and better approximations of collision-free convex sets in the underlying configuration space. Our approach is to decompose the visibility graph into a small collection of large cliques. We then circumscribe the points in each clique with an ellipsoid by solving a convex-optimization problem. The center and the principal directions of these ellipsoids are subsequently used to initialize an inflation algorithm analogous to IRIS.
Through a large variety of experiments, we show that our algorithm outperforms previous approaches for seeding and inflating convex regions; both in terms of runtimes and number of regions used to cover the space. As an example, for a robot arm with seven degrees of freedom, and many task-space obstacles, our method requires approximately regions and one hour of computations to cover of , whereas the approach outlined in [12] requires ten times more regions and is ten times slower.
II Related Works
Finding the minimum convex cover of a set is a hard problem; even in the case of two-dimensional polygons, the problem is hard to solve exactly and approximately.111More formally, the problem is -complete [16], and therefore NP-hard, as well as APX-hard [17]. Nonetheless, finding low-cardinality convex covers of high-dimensional nonconvex spaces (both polygonal and non-polygonal) remains a problem of practical importance, for which a variety of approximate algorithms have been devised. In the following, we group these algorithms into two categories: ones that require explicit (e.g., analytic) descriptions of , and ones that only use implicit descriptions of (and are hence suitable for most complex configuration spaces). In this literature review, we particularly focus on IRIS algorithms, due to their efficient scaling to high dimensions.
II-A Algorithms Requiring Explicit Obstacle Descriptions
The recent work [18] constructs low-cardinality convex covers of two-dimensional polygons by first decomposing them into small convex pieces (for example triangles), and then by joining the pieces based on a small clique cover of an approximated set-to-set visibility graph. Similarly, the visibility graph of polygons is directly used to construct convex covers in [19]. In three dimensions the approach in [20] can be used to decompose into sets that are approximately convex, provided that a triangle mesh description is available. Finally, if the configuration-space obstacles are explicitly described as convex sets, the original IRIS algorithm from [10] can be used to inflate a large polytope in around a specified seed point in arbitrary dimensions.
II-B Algorithms Allowing Implicit Obstacle Descriptions
Most commonly, the explicit descriptions of the obstacles are only available in task space; while the collision-free configuration space is defined implicitly through the robot’s inverse kinematics, and is intractable to describe analytically [9, §3]. Some works have focused on approximately describing the configuration space obstacles, rather than [21, 22, 23]. Conversely, multiple works have studied directly obtaining convex decompositions of . In [24] visibility graphs and kernels are used to compute convex decompositions of three-dimensional spaces via sample-based collision checking. However, their method represents the convex sets through their vertices, and is inefficient in higher dimensions. In the family of IRIS algorithms, two methods can deal with implicit descriptions of : IRIS-NP [12] and C-IRIS [11, 13]. The former extends the original IRIS method [10] to arbitrary configuration spaces using nonlinear programming and inflates polytopes that are collision-free with high probability. The latter grows polytopes that are rigorously certified to be collision-free using a rational reparametrization of the configuration space and sums-of-squares programming.
III Convex Covers, Visibility, and Cliques
In this section, we formally define our main problem: approximating the free configuration space with a low-cardinality collection of convex sets. We also briefly review the main technical tools that we will use in the development of our algorithm, namely, visibility graphs and clique covers.
III-A Problem Statement
Let be the collision-free subset of an -dimensional configuration space, which we assume to have a well-defined finite volume. Let also be a constant in the interval .
Definition 1
An -approximate convex cover of is a collection of potentially overlap** convex sets whose union covers at least an -fraction of the volume of :
Our problem is to find an -approximate convex cover of minimum cardinality .
In practice, we are interested in solving this problem for values of that are sufficiently high to accomplish a task of interest, such as collision-free motion planning, but not so large that the cardinality grows unreasonably. Indeed, when , Min -ApproxConvexCover might not even have a finite solution.222For a finite solution is guaranteed to exist. This can be seen by computing the volume of with a lower Darboux integral over finite hyperrectangle partitions.
III-B Visibility Graphs and Clique Covers
Our algorithm is based on the idea that clusters of points that see each other can approximate convex subsets of . Here, we formally define the notion of visibility as well as introduce some formal tools from graph theory to guide the development of our algorithm.
We begin by defining visibility in .
Definition 2
Two points are said to see each other if the entire line connecting them is collision-free: for all . Notice that this definition is symmetric in and .
We are now ready to define the visibility graph of a set of collision-free configurations.
Definition 3
The visibility graph of a set of points is an undirected graph with vertices , and with an edge for every pair of distinct points and that see each other.
We show an example of a visibility graph in Figure 2. We note that clusters of points that can all see each other form a clique in the visibility graph.
Definition 4
Let be an undirected graph. A clique is a subset of where every pair of vertices is connected by an edge.
Note that if a cluster of configurations can be placed in the same convex set, then these configurations must form a clique in the visibility graph. The second panel in Figure 2 highlights a collection of five cliques in the visibility graph that have this property. These five cliques form what is called a clique cover; which resembles a discrete analog of a convex cover.
Definition 5
A collection of cliques is a clique cover of a graph if every vertex in the graph is contained in at least one clique.
A natural discrete counterpart of the minimum convex cover is the MinCliqueCover problem, where we look for the minimum number of cliques required to cover a graph. Our observation is that, as the number of samples in the visibility graph increases, a minimum clique cover typically does an increasingly better job of approximating a minimum convex cover. Limitations of this analogy are discussed in §VI.
MinCliqueCover is NP-complete [25]. There exist heuristics, such as [26], that attempt to solve MinCliqueCover directly. Alternatively, one can greedily construct a clique cover by repeatedly eliminating the largest clique. The problem of finding the largest clique in a graph is called MaxClique. Even though this problem is also NP-complete [25], it is often substantially faster to solve in practice. We found the latter approach with exact solutions of MaxClique to perform particularly well on our problem instances.
IV Algorithm
We now present our Visibility Clique Cover (VCC) algorithm, which consists of four main steps. First, we randomly sample a collection of points in and construct their visibility graph. Second, we compute an approximate clique cover of the graph. Third, we summarize the geometric information of each clique using an ellipsoid. Fourth, we use these ellipsoids to initialize a polytope-inflation algorithm analogous to IRIS. This process is repeated until the generated set of polytopes covers a given fraction of . This procedure is summarized in Algorithm 1, and the remainder of this section details the individual steps.
IV-A Sampling the Visibility Graph
At the beginning of every iteration of VCC, the subroutine SampleVisibilityGraph samples configurations uniformly at random from the portion of that is not already covered by the polytopes in . Then, it constructs the visibility graph , by checking for collisions along the line segments connecting each pair of sampled configurations. Currently, this is performed using sampling-based collision checkers. Exact visibility checking is possible using methods such as [27], [28, §5.3.4], or [29].
IV-B Truncated Clique Cover
In the subroutine TruncatedCliqueCover we approximately cover the visibility graph with a collection of cliques, each of which contain at least vertices. We construct this approximate cover greedily, by solving a sequence of MaxClique problems. Each instance of MaxClique is formulated as an integer linear program
(1a) | |||||
(1b) | |||||
(1c) |
A binary decision variable is added for each vertex. The role of this variable is to take unit value if and only if vertex is included in the clique. The set contains all the pairs of vertices such that and . Therefore the first constraint ensures that two vertices are selected only if they share an edge.
After solving the integer program (IV-B), the clique found is removed from the graph and added to the clique cover. Since small cliques are not informative, we stop this iterative process when the largest clique left in the graph is smaller than a given threshold . For this reason, our clique covers will be truncated, i.e., generally, not all vertices will be contained in one of the cliques.
IV-C Summarizing Cliques with Ellipsoids
In the subroutine MinVolumeEllipsoids, we solve a semidefinite program to enclose each clique with an ellipsoid of minimum volume [30, §8.4.1]. This collection of ellipsoids allows us to summarize the geometry of each clique with a point and a set of principal directions, which are then used to initialize the region-inflation algorithm. For the upcoming computations, it is necessary that the center of each ellipsoid is not in collision; if this is not the case, we recenter the ellipsoid around the vertex in the clique that is closest to its center.
IV-D Inflating Polytopes
In the last step of VCC, the subroutine InflatePolytopes inflates a large, collision-free polytope around the center of each ellipsoid induced by a clique.
Let us initially assume that the obstacles are convex. Consider a single ellipsoid; using convex optimization, we compute the point in each obstacle that is closest to the center of the ellipsoid, according to the distance metric induced by the ellipsoid. These points anchor separating hyperplanes between the ellipsoid center and the obstacles, which form a polytope of obstacle-free space. These steps are repeated for each ellipsoid (i.e., for each clique) to obtain a collection of collision-free polytopes that we add to the set .
Domain | Village | 3DOF Flipper | 5DOF UR3 | 7DOF IIWA | ||||
---|---|---|---|---|---|---|---|---|
Algorithm | IOS | VCC (ours) | IOS | VCC (ours) | IOS | VCC (ours) | IOS | VCC (ours) |
# regions | 198.013.6 | 93.97.5 | 10.41.9 | 6.70.5 | 90.518.8 | 35.11.6 | 482.683.8 | 46.34.5 |
runtime [s] | 2.7e32.9e2 | 1.7e33.4e2 | 2.0e22.9e1 | 4.9e17.1 | 1.12e42.1e3 | 5.5e26.6e1 | 8.9e41.9e4 | 5.7e3 1.7e3 |
coverage threshold | 0.8 | 0.8 | 0.9 | 0.9 | 0.75 | 0.75 | 0.7 | 0.7 |
# visibility vertices | - | 500 | - | 500 | - | 1000 | - | 1500 |
min. clique size | - | 10 | - | 10 | - | 10 | - | 20 |
These computations correspond to a single iteration of the IRIS algorithm [10], and ensure that the largest uniformly-scaled, collision-free version of the ellipsoid is contained in the resulting polytope. Figure 3 illustrates how the initial metric is fundamental in guiding the shape of the regions generated by IRIS. Traditionally, the IRIS algorithm was initialized with an uninformed ellipsoidal metric and needed to run for multiple (expensive) iterations in order to expand and cover a larger volume of space; in VCC we require only a single IRIS iteration.
IV-E Convergence Check
The subroutine CheckCoverage estimates the fraction of covered by the regions in , and terminates our algorithm if this value exceeds the threshold . Computing this fraction exactly is impractical, and so we resort to randomized methods. The coverage is estimated by drawing a large number of samples in , and computing the ratio of samples that land in at least one of the regions in . More sophisticated checks, such as one-sided Bernoulli hypothesis testing, are possible.
IV-F Completeness
V Experiments
As there are no direct baseline methods, we compare our VCC algorithm against an extension of the method in [12, §III.D]. The natural extension of this approach is to iteratively grow polytopes around uniformly sampled points from the uncovered free space using IRIS, while treating previously computed regions as obstacles. This process is repeated until the desired coverage is met. We call this approach Iterative Obstacle Seeding (IOS).
In the following, all experiments are implemented in Drake [33], and all computations are performed on a single desktop computer with an Intel Core i9-10850K CPU and 32 Gb of RAM. We solve all MaxClique instances to global optimality using Gurobi [34].
We evaluate VCC and IOS on four environments: Village, 3DOF Flipper, 5DOF UR3, and 7DOF IIWA. The dimension of these environments ranges from to . For each environment, we run the two algorithms ten times and report their performance in Table I. The Village environment from [8] contains only convex obstacles and is compatible with the original IRIS [10]. All other examples involve the configuration spaces of robotic manipulators and therefore IRIS-NP [12] is employed. The number of samples used in the convergence check in Algorithm 1 is .
VCC meets the required coverage threshold with significantly fewer regions and in a substantially shorter amount of time. Notably, in the most challenging benchmark, 7DOF IIWA, VCC requires 10 times fewer regions and meets the required coverage of around 16 times faster. This substantial speedup can be attributed to two key factors. First, the region inflation in VCC is parallelized. Second, IRIS is the most computationally expensive step. While VCC only requires a single iteration of IRIS per region, IOS can requires around five IRIS iterations per region, due to the initialization with a potentially uninformative spherical metric.
VI Limitations of Approximating Convex Sets with Cliques
Despite the strong performance of our algorithm, the hardness of solving Min -ApproxConvexCover makes it possible to construct simple examples that highlight pitfalls of our heuristic approach. In this section, we discuss holes in which leads to one such pitfall that is particularly insightful.
While every convex set in naturally corresponds to a clique in the visibility graph, a clique in the visibility graph does not necessarily correspond to a convex set in . The convex hull of a clique can enclose holes. This problem persists even if we sample arbitrarily dense visibility graphs, and if we restrict the analysis to maximum cliques. A visual proof is shown in Figure 4, which illustrates a triangular configuration space with a triangular hole of size . As goes to zero, the largest convex subset of is the green trapezoid, whose area approaches of the total area of . On the other hand, a larger subset of mutually visible points is given by the union of the three red parallelograms, whose area approaches of the total area. Therefore, if configurations are sampled uniformly at random, an optimum solution of MaxClique will almost surely enclose a hole as the number of samples goes to infinity. A similar construction can be used to show an analogous discrepancy between the minimum convex cover of and MinCliqueCover.
In principle, this problem can be addressed by solving a modified version of MaxClique that better captures the notion of a convex set. In short, we require that every vertex of the visibility graph that is contained in the convex hull of the maximum clique must be a member of the clique. For an infinitely dense visibility graph, this ensures that the maximum clique cannot enclose holes.
We enforce the contrapositive of the latter condition through linear constraints that separate all non-clique members , with , from the points in the clique with a hyperplane , parameterized by the decision variables .
The resulting mixed-integer linear optimization extends (IV-B) by adding the additional separation constraints
(2a) | |||||
(2b) |
where is a large enough constant (e.g. a constant factor times the diameter of the visibility graph).
When the point is not in the clique () and the point is in the clique (), these constraints read and . Therefore, the hyperplane separates from . On the other hand, these constraints are seen to be redundant for all other possible values of the binaries and . In Figure 5, we demonstrate how this extension prevents a maximum clique from enclosing holes in a finite-sample regime.
In practice, solving (IV-B) with constraints (VI) is too expensive for the problems in Table I. Nonetheless, we observed that in the first MaxClique problem (IV-B) only an average of of the vertices were excluded from the clique that could not be separated from it with a hyperplane. Subsequent cliques, and improvements to the formulation (VI), demand a more nuanced discussion and are subject to future work.
VII Conclusions
We have proposed an algorithm for approximately decomposing complex configuration spaces into small collections of polytopes. Our algorithm uses clique covers of visibility graphs as an effective heuristic for obtaining local information about , and for seeding a region-inflation algorithm. The parallels between convex sets in and cliques in visibility graphs have also been discussed. Our experiments demonstrate that VCC reliably finds approximate convex covers of with fewer regions and in less time than previous approaches.
Acknowledgements
The authors would like to thank Steven M. LaValle, Thomas Cohn, Annan Zhang, and Fabian Dickhardt for the many fruitful discussions.
References
- [1] C. M. Bishop and N. M. Nasrabadi, Pattern recognition and machine learning. Springer, 2006, vol. 4, no. 4.
- [2] M. Pharr, C. Kolb, R. Gershbein, and P. Hanrahan, “Rendering complex scenes with memory-coherent ray tracing,” in Proceedings of the 24th annual conference on Computer graphics and interactive techniques, 1997, pp. 101–108.
- [3] E. G. Gilbert, D. W. Johnson, and S. S. Keerthi, “A fast procedure for computing the distance between complex objects in three-dimensional space,” IEEE Journal on Robotics and Automation, vol. 4, no. 2, pp. 193–203, 1988.
- [4] T. Marcucci, J. Umenberger, P. A. Parrilo, and R. Tedrake, “Shortest paths in graphs of convex sets,” arXiv preprint arXiv:2101.11565, 2021.
- [5] T. Marcucci, M. Petersen, D. von Wrangel, and R. Tedrake, “Motion planning around obstacles with convex optimization,” arXiv preprint arXiv:2205.04422, 2022.
- [6] T. Cohn, M. Petersen, M. Simchowitz, and R. Tedrake, “Non-euclidean motion planning with graphs of geodesically-convex sets,” arXiv preprint arXiv:2305.06341, 2023.
- [7] V. Kurtz and H. Lin, “Temporal logic motion planning with convex optimization via graphs of convex sets,” arXiv preprint arXiv:2301.07773, 2023.
- [8] T. Marcucci, P. Nobel, R. Tedrake, and S. Boyd, “Fast path planning through large collections of safe boxes,” arXiv preprint arXiv:2305.01072, 2023.
- [9] J.-C. Latombe, Robot motion planning. Springer Science & Business Media, 2012, vol. 124.
- [10] R. Deits and R. Tedrake, “Computing large convex regions of obstacle-free space through semidefinite programming,” in Algorithmic Foundations of Robotics XI. Springer, 2015, pp. 109–124.
- [11] A. Amice, H. Dai, P. Werner, A. Zhang, and R. Tedrake, “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, 2022, pp. 328–348.
- [12] M. Petersen and R. Tedrake, “Growing convex collision-free regions in configuration space using nonlinear programming,” arXiv preprint arXiv:2303.14737, 2023.
- [13] H. Dai, A. Amice, P. Werner, A. Zhang, and R. Tedrake, “Certified polyhedral decompositions of collision-free configuration space,” arXiv preprint arXiv:2302.12219, 2023.
- [14] T. Siméon, J.-P. Laumond, and C. Nissoux, “Visibility-based probabilistic roadmaps for motion planning,” Advanced Robotics, vol. 14, no. 6, pp. 477–493, 2000.
- [15] T. Lozano-Pérez and M. A. Wesley, “An algorithm for planning collision-free paths among polyhedral obstacles,” Communications of the ACM, vol. 22, no. 10, pp. 560–570, 1979.
- [16] M. Abrahamsen, “Covering polygons is even harder,” in 2021 IEEE 62nd Annual Symposium on Foundations of Computer Science (FOCS). IEEE, 2022, pp. 375–386.
- [17] S. J. Eidenbenz and P. Widmayer, “An approximation algorithm for minimum convex cover with logarithmic performance guarantee,” SIAM Journal on Computing, vol. 32, no. 3, 2003.
- [18] M. Abrahamsen, W. Bille Meyling, and A. Nusser, “Constructing concise convex covers via clique covers (cg challenge),” in 39th International Symposium on Computational Geometry (SoCG 2023). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2023.
- [19] G. D. da Fonseca, “Shadoks approach to convex covering,” arXiv preprint arXiv:2303.07696, 2023.
- [20] K. Mamou and F. Ghorbel, “A simple and efficient approach for 3d mesh approximate convex decomposition,” in 2009 16th IEEE international conference on image processing (ICIP). IEEE, 2009, pp. 3501–3504.
- [21] A. Varava, J. F. Carvalho, D. Kragic, and F. T. Pokorny, “Free space of rigid objects: Caging, path non-existence, and narrow passage detection,” The international journal of robotics research, vol. 40, no. 10-11, pp. 1049–1067, 2021.
- [22] L. E. Kavraki, “Computation of configuration-space obstacles using the fast fourier transform,” IEEE Transactions on Robotics and Automation, vol. 11, no. 3, pp. 408–413, 1995.
- [23] M. Branicky and W. Newman, “Rapid computation of configuration space obstacles,” in Proceedings., IEEE International Conference on Robotics and Automation, 1990, pp. 304–310 vol.1.
- [24] A. Sarmientoy, R. Murrieta-Cidz, and S. Hutchinsony, “A sample-based convex cover for rapidly finding an object in a 3-d environment,” in Proceedings of the 2005 IEEE International Conference on Robotics and Automation. IEEE, 2005, pp. 3486–3491.
- [25] R. M. Karp, Reducibility among combinatorial problems. Springer, 2010.
- [26] D. Strash and L. Thompson, “Effective data reduction for the vertex clique cover problem,” in 2022 Proceedings of the Symposium on Algorithm Engineering and Experiments (ALENEX). SIAM, 2022, pp. 41–53.
- [27] F. Schwarzer, M. Saha, and J.-C. Latombe, “Exact collision checking of robot paths,” Algorithmic foundations of robotics V, pp. 25–41, 2004.
- [28] S. M. LaValle, Planning algorithms. Cambridge university press, 2006.
- [29] A. Amice, P. Werner, and R. Tedrake, “Certifying bimanual rrt motion plans in a second,” arXiv preprint arXiv:2310.16603, 2023.
- [30] S. P. Boyd and L. Vandenberghe, Convex optimization. Cambridge university press, 2004.
- [31] J. J. Kuffner and S. M. LaValle, “RRT-connect: An efficient approach to single-query path planning,” in Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No. 00CH37065), vol. 2. IEEE, 2000, pp. 995–1001.
- [32] L. E. Kavraki, P. Svestka, J.-C. Latombe, and M. H. Overmars, “Probabilistic roadmaps for path planning in high-dimensional configuration spaces,” IEEE transactions on Robotics and Automation, vol. 12, no. 4, pp. 566–580, 1996.
- [33] R. Tedrake and the Drake Development Team, “Drake: Model-based design and verification for robotics,” 2019. [Online]. Available: https://drake.mit.edu
- [34] Gurobi Optimization, LLC, “Gurobi Optimizer Reference Manual,” 2023.