Abstract
Manifolds are used in almost all robotics applications even if they are not modeled explicitly. We propose a differential geometric approach for optimizing trajectories on a Riemannian manifold with obstacles. The optimization problem depends on a metric and collision function specific to a manifold. We then propose our safe corridor on manifolds (SCM) method of computationally optimizing trajectories for robotics applications via a constrained optimization problem. Our method does not need equality constraints, which eliminates the need to project back to a feasible manifold during optimization. We then demonstrate how this algorithm works on an example problem on
1. Introduction
Differential geometry for trajectory optimization in robotics is often used with the special orthogonal groups
Polynomials and rational splines are frequently used for optimization on Euclidean spaces
Trajectory optimization with obstacle avoidance is a well-studied problem on
CHOMP (Zucker et al., 2013) formulates a trajectory optimization problem on Hilbert spaces rather than Riemannian manifolds and uses variational calculus to compute gradients. Collision-free constraints are enforced by adding a term to their cost functional similar to barrier functions (Bemporad and Morari, 2000). A philosophical difference between that work and ours is that we focus on manifolds that are directly parameterizable, but require multiple parameterizations (
Perception aware planning (Costante et al., 2016) for vision-based navigation has been explored with a variety of approaches. Chen et al. (2011) summarizes a large variety of works from before 2010. Some relevant works from before and after then include Zhang et al. (2009), who used an extension of a probabilistic road map (PRM) that incorporates an information-theoretic model to improve observation of landmarks during path planning, and Preiss et al. (2017) who used an observation model to generate collision-free trajectories to maximize the convergence of a monocular visual–inertial estimator. Maintaining a level of features in view through a re-planning framework was done by (Sadat et al., 2014).
The main contributions of this work are:
a manifold trajectory optimization algorithm (for example see Figure 1), that optimizes without projecting to the manifold from a higher-dimensional embedding, is parameterization invariant, and is formulated without equality constraints;
a method for free space constraints via convex sub-approximation on coordinate charts;
an application of this method for navigation with constrained-field-of-view visual estimation;
an application of this method for trajectory generation on
an application of this method for trajectory generation on

Example two-dimensional manifold embedded in
This article is organized with a background section then four main sections. We describe the manifold optimization and safe corridor algorithm, then we describe how to use our method on the example of
This article is an extended version of Watterson et al. (2018). We have extended the description of our optimization formulation and variable marginalization method. In addition, we have applied this work to
2. Mathematical Background
We briefly review a few important definitions and properties of Riemannian manifolds that are critical to this article. For a more detailed explanation of these concepts, please refer to Gallier and Quaintance (2017).

A chart centered at p, which is homeomorphic over a domain of a ball of radius
with
If we want to have our metric make physical sense for a dynamical system, we can choose an appropriate
In coordinates
Solving this system of differential equations gives a parallel vector at each point along the path. This transport of the vector is, in general, not independent of the path between two points on the manifold.
3. Regional Inflation by Line Search
The Regional Inflation by Line Search (RILS) algorithm (Liu et al., 2017) computes collision-free polygons around collision-free line segments (Figure 3). The line segment is used to define the major axis of an ellipsoid that is inflated until it is tangent to enough obstacles that it cannot grow while staying collision free. At all points of tangency of the ellipsoid, we can find half-planes that are tangent to the ellipsoid. If all obstacles outside those half-planes are removed, we can continue inflating the ellipse while it is collision free. This process repeats until we have a set of half-planes that define a collision-free polygon in the environment.

RILS computes convex collision-free polygons by inflating an ellipsoid around a series line segments and using it to find half-planes that define the polygons. If obstacles outside a half-plane of tangency are removed, the ellipsoid can continue to grow.
4. Trajectory generation on manifolds
4.1. Algorithm design and problem scope
We formulate the free space constraints on a chart and not intrinsically for several reasons: (1) a convex region on a chart may describe a larger region than a convex set on a manifold and (2) is easier to transform into a numerical optimization problem. For example, a region of
With a differential-geometry-based formulation, we would like several properties: (1) to be independent of coordinates, (2) to be calculable, and (3) to be physically meaningful. Although (3) might seem difficult to do without a specific manifold, our formulation actually allows for it. We use a class of functionals from Zefran et al. (1996) that depend on a metric for the manifold. As in Belta and Kumar (2002), these can be used to describe physical dynamics, for example when the manifold is
Along with the background in the previous section, our formulation also assumes we have a function
where
The cost functional is coordinate free and a extension of the cost functionals used in Watterson et al. (2016) and Belta and Kumar (2002) generalized to arbitrary derivatives. Alternatively it can be seen as a generalization to arbitrary manifolds of the cost functional used in Richter et al. (2013), Liu et al. (2017), Mellinger and Kumar (2011), and Deits and Tedrake (2015).
4.2. Algorithm overview
We propose a new safe corridor on manifolds (SCM) algorithm that can be interpreted as a generalization of the safe flight corridor in Liu et al. (2017). The basic idea is as follows: (1) generate a collision-free “optimal” discrete kinematic path from a graph search on the manifold; then (2) form a locally convex corridor around this path in a local parametrization of the manifold around this path, and (3) optimize a trajectory using the set of local parameters around which the convex corridor is described. This basic picture is shown in Figure 4 with a manifold and three regions of the corridor of the corridor with their associated coordinate charts.

Constraining equality of spline knot points. With convex polyhedral constraint regions on each chart. Yellow points are equated between adjacent charts. Green points represent
Instead of optimizing over a full constraint manifold, we optimize a continuous trajectory over a piecewise convex region of the parameter space representation of a manifold. For a convex cost functional, this approximates a non-convex optimization problem with a convex one and thus can be solved quickly and efficiently with global convergence during the optimization phase. We note that the optimization step will return the optimum among all feasible trajectories that both (1) can be expressed using our trajectory parameterization and (2) satisfy the corridor constraints of the path returned by graph search.
In comparison with existing work, this method is substantially different. Unlike rapidly exploring random trees (RRT)-based methods, ours is designed to be resolution complete, which will find a feasible solution in finite time. With this difference, a set of problems can be designed to make our method converge arbitrarily faster than as shown in Watterson and Kumar (2015). As explained in the introduction, we are solving a different problem than that solved by Zucker et al. (2013), which required an embedding of a manifold to be used directly and does not account for use of multiple charts. Other work on perception-aware planing is not presented as general to smooth manifolds like our work is.
4.3. Path finding on manifolds
Collision-free path finding is a much easier problem than finding collision-free dynamically feasible trajectories (position + higher-order constraints) especially because finding a dynamically feasible trajectory in a n-dimensional configuration space for a dth-order system requires search on
Instead, we can construct a graph on a manifold with a series of points on the manifold connected with edges that are geodesics. With such a graph, we assume the edges are non-overlapping, thus we can precompute this graph on an arbitrary manifold with a grid or uniform sampled points by connecting all pairs of points with geodesic edges and then whenever two geodesics intersect, we remove the shorter of the two. As long as the points are uniformly spaced on the manifold, searching over this graph will cover the entire manifold up to a small discretization error. This is the same notion as searching over a discrete grid on
4.4. SCM
For any path
4.5. Optimization on manifolds
To numerically solve the optimization problem in Equation (8), we need to convert an infinite-dimensional functional optimization to a finite-dimensional one. In the literature, this is done by either using splines (Deits and Tedrake, 2015; Flores, 2007; Liu et al., 2017; Mellinger and Kumar, 2011; Richter et al., 2013; Watterson et al., 2016) or using a discrete time optimization (Bemporad and Morari, 2000). It is well known that splines can approximate arbitrary continuous functions within a given
Computing the integral in Equation (8) cannot be done in closed form for a general manifold. We can compute an approximation of the integral using Gaussian quadrature to approximate it as a sum of the functional evaluated at some
We choose to represent the trajectory as a polynomial spline in the parameter space of the charts
The reason we keep the polynomials evaluated in the interval
With each polynomial being on a different chart, we need to explicitly constrain the knot points to be continuous up to a certain derivative. The endpoint constrained basis is a good choice because the derivatives at the knot points are exactly the optimization variables. Using the map
To confine continuous trajectories inside each polyhedron, we use the property that the convex hull of the control points of a Bézier curve is a conservative bound on the convex hull of the curve. As any two polynomial bases are interchangeable via a linear change of coordinates, this bound can be enforced with linear inequality constraints (Preiss et al., 2017; Watterson et al., 2016).
Thus, the full optimization is the non-linear program:
In general, this problem is non-convex in (
4.6. Optimization method
We can solve the optimization problem in Equation (11), with a constrained search method. We implemented the primal–dual Newton’s method with the centering heuristic as detailed in Bemporad and Morari (2000). Changing the variable initialization did not seem to affect convergence, so all values were set to 1. The full optimization in Liu et al. (2017) is usually not convex. In practice, it is straightforward to find approximately optimal
We can model polynomials of both
where I and
The cost functional and inequality constraints are, in general, non-linear functions of these polynomials. In our vision-based example, the cost will be a rational function of these polynomials.
We assume we can calculate the gradients and Hessians of functions of polynomials using the chain rule.
For optimization problems, we make the fundamental assumption that the bottleneck of the optimization process is inverting a matrix of hundreds to thousands of variables to compute a search direction. Based on the structure of our formulation, this a fairly sparse matrix because each segment’s variables are independent from each other except for the dependency introduced by the continuity constraints. For example, variables relating the first segment and third segment will have no cross terms in the matrix formed in the Bemporad and Morari (2000) method. Thus, the number of non-zero elements in this matrix is
When we reduce the number of variables using a manifold based approach, this sparsity property remains the same. In addition, with there being fewer variables we eliminate the need to perform the projection step, which, in general, needs to be done iteratively (Janson and Pavone, 2013).
4.7. Nested gradients and Hessians
We can further improve the computational efficiency of our trajectory generation implementation through usage of the formulas of (Faà di Bruno, 1855), which are the multivariate versions of the chain rule:
This reduces the number of terms needing to be calculated when evaluating the gradients and Hessians needed by the optimization algorithm. We leverage dynamic programming to evaluate all terms (Kleinberg and Tardos, 2006). This is illustrated in Figure 5 where we have drawn function composition as arrows.

Marginalization scheme used to eliminate non-linear equality constraints in our optimization. Using a graph representation, we can calculate all gradients and Hessians of Equation (11) recursively using Equations (13) and (14).
From an initial set of variables drawn in orange corresponding to three segments, we find the subset that are defined by the initial and final conditions, as well as the subset that can be defined by chart transition functions, and remove those variables from the optimization. The remaining set of optimization variables is shown in blue. We can then construct an array of new variables in green, which correspond to the original set in orange, but are described as functions of the set of remaining blue variables. Finally, we can use these nested variables in our cost and inequality constraints directly.
In this section, we have proposed a trajectory optimization method for Euclidean manifolds that is computed without equality constraints, that ensures the optimization never needs to project back to the manifold. Using a collision map on the manifold, we show how we can add collision constraints with convex sub-approximation on a series of coordinate charts found by our algorithm.
5. Field-of-view-constrained trajectory optimization details
With the algorithm developed in the previous section, we now look at an example planning problem that arises when trying to control a quadrotor with a visual–inertial navigation system (VINS) in an environment lacking texture in some areas.
1
We would like to keep areas conducive to estimation inside the robot’s field of view, while quickly navigating through a cluttered environment. We apply our arbitrary manifold optimization to
5.1. Vision model
The standard projection equation of a point
We use this equation to model whether a known feature in world coordinates is in the field of view of the camera. We also assume that a feature is only useful for the navigation system if it is closer than a max depth in the camera frame.
The optical flow is a function of a point in pixel coordinates:
The front-end of visual odometry has decreased accuracy and increased computational load with increasing optical flow. With Equation (16) and assuming known ranges on the depth of features and pixel coordinates, we can conservatively upper bound the optical flow with a linear function of the camera’s linear and angular velocities. Thus, we choose
5.2. Field-of-view formulation
For vision-based navigation, we would like a cost function that produces a trajectory that is good for the estimator. Paramount to a VINS estimator is maintaining track of all optical features. This tracking can be lost two ways: (1) by lack of features, and (2) by an excessive rate of optical flow. We ensure (1) by keeping a minimum number of visible features in the direction of camera z with a region constraint on
5.3. Stereographic coordinates For
In this section, we look to find a chart function generator
These equations can be derived from geometric interpretation of stereographic coordinates in Figure 6 or in Milnor (1978). The inverse

Geometric interpretation of a set of stereographic coordinates for a chart centered at the point
The maps
5.3.1. Christoffel symbols on
To be able to calculate the Christoffel symbols, we use the standard
With x being the point in coordinates. The metric is independent of the
We can use Equation (6) to calculate symbols for the metric induced by
We note that these symbols are independent of the value of R. This can be proved by considering the rotational symmetry of the sphere or algebraically. We can see that these symbols are torsion free
5.4. Search on
Generating a uniform regular grid on a sphere in Figure 7, can only be done when the nodes are one of the five platonic solids (Yershova et al., 2010). To approximate a grid on the sphere with more nodes, we use the well-known geodesic polyhedron construction. We start with an icosahedron and sub-divide each triangular face into

Example graph of nodes (red circles) and associated edges (geodesic segments) on
With a graph on the sphere, we can use
5.5. Circles to circles
In this section, we leverage a property of stereographic coordinates to improve the computational efficiency of our collision checks. It is known that a circle on

A circle on a sphere
We first need to find the transform between center of the circle in the parameter space and center of the circle on the sphere, expressed in the parameter space. These two quantities are actually different except at the identity element.
Exploiting the symmetry when expressing points on a sphere, we look at the point p expressed in polar coordinates
We can also specify the center of this circle in the parameter space in polar coordinates as
5.6. Experimental results
We have implemented the version of our algorithm on
The trajectory generation done was performed off-line on an Intel i7 3.4 GHz processor with a single-threaded implementation. The computation time is bottlenecked by the graph search and corridor generation, but in total was less than 30 s for multiple sets of start and end locations. Searching over a five-dimensional space with
We used a monocular version of the multi-state constraint Kalman filter (MSCKF) (Mourikis and Roumeliotis, 2007) as a benchmark for the visual–1inertial odometry. We set up an environment with feature-poor obstacles as shown in Extension 1. We compare this trajectory generation method with that of Liu et al. (2017), which does not take into account that the obstacles have no features on them. This is in contrast to our method, which we set to require at least 10 features in the field of view at all times. The performance over several environments is shown in Figure 9, where the distribution of our errors is to the left of that planning without the vision based constraints.

Estimator performance summarized from 45 trials.
When planning in the environment in Extension 1 and Figure 11, our algorithm found a corridor consisting of five polyhedrons that are each five dimensional. These are hard to visualize, but we have split them into their projections on the

Corridor sections for

Top down view of the environment used in the
6. Trajectory generation on
Now, we show how the same trajectory generation algorithm on manifolds can be applied to generate trajectories on
To generate charts after a path is found on
The chart transition function can be found by equating the coordinates from the two adjacent charts and rearranging:
where ∨ is the inverse of the
In Figure 12, we show the results of this algorithm on a simple example of reorienting an object. Plotting obstacles in orientation space would clutter the view, but we can see the effect of how the trajectory needs to change to get around a blockage placed in the middle of what would otherwise be the optimal path. The constraint this puts on R is where the body

Trajectories generated on
This problem could arise in numerous applications such as reorienting a camera outside while avoiding pointing it directly at the Sun, or avoiding a singular gimbal orientation.
In the obstacle-free version, our method performs slower than the methods of Park and Ravani (1995) or Belta and Kumar (2002), because they provide a closed-form solution, but results in the same trajectory in the case of no obstacles and zero boundary velocities and accelerations. These methods, however, cannot be used in the case with obstacles.
7. Trajectory generation for quadrotor formations
We demonstrate that the manifold-based trajectory generation method can be used to generate trajectories with obstacles on
The testbed platform we use is a swarm of CrazyFlie robots. Their small size is ideal for running experiments safely and their popularity provides lots of support for their control. With recent hardware advances, they can now fly fully autonomously without a Vicon system using small on-board sensors, but we use the Vicon system for easier system integration.
7.1. Search on
with obstacles
The first step of the manifold trajectory generation algorithm in the non-Lie groups section is to find a feasible collision-free kinematic path through the manifold before optimizing a trajectory. Search on
We can formulate the collision avoidance constraints as a conjugation of the collision avoidance constraints of each robot individually with the obstacles. Like before, we inflate each obstacle in

Formation coordinate system.
We also need to consider the downwash constraints of the robots as well because flying on top of each other will cause the control to be unstable (Figure 14). The simplest way to calculate a model to use is to assume a cylindrical shape for the downwash. Two robots will not interfere with each other if their vertical distance is more than

Robots will not be in collision if they are far enough away from each other vertically and horizontally.
The collision function for downwash only depends on the orientation of the formation and not the position (d) :
with the total collision function C being
With this collision function and graph, we can use the rest of the manifold trajectory generation technique without modification to create a local map for each chart, inflate a polyhedron, and optimize a trajectory within. We use the metric proposed by Zefran et al. (1999) to calculate our cost functional. The last step is to scale the total time of the trajectory to the individual dynamic limits of the individual robots. This can be done by calculating a maximum velocity, acceleration, and jerk of each robot in the formation and then scaling the total time to make it dynamically feasible as done in Liu et al. (2017).
7.2. Experimental validation
We set up three representative example environments for our swarm to navigate that demonstrate the capabilities of
The first environment we test in is shown in Figure 15: the robots are in a plus formation, where each robot is 0.5 m away from the center of the formation in each axis direction. In this formation, the top and bottom quadrotors are outside the downwash region vertically when the formation is at the identity rotation. The environment is composed of a series of poles, which we model as rectangular prisms for collision avoidance. In the obstacle map, the cylinders are extended higher than in the constructed environment, so a solution where the robots fly over the poles is not found. In the visualization, the formation center is plotted as a magenta curve, with the orientation plotted as red, blue, and green lines corresponding to the x, y, and z, formation frame axes, respectively. The individual robot’s locations are plotted as magenta spheres. The obstacles are all plotted as crimson boxes in the visualization.

Trajectory generated in first environment with pole obstacles. Red–blue–green axis is the formation state on
In the first environment, the planned trajectory has the robots going around different sides of the same obstacle as shown in Figures 15 and 16. This is an example of our method producing a trajectory that cannot be planned by planning for only the center of the formation and using a conservative convex collision model.

Robots flying trajectory in the first environment.
The second environment, shown in Figures 17 and 18, uses the same formation as in the first environment, but now with rectangular obstacles that the formation needs to avoid. Here, the generated trajectory rotates a little bit to allow the robots on one side of the formation to be a bit closer to the obstacle than would be possible by planning a trajectory that just optimizes the translation of the formation center.

Trajectory generated for formation in second environment with wall obstacles.

Robots flying trajectory in the second environment.
In the final environment, we plan for a line formation of robots that are distributed evenly 0.5 m apart from each other. Here we demonstrate planning from different initial and final orientations of the formation. As our method generates a trajectory within a local region, the trajectory is in a class of solutions where the bottom right quadrotor must clear the obstacle before the formation has enough space to rotate to the final orientation. As a result, there is a change in the speed of the rotation after the bottom right quadrotor clears the obstacle. We show two different views of this trajectory in Figures 19 and 20 and a freeze-frame from the video in Extension 1 in Figure 21.

Trajectory generated for line formation in the third environment with wall obstacles.

Alternate view of the third environment trajectory.

Robots flying trajectory in the third environment.
In the first and last environment, we ran six trials of the trajectory to analyze the control performance of the robots. In Figures 22 and 23, we plot the

Plot of desired and actual position of each robots during trials of the first environment trajectory. Each row is an individual robot and each column in the

Plot of desired and actual position of each robots during trials of the third environment trajectory.
8. Limitations of approach
There are situations where our approach is not ideal. For systems where the state, cost, and constraints all live on
Searching then optimizing restricts our solution to one homotopy class. This can produce sub-optimal results in environments where there are narrow paths that place restrictions on dynamics. For example, a robot will choose to take a narrow shortcut over a safer wider path unless the search heuristic takes path clearance as part of its cost metric. In general, this method is beneficial where there is sufficient room around the kinematically feasible shortest path for a dynamically feasible trajectory to be generated. In situations where the kinematic planning problem is hard, the trajectory generation will have similar performance to following a kinematic path at slow speed.
When computing trajectories, the main advantage of our algorithm is that we transform an unbounded dynamic search to a lower-dimensional kinematic path search, then optimize a trajectory in a local region around that path. The runtime of our entire algorithm is currently bottlenecked by the kinematic search for the representative environments we tested on. This trades off global optimality for an algorithm that runs in polynomial time. For our work, we used a distance-based heuristic to guide the finding of local regions, a possible research extension is to look at how other choices of heuristic affect performance. For example, incorporating other information into the search or optimizing over multiple paths could produce better results in certain environments. When doing tasks such as navigating an office building, forcing the corridor to be in the middle of doorways would be more robust to disturbances than always staying some collision radius away.
When extending to other manifolds and arbitrary environments, it is key to be aware of pitfalls in performance when choosing a manifold parameterization. For common smooth manifolds such as
9. Conclusion
We have proposed a trajectory optimization method for Riemannian manifolds that is computed without equality constraints, and ensures the optimization never needs to project back to the manifold. Using a collision map on the manifold, we show how we can add collision constraints with convex sub-approximation on a series of coordinate charts found by our algorithm. We have then applied this method to
Footnotes
Appendix. Index to multimedia extensions
Archives of IJRR multimedia extensions published prior to 2014 can be found at http://www.ijrr.org, after 2014 all videos are available on the IJRR YouTube channel at http://www.youtube.com/user/ijrrmultimedia
a brief overview of our algorithm, visualization of trajectories on SO(3),experiments for the
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: We thank the support of DARPA grants HR001151626/HR0011516850, ARO grant W911NF-08-2-0004, NSF grant IIS-1426840, and ONR grant N00014-07-1-0829. This work was also supported by a NASA Space Technology Research Fellowship.
