Next Article in Journal
The Way to Modern Shutter Speed Measurement Methods: A Historical Overview
Next Article in Special Issue
Chemical Spill Encircling Using a Quadrotor and Autonomous Surface Vehicles: A Distributed Cooperative Approach
Previous Article in Journal
Impact of Image Enhancement Module for Analysis of Mammogram Images for Diagnostics of Breast Cancer
Previous Article in Special Issue
A Distributed Algorithm for Real-Time Multi-Drone Collision-Free Trajectory Replanning
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Bernstein Polynomial-Based Method for Solving Optimal Trajectory Generation Problems

1
Cooperative Autonomous Systems (CAS) Lab, Department of Mechanical Engineering, University of Iowa, Iowa City, IA 52242, USA
2
Laboratory of Robotics and Engineering Systems (LARSyS), ISR/IST, University of Lisbon, 1049-001 Lisbon, Portugal
3
Department of Mechanical and Aerospace Engineering, Naval Postgraduate School, Monterey, CA 93943, USA
4
Department of Electrical Engineering, University of Texas at San Antonio, San Antonio, TX 78249, USA
*
Author to whom correspondence should be addressed.
Sensors 2022, 22(5), 1869; https://doi.org/10.3390/s22051869
Submission received: 6 December 2021 / Revised: 24 January 2022 / Accepted: 2 February 2022 / Published: 27 February 2022

Abstract

:
This paper presents a method for the generation of trajectories for autonomous system operations. The proposed method is based on the use of Bernstein polynomial approximations to transcribe infinite dimensional optimization problems into nonlinear programming problems. These, in turn, can be solved using off-the-shelf optimization solvers. The main motivation for this approach is that Bernstein polynomials possess favorable geometric properties and yield computationally efficient algorithms that enable a trajectory planner to efficiently evaluate and enforce constraints along the vehicles’ trajectories, including maximum speed and angular rates as well as minimum distance between trajectories and between the vehicles and obstacles. By virtue of these properties and algorithms, feasibility and safety constraints typically imposed on autonomous vehicle operations can be enforced and guaranteed independently of the order of the polynomials. To support the use of the proposed method we introduce BeBOT (Bernstein/Bézier Optimal Trajectories), an open-source toolbox that implements the operations and algorithms for Bernstein polynomials. We show that BeBOT can be used to efficiently generate feasible and collision-free trajectories for single and multiple vehicles, and can be deployed for real-time safety critical applications in complex environments.

1. Introduction

The field of autonomous guidance has exploded in the past decade. Significant progress has been made in self driving vehicles, bringing them one step closer to reality [1]. Precision agriculture utilizes autonomous aerial vehicles to monitor crops and spray pesticides [2], and the development in autonomous weed pulling robots may reduce or eliminate the need for potentially harmful pesticides [3]. Underactuated marine surface vehicles can be controlled using a flatness-based approach [4]. Companies such as Amazon, Starship, and Zipline have already begun making autonomous deliveries [5,6,7]. In fact the first autonomous aerial vehicle has already been flown on a different planet [8]. This progress has led to high demand for computationally efficient algorithms that may yield safe and optimal trajectories to be planned for groups of autonomous vehicles. Our proposed method aims to accomplish these tasks by formulating the optimal trajectory generation problem as a nonlinear programming problem and exploiting the useful features of Bernstein polynomials.
Most techniques for planning and control of autonomous systems fall into one of two categories: closed-loop methods or open-loop methods. Closed-loop methods, sometimes referred to as feedback or reactive methods, use the current state knowledge to determine, in real time, what the next control input should be. On the other hand, open-loop methods determine control values or compute motion trajectories out to a specified time horizon with the use of the system’s model.
One common closed-loop technique that originally stemmed from maze solving algorithms is the bug algorithm. The bug algorithm, e.g., [9,10], uses local knowledge of the environment and a global goal to either follow a wall or move in a straight line towards the goal. This algorithm can be implemented on very simple devices due to typically requiring only two tactile sensors. However, it does not account for a vehicle’s dynamics and constraints. Moreover, bug algorithms are non-optimal methods and cannot be used for the execution of complex missions that require the optimization of some cost. For a review and comparison of bug algorithms, the reader is referred to [11].
Rather than working on an agent’s positions, the velocity obstacle (VO) algorithm uses relative velocities between the agent and obstacles to determine trajectories which will avoid collisions. The original term velocity obstacle was presented in [12]. Variations on the VO method include Common Velocity Obstacle [13], Nonlinear Velocity Obstacles [14], and Generalized Velocity Obstacles [15]. Other relevant closed-loop methods use artificial potential fields, which leverage a potential function providing attractive forces towards the goal and repulsive forces away from obstacles [16,17,18].
Among the advantages of closed-loop methods are fast computation and the ability to react to changing environments and unforeseen events. Furthermore, theoretical tools aimed at deriving safety guarantees of closed-loop methods are fairly well developed, and are mostly rooted in nonlinear systems analysis and robust and adaptive control. Despite these benefits, closed-loop methods are difficult to employ for multiple vehicle teams. They also generally lack the capability of presenting a human operator with a predicted trajectory and act rather like a black box, which can result in a lack of trust between the operator and the autonomous system.
In contrast to closed-loop methods, open-loop methods can generate solutions in one-shot for the whole mission time, and are therefore able to present an operator with an intuitive representation of the future trajectory. This representation is typically shown as a 2D or 3D path and may also include speed, acceleration, and higher derivatives of the vehicle’s motion. Randomized algorithms such as probabilistic roadmaps (PRMs) [19] and rapidly exploring random trees (RRT, RRT*) [20,21] randomly sample the work space to reduce computational complexity. PRMs randomly sample feasible regions within the work space to construct a dense graph. A graph-based solver can then be used to determine the optimal route. RRTs compute trajectories by using directed sampling to build trees. This approach can find feasible solutions in situations involving both a high number of constraints and high dimensional search spaces. Unfortunately, random sampling algorithms may be difficult to use in real-time applications due to computational complexity and may end up exploring regions that will not lead to a solution.
Similar to PRMs, other graph-based approaches aim to efficiently build and then search a graph. Cell decomposition methods, e.g., [22,23], build a graph of their environment by recursively increasing the resolution of areas of interest resulting in a few large nodes of open space and many small nodes near obstacles. Once a graph has been built, a graph solver can be used. A popular graph solver is the A* algorithm [24], which is an extension of Dijkstra’s algorithm that uses a heuristic function to improve the search speed. Many modifications to the A* algorithm also exist, such as Lifelong Planning A* [25], which replans a path anytime an obstacle appears on the existing path and utilizes Dijkstra’s algorithm to transition the robot from its current pose to the new path. Similarly, Anytime Dynamic A* (ADA*) [26] iteratively decreases a suboptimality bound to improve the plan’s optimality within a specified maximum computation time limit. Iterative approaches such as ADA*, sometimes called “anytime” methods, compute a coarse solution and then refine it until a computation timeout is reached. For example, Ref. [27] investigates the addition of committed trajectories and branch-and-bound tree adaptation to the RRT* algorithm to produce an online anytime method.
In addition to graph-based representations of trajectories, polynomial approximation methods can be used as well. In [28], trajectories are represented as piecewise polynomial functions and are generated in a manner that minimizes their snap. In TrajOpt [29], a sequential quadratic program is solved to generate optimal polynomial trajectories while performing continuous time collision checking.
Other open-loop methods include CHOMP [30,31], STOMP [32], and HOOP [33]. In CHOMP, infeasible trajectories are pulled out of collisions while simultaneously smoothing the trajectories using covariant gradient descent. STOMP adopts a similar cost function to that found in CHOMP, but generalizes to cost functions whose gradients are not available. This is done by stochastically sampling noisy trajectories. HOOP utilizes a problem formulation which computes vehicle trajectories in two steps. In the first step, a path is planned quickly by considering only the vehicle’s kinematics. The second step then refines this trajectory into a higher order piecewise polynomial using a quadratic program. Other methods, such as WASPAS-mGqNS [34], balance the optimality of motion plans with respect to the mission objectives against exploring unknown environments.
Open-loop methods provide useful tools for dealing with high dimensional problems such as multiple vehicles and several constraints. They are also capable of producing trajectories that accomplish multiple goals. However, due to the curse of dimensionality, the computational complexity of open-loop methods grows significantly with the number of vehicles, constraints, and goals. For the most part, motion planning methods trade optimality and/or safety for computational speed. Our goal is to introduce a method that mitigates this trade-off, and that provides provably safe solutions for high dimensional problems while retaining the computational efficiency of low-order trajectory planning algorithms. This is achieved by exploiting the useful features of Bernstein polynomials.
The Bernstein basis was originally introduced by Sergei Natanovich Bernstein (1880–1968) in order to provide a constructive proof of Weierstrass’s theorem. Bernstein polynomials were not widely used until the advent of digital computers due to their slow convergence as function approximants. Widespread adoption eventually occurred when it was realized that the coefficients of Bernstein polynomials could be intuitively manipulated to change the shape of curves described by these polynomials. In the 1960s, two French automotive engineers became interested in using this idea: Paul de Faget de Casteljau and Pierre Étienne Bézier.
Designing complex shapes for automobile bodies by sculpting clay models proved to be a time consuming and expensive process. To combat this, de Casteljau and Bézier sought to develop mathematical tools that would allow designers to intuitively construct and manipulate complex shapes. Due to de Casteljau publishing most of his research internally at his place of employment, Bézier’s name became more widely associated with Bernstein polynomials, frequently referred to as Bézier curves. Building on existing research and modern technology, Bernstein polynomials provide several useful properties for many fields.
The Bernstein basis provides numerical stability [35], as well as useful geometric properties and computationally efficient algorithms that can be used to derive and implement efficient algorithms for the computation of trajectory bounds, trajectory extrema, minimum temporal and spatial separation between two trajectories and between trajectories and obstacles, and collision detection. Bernstein polynomials also allow for the representation of continuous time trajectories using low-order approximations.
Our method for trajectory generation builds upon [36,37,38], where Bernstein polynomials were introduced as a tool to approximate the solutions of nonlinear optimal control problems with provable convergence guarantees. While the results concerning the convergence of the Bernstein approximation method are out of the scope of the present paper, here we focus on the design of algorithms and functions for Bernstein polynomials. These include evaluating bounds, minimum spatial distance, collision detection, and penetration distance. Additionally, we show how these properties can be used for trajectory generation in realistic mission scenarios such as trajectory generation for swarms, navigating cluttered environments, and motion planning for vehicles operating in a Traveling Salesman mission. For the interested reader, an open-source implementation is provided. This paper extends the results initially presented in [39]. In particular, in [39] we focused on autonomous vehicle trajectories representation by Bernstein polynomials, and proposed a preliminary implementation of BeBOT for minimum distance computation and collision detection for safe autonomous operation. In the present paper, we extend previous work by exploiting properties and proposing algorithms for both Bernstein polynomials and rational Bernstein polynomials. BeBOT includes an open-source Python implementation of these algorithms, which enables the user to exploit the properties of (rational) Bernstein polynomials for trajectory generation. Furthermore, we address several applications for multiple autonomous systems and show the efficacy of BeBOT in enabling safe autonomous operations. We added a new algorithm, the penetration algorithm, and several additional examples including air traffic control, navigation of a cluttered environment, vehicle overtaking, 1000 vehicle swarming, a marine vehicle example, and two examples of a vehicle routing problem. An implementation of the examples presented in this paper is available at our GitHub website [40] and can be customized to facilitate the toolbox’s usability.
The goal of this manuscript is to provide a general framework which can be applied to a plethora of different systems ranging from mobile robots to manipulators. However, we do provide several numerical examples for mobile robots and include the governing motion equations for ease of implementation, e.g., see examples in Section 5.1 and Section 5.6.
In brief, the main contributions of this article are:
  • Novel algorithms which exploit the useful properties of (rational) Bernstein polynomials for use in trajectory generation.
  • Several examples implementing the aforementioned algorithms in realistic mission scenarios.
The paper is structured as follows. In Section 2 we introduce Bernstein polynomials and their properties. Section 3 introduces the use of Bernstein polynomials to parameterize 2D and 3D trajectories. In Section 4 we present computationally efficient algorithms for the computation of state and input constraints typical of trajectory generation applications. In Section 5 we demonstrate the efficacy of these algorithms through several numerical examples. The paper ends with Section 6, which draws some conclusions. A Python implementation of the properties and algorithms presented, as well as the scripts used to generate the plots and examples found throughout this paper, can be found on our GitHub webpage [40].
In what follows, vectors are denoted by bold letters, e.g., p = [ p x , p y ] and | | · | | denotes the Euclidean norm (or magnitude), e.g., | | p | | = p x 2 + p y 2 .

2. Mathematical Preliminaries

The motion planning problems addressed in this work can be in general formulated as optimal control problems. Letting the states and control inputs of the vehicles be denoted by x ( t ) and u ( t ) , respectively, the optimal motion planning problem can formally be stated as follows:
min x ( t ) , u ( t ) I ( x ( t ) , u ( t ) ) = E ( x ( 0 ) , x ( t f ) ) + 0 t f F ( x ( t ) , u ( t ) ) d t
subject to
x ˙ ( t ) = f ( x ( t ) , u ( t ) ) , t [ 0 , t f ] ,
e ( x ( 0 ) , x ( t f ) ) = 0 ,
h ( x ( t ) , u ( t ) ) 0 , t [ 0 , t f ] ,
where I : R n x × R n u R , E : R n x × R n x R , F : R n x × R n u R , f : R n x × R n u R n x , e : R n x × R n x R n e , and h : R n x × R n u R n h .
Here, I defined in Equation (1) is a Bolza-type cost functional, with end point cost E and running cost F. The constraint in Equation (2) enforces the dynamics of the vehicles considered, Equation (3) enforces the boundary conditions, e.g., initial and final position, speed, heading angles of the vehicles, and Equation (4) describes feasibility and mission specific constraints, e.g., minimum and maximum speed, acceleration, collision avoidance constraints, etc.
In previous work [36,37,38] we presented a discretization method to approximate state and input by nth order Bernstein polynomials. This approximation allows us to transcribe the optimal control problem into a non-linear programming problem, which can then be solved by off-the-shelf optimization solvers. In particular, we show that the solution to the non-linear programming problem converges to the solution of the original optimal control problem as n increases. The present paper focuses on the geometric properties of Bernstein polynomials and their implementation for computationally efficient and safe trajectory generation. In the following, we report the properties of Bernstein polynomials and rational Bernstein polynomials which are relevant to this paper.
An nth order Bernstein polynomial defined over an arbitrary interval [ t 0 , t f ] is given by
C n ( t ) = i = 0 n P i , n B i , n t , t [ t 0 , t f ] ,
where P i , n R D is the ith Bernstein coefficient, D is the number of dimensions, and B i , n ( t ) is the Bernstein polynomial basis defined as
B i , n ( t ) = n i ( t t 0 ) i ( t f t ) n i ( t f t 0 ) n , n i = n ! i ! ( n i ) ! ,
for all i = 0 , , n . Typically the dimensionality of a Bernstein polynomial, D, is either 2 or 3 for 2D or 3D spatial curves, respectively. In this case, Bernstein polynomials are often referred to as Bézier curves and their Bernstein coefficients are known as control points. While Bézier’s original work did not explicitly use the Bernstein basis [41,42], it was later shown that the original formulation is equivalent to the Bernstein form polynomial [43].
An nth order rational Bernstein polynomial, R n ( t ) , is defined as
R n ( t ) = i = 0 n P i , n w i , n B i , n t i = 0 n w i , n B i , n t , t [ t 0 , t f ] ,
where w i , n R , i = 0 , , n , are referred to as weights. A list of relevant properties of Bernstein polynomials used throughout this article can be found in Appendix A.

3. Generation of 2D and 3D Trajectories Using (Rational) Bernstein Polynomials

3.1. 2D Trajectories

Here we will examine several illustrative examples of the properties of Bernstein polynomials and rational Bernstein polynomials in 2D. All the plots presented can be generated using the example code available at [40].
Figure 1, Figure 2, Figure 3, Figure 4, Figure 5, Figure 6, Figure 7, Figure 8 and Figure 9 contain several examples of 2D trajectories in the spatial domain. Two trajectories are plotted in Figure 1 along with an obstacle. The trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) are defined as in Equation (5) with t 0 = 10 s and t f = 20 s where the Bernstein coefficients are temporally equidistant. The vector of Bernstein coefficients of trajectory C [ 1 ] ( t ) is
P 5 [ 1 ] = 0 2 4 6 8 10 5 0 2 3 10 3 .
The vector of Bernstein coefficients of trajectory C [ 2 ] ( t ) is
P 5 [ 2 ] = 1 3 6 8 10 12 6 9 10 11 8 8 .
The circular obstacle has a radius of 1 and is centered at point [ 3 , 4 ] . Figure 2 highlights the endpoints property (Property A2). Note that the trajectory C [ 1 ] ( t ) passes through its first and last Bernstein coefficients P 0 , 5 [ 1 ] = [ 0 , 5 ] and [ 10 , 3 ] , respectively. Likewise, the trajectory C [ 2 ] ( t ) passes through its first and last Bernstein coefficients [ 1 , 6 ] and [ 12 , 8 ] , respectively. The convex hull property (Property A1) is illustrated in Figure 3.
Useful operations can be efficiently performed on Bernstein polynomials by manipulating only their coefficients. The de Casteljau algorithm (Property A5) allows one to split a Bernstein polynomial into two separate polynomials. This is shown in Figure 4 where trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) are split at t div = 15 s. Degree elevation (Property A6) is performed on both trajectories in Figure 5. Note that in both Figure 4 and Figure 5, the convex hulls are more accurate than the conservative convex hulls in Figure 3. This idea will be expanded upon in the next section.
Bernstein polynomials can also be used to extract useful information about the dynamics of the trajectories. In Figure 6, Bernstein polynomials representing the squared speed of trajectories C [ 1 ] ( t ) = [ x [ 1 ] ( t ) , y [ 1 ] ( t ) ] and C [ 2 ] ( t ) = [ x [ 2 ] ( t ) , y [ 2 ] ( t ) ] are shown along with their corresponding coefficients and convex hulls. The squared speed is computed using the derivative and arithmetic operation properties (Properties A3 and A7) as follows
( v [ 1 ] ( t ) ) 2 = ( x ˙ [ 1 ] ( t ) ) 2 + ( y ˙ [ 1 ] ( t ) ) 2
Note that the squared speed of a trajectory described by a Bernstein polynomial is also a Bernstein polynomial.
Letting C [ 1 ] ( t ) = [ x [ 1 ] ( t ) , y [ 1 ] ( t ) ] , the heading angle ψ ( t ) of a trajectory can be computed as
ψ [ 1 ] ( t ) = tan 1 y ˙ [ 1 ] ( t ) x ˙ [ 1 ] ( t ) .
Since the inverse tangent of a Bernstein polynomial is not a Bernstein polynomial, we take the tangent of both sides of the equation, yielding
tan ( ψ [ 1 ] ( t ) ) = y ˙ [ 1 ] ( t ) x ˙ [ 1 ] ( t ) ,
which is a rational Bernstein polynomial. Figure 7 illustrates the quantity expressed in Equation (8) computed for trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) .
To determine the angular rate along the trajectory at any point in t [ t 0 , t f ] , we can take the derivative of the heading angle, yielding
ω [ 1 ] ( t ) = ψ ˙ [ 1 ] ( t ) = x ˙ [ 1 ] ( t ) y ¨ [ 1 ] ( t ) x ¨ [ 1 ] ( t ) y ˙ [ 1 ] ( t ) ( x ˙ [ 1 ] ( t ) ) 2 + ( y ˙ [ 1 ] ( t ) ) 2 .
Since the angular rate can be determined using Properties A3 and A7, it can be represented as a rational Bernstein polynomial. The angular rates of trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) are shown in Figure 8.
Finally, the Bernstein polynomial representing the squared distance between two trajectories at every point in time can be computed from
d 2 ( t ) = ( x [ 2 ] ( t ) x [ 1 ] ( t ) ) 2 + ( y [ 2 ] ( t ) y [ 1 ] ( t ) ) 2 , t [ t 0 , t f ]
The center point of a circular, static obstacle Obs ( t ) , can be represented as a Bernstein polynomial whose coefficients are all identical and set to the position of the obstacle, i.e.,
P [ O b s ] = x [ O b s ] x [ O b s ] y [ O b s ] y [ O b s ] .
The degree of the Bernstein polynomial representing the center point of the circular obstacle is equal to that of the order of the Bernstein polynomials representing the trajectories.

3.2. 3D Trajectories

We now introduce two 3D Bernstein polynomials with t 0 = 10 s and t f = 20 s, where the coefficients are equidistant in time, and illustrate their properties in Figure 10, Figure 11, Figure 12, Figure 13, Figure 14, Figure 15, Figure 16 and Figure 17. The Bernstein coefficients of trajectory C [ 3 ] ( t ) are
P 5 [ 3 ] = 7 3 1 1 3 7 1 2 3 8 3 5 0 2 1 9 8 10 ,
and the Bernstein coefficients of trajectory C [ 4 ] ( t ) are
P 5 [ 4 ] = 1 1 4 4 8 8 5 6 9 10 8 6 1 1 3 5 11 6 .
These polynomials are drawn in Figure 10.
Similar to the 2D examples, Figure 11, Figure 12, Figure 13 and Figure 14 illustrate the end points, convex hull, de Casteljau, and elevation properties, respectively. Figure 15 and Figure 16 show the squared speed and squared acceleration of trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) , respectively. These values were computed using the derivative and arithmetic properties. Finally, Figure 17 shows the squared Euclidean distance between the trajectories and the center of the spherical obstacle at every point in time. The distance was found using Property A7.

4. Algorithms for (Rational) Bernstein Polynomials

This section contains algorithms and procedures for Bernstein polynomials that make use of the properties presented in Section 2. These functions include: evaluating bounds, using the convex hull property to quickly find conservative bounds; evaluating extrema, through an iterative procedure that computes a solution within a desired tolerance; minimum spatial distance, applying a similar iterative procedure to find the minimum spatial distance between two Bernstein polynomials; and collision detection, which quickly determines whether a collision may exist or does not exist.

4.1. Evaluating Bounds

Property A1 allows one to quickly establish conservative bounds on the Bernstein polynomial. For example, given the 2D Bernstein polynomial, see Equation (5), with coefficients given by
P 5 = 0 1 2 3 4 5 5 0 2 5 7 5 ,
lower and upper bounds C min and C max satisfying C min C ( t ) C max , t [ t 0 , t f ] can be derived using Equation (A1). Figure 18 exhibits the Bernstein polynomial (solid blue line) given the above coefficients (orange dots connected with dashes). The most conservative estimate of the minimum and maximum Y values of the Bernstein polynomial is given by the coefficients with the lowest and highest Y values, respectively. The lower bound is 0 and the upper bound is 7. As mentioned in Property A6 and Equation (A8), the Bernstein coefficients converge to the curve as the polynomial is degree elevated. This fact can be used to derive tighter bounds. A degree elevation of 20 results in a lower bound of 1.93 and an upper bound of 5.89 . This is a closer estimate of the actual minimum and maximum, 2.26 and 5.70 , respectively (see red dotted lines and Section 4.2). Figure 18 also illustrates degree elevations of 5, 10, and 15. Since the degree elevation matrix, see Equation (A7), is independent of the Bernstein coefficients, a database of elevation matrices can be computed ahead of time to produce tight estimates of the bounds at a low computational cost.

4.2. Evaluating Extrema

The extrema of a Bernstein polynomial are calculated using an iterative procedure similar to the one proposed in [44]. This is done by recursively splitting the curve and using the Convex Hull (Property A1) to obtain an estimate within some desired tolerance. Algorithm 1 outlines the process for determining the maximum of a Bernstein polynomial and can easily be modified to determine the minimum of a Bernstein polynomial.
The inputs to Algorithm 1 are the Bernstein polynomial’s coefficients, P = { P n } , P n = [ P 0 , n , , P n , n ] , an arbitrarily large negative global lower bound, α , and a desired tolerance, ϵ . Note that in order to compute a reliable maximum, α min ( P ) . In practice, α is set to the lowest possible value that can be reliably represented in the computer.
Line 1 finds the maximum of the two endpoints of the Bernstein polynomial, where n is the degree of the polynomial. This makes use of the End Points (Property A2). Next, we determine the upper bound by simply finding the maximum of P . The if statement on line 3 determines whether the global lower bound should be replaced with the current lower bound. The next if statement, line 6, will prune the current set of Bernstein coefficients. This is valid because α always provides a lower bound on the global maximum. If the upper bound of any subset is below α , then we know that it is impossible for any point on that subset to be the global maximum. The final if statement, line 9, determines whether the difference between the upper and lower bounds is within the desired tolerance and returns the global minimum bound α if the tolerance is met.
The else statement, starting on line 11, splits the curve and then recursively calls Algorithm 1 again. The function split() utilizes the de Casteljau algorithm (Property A5). One of two different splitting points, t div , can be employed. The first option simply splits the curve in half, i.e., t div = t 0 + t f t 0 2 . The second option uses the index of the largest valued coefficient, i u b = argmax ( P ) , to determine the splitting point, i.e., t div = t 0 + ( t f t 0 ) i u b n .
Algorithm 1 (and its converse) is employed to find the minimum and maximum of the 5th degree Bernstein polynomial depicted in Figure 18 (red lines). The execution time to compute the minimum is 320 μs on a Lenovo ThinkPad laptop using an Intel Core i7-8550U, 1.80 GHz CPU. The implementation can be found in [40].    
Sensors 22 01869 i001

4.3. Minimum Spatial Distance

The minimum spatial distance between two Bernstein polynomials can be computed using the method outlined in [44]. This is done by exploiting the Convex Hull property (Property A1), the End Point Values property (Property A2), the de Casteljau Algorithm (Property A5), and the Gilbert-Johnson-Keerthi (GJK) algorithm [45]. The latter is widely used in computer graphics to compute the minimum distance between convex shapes.
The algorithm for the minimum spatial distance between two Bernstein polynomials is shown in Algorithm 2. The first two inputs to the function are the sets of Bernstein coefficients, P = { P m } and Q = { Q n } , which define the two Bernstein polynomials in question. The last two inputs are the global upper bound on the minimum distance, α , and a desired tolerance ϵ .
The upper_bound() function on line 1 finds the furthest distance between the end points of the two Bernstein polynomials, i.e., lower_bound ( P , Q ) = max { P [ 0 ] Q [ 0 ] , P [ 0 ] Q [ n ] , P [ m ] Q [ 0 ] , P [ m ] Q [ n ] } where m and n are the degrees of the polynomials represented by P and Q , respectively. This is a valid upper bound on the minimum distance between the two polynomials due to End Point Values (Property A2).
The lower_bound() function on line 2 finds the lower bound on the distance between the two polynomials by using the GJK algorithm. This is a valid lower bound because of Property A1, Convex Hull. The next three if statements on lines 3, 6, and 9 are very similar to those seen in Algorithm 1. Line 3 updates the global upper bound α if the current upper bound is smaller. Line 6 prunes the current iteration since it is impossible the current lower bound, l o w e r , to be the minimum distance if it is larger than the global upper bound. Line 9 returns α if the desired tolerance is met.
The lines within the else statement split the Bernstein polynomials defined by P and Q and recursively call Algorithm 2. Like in Algorithm 1, the first option for splitting would be to simply split at the halfway point. The second option for splitting the curves is outlined in [44] and uses the location at which the minimum distance occurs to choose the splitting point. Figure 19a illustrates the minimum distance between several different Bernstein polynomials. The code to generate this plot can be found in [40]. The execution time to compute the minimum spatial distance is 3.29 ms on a Lenovo ThinkPad laptop using an Intel Core i7-8550U, 1.80 GHz CPU.
Sensors 22 01869 i002
Remark 1.
Note that Algorithm 2 can also be employed to compute the minimum distance between a Bernstein polynomial and a point or a convex shape. This is shown in Figure 19b.

4.4. Collision Detection

In some cases it may be desirable to quickly check the feasibility of a trajectory rather than finding a minimum distance. The collision detection algorithm can be used in these cases. The two major differences between the Collision Detection Algorithm and the Minimum Distance Algorithm described previously are a modification of the GJK algorithm and a change in the stopping criteria. Rather than having the GJK algorithm return a minimum distance, it simply returns whether a collision has been detected (i.e., convex hulls intersecting). The stopping criteria is set to return the moment no collisions are found rather than continuing iterations to meet a desired tolerance. For example, if the original convex hulls of two Bernstein polynomials do not intersect, the collision detection algorithm will return no collision after the first iteration while the minimum distance algorithm will continue to iterate until the desired tolerance is met. Therefore, this algorithm is computationally inexpensive compared to the minimum distance algorithm, with the drawback that it only returns a binary value (no collision or collision possible) rather than a minimum distance.
The collision detection algorithm is shown in Algorithm 3. The inputs are the coefficients of the Bernstein polynomials being compared, P and Q , and the maximum number of iterations m a x _ i t e r . The while loop beginning on line 2 runs until it is determined that a collision does not exist or until the maximum number of iterations is met. The find_collisions() function on line 3 uses the modified GJK algorithm to determine which convex hulls from the set P collide with those from the set Q . The if statement on line 4 checks to see whether collisions were found. If both P c o l and Q c o l are empty, then no collisions exist. If collisions do exist then the for loops starting on lines 7 and 11 split all the convex hulls that were found to collide and add them to the set to be checked. Note that the parent set that is split is removed from the set of convex hulls to check. If the maximum number of iterations is met, then the algorithm returns that a collision is possible. The execution time when a collision is possible is 1.10 ms on a Lenovo ThinkPad laptop using an Intel Core i7-8550U, 1.80 GHz CPU. However, when a collision does not exist, the execution time is only 7.25  μ s.
Sensors 22 01869 i003

4.5. Penetration Algorithm

If two convex shapes intersect, in order to derive information such as the penetration depth and vector, the EPA [46] can be used. A slight modification of the EPA algorithm is proposed here, which is referred to as the DEPA, whose objective is to find the penetration of one convex shape relative to another along a specific direction d . The top left plot of Figure 20 shows two shapes intersecting each other, and the remaining plots show examples of penetration vectors, i.e., the vector d needed to move the second shape so that it no longer intersects the first shape. The DEPA algorithm finds the shortest possible penetration vector. The pseudocode is reported below (see Algorithm 4).
Sensors 22 01869 i004
Figure 21 demonstrates the algorithm in 4 steps. The first plot shows the Minkowski Difference of the shapes depicted in Figure 22, which contains the origin and with a triangle simplex that contains the origin. This is the desired direction to move a polytope A (blue polytope) of Figure 22 such that it no longer contains polytope B (beige polytope). Once the norm of the point along the edge of the Minkowski Difference parallel to d is found, A can then move in the same direction with the same length to no longer intersect B.

5. Numerical Examples

In this section, numerical examples using the BeBOT toolkit and Python’s Scipy Optimization package are examined (flight tests are available at [47]). The implementation of the following examples can be found in [40].

5.1. Dubins Car—Time Optimal

In this simple example, several trajectories for a vehicle with Dubins car dynamics are generated to illustrate the properties of Bernstein polynomials. We let the desired trajectory assigned to the vehicle be given by the Bernstein polynomial
C n [ x ] ( t ) C n [ y ] ( t ) = C n ( t ) = i = 0 n P i , n B i , n ( t ) , t [ t 0 , t f ] .
The square of the speed of the vehicle is a 1D Bernstein polynomial given by
v 2 ( t ) = | | C ˙ n ( t ) | | 2 .
The heading angle is
ψ ( t ) = tan 1 C ˙ n [ y ] ( t ) C ˙ n [ x ] ( t ) ,
and the angular rate is a 1D rational Bernstein polynomial given by
ω ( t ) = C ¨ n [ y ] ( t ) C ˙ n [ x ] ( t ) C ˙ n [ y ] ( t ) C ¨ n [ x ] ( t ) | | C ˙ n ( t ) | | 2 .
The objective at hand is to find a trajectory that arrives at a desired destination in the minimum possible time while adhering to feasibility and safety constraints. In particular, the trajectory generation problem is as follows:
min P n , t f t f
subject to
C n ( t 0 ) = C 0 , C n ( t f ) = C f , ψ ( t 0 ) = ψ 0 , ψ ( t f ) = ψ f | | C ˙ n ( t 0 ) | | = v 0 , | | C ˙ n ( t f ) | | = v f , | | C ˙ n ( t ) | | 2 v max 2 , t [ t 0 , t f ] | | ψ ˙ ( t ) | | ω max , t [ t 0 , t f ] | | C n ( t ) O i | | 2 d s 2 , t [ t 0 , t f ] , i = 1 , 2 .
We set the initial and final position, heading, and speed to C 0 = [ 3 , 0 ] m, C f = [ 7 , 10 ] m, ψ 0 = ψ f = π 2 rad, and v 0 = v f = 1 m s . The maximum speed, maximum angular rate, and minimum safe distance constraints are v max = 5 m s , ω max = 1 rad s , and d s 2 = 1 m, respectively. The positions of the obstacles are O 1 = [ 3 , 2 ] m and O 2 = [ 6 , 7 ] m.
In the problem above, the initial and final constraints for position, heading, and speed are enforced using the End Point Values property (Property A2) together with Equations (A2), (12) and (13). Similarly, the same property is used to enforce the initial and final speeds and headings (see (A2)). Note that the norm squared of the speed and of the distance between the trajectory and the obstacles can be expressed as Bernstein polynomials (the sum, the difference, and the product between Bernstein polynomials are also Bernstein polynomials). A similar argument can be made for the norm square of the angular rate, which can be expressed as a rational Bernstein polynomial (see Property A7). Thus, the maximum speed and angular rate, and collision avoidance constraints can be enforced using the Evaluating Bounds or Evaluating Extrema procedures described in Section 4.1 and Section 4.2.
Figure 23 shows the results with n = 10 . The blue curve is obtained by enforcing the constraints using the Evaluating Bounds procedure. The optimal time of arrival at the final destination is t f = 9.14 s. Next, we solve the same problem by enforcing the constraints using the Evaluating Bound procedure together with Degree Elevation. Recall that by degree elevating a Bernstein polynomial, the Bernstein coefficients converge towards the curve. Thus, degree elevation can be used to enforce constraints with tighter bounds. The orange and green lines show the trajectories obtained using degree elevations of 30 and 100, respectively. Degree elevation to degree 30 results in an optimal final time t f = 7.64 s. The elevation to degree 100 provides an optimal value t f = 7.12 s. Finally, the trajectory with smallest optimal final time, t f = 6.45 s, depicted as the red curve in Figure 23, is obtained by enforcing the constraints using the Evaluating Extrema algorithm (Section 4.2). While higher degree elevations or evaluating the exact extrema can produce more optimal trajectories, that optimality comes at the cost of additional computation time. Using a Lenovo Thinkpad P52s with an Intel Core i7-8550U CPU with a 1.8 GHz clock and 8 GB of memory, the computation time required for no degree elevation, a degree elevation of 30, a degree elevation of 100, and the exact extrema algorithm was 0.105 s, 0.146 s, 0.201 s, and 0.573 s, respectively.
Figure 24 illustrates the squared speed of each example. Figure 25 shows the angular rate of each trial. It can be seen that the vehicle correctly adheres to the speed and angular rate constraints for each trial with the only differences being the final time and proximity to the obstacles.
Remark 2.
The Exact Extrema function is a complex non-linear and non-smooth function. When it is used to enforce constraints, gradient-based optimization solvers such as the one used in this work can fail to converge to a feasible solution, especially if the initial guess is not feasible. One option is to use an iterative procedure where (i) a feasible sub-optimal solution is obtained by enforcing the collision avoidance constraint using the Evaluating Bounds function, and (ii) this solution is then used as an initial guess to solve the (more accurate) problem with the Exact Extrema constraint.

5.2. Air Traffic Control—Time Optimal

In this example, we consider the problem of routing several commercial flights between major US cities in two dimensions (i.e., constant altitude). Assuming that each flight departs at the same time, the goal is to minimize the combined flight time of all the vehicles. Let the position, speed, heading, and angular rate of each vehicle under consideration be parameterized as in Section 5.1. We shall also make the assumption that the trajectories are on a 2D plane rather than on the surface of the Earth.
The goal is to compute cumulatively time optimal trajectories subject to maximum speed and angular velocity bounds, initial and final position, angle, and speeds. The vehicles must also maintain a minimum safe distance between each other. This problem can be formulated as follows:
min P n , t f k = 1 m t f [ k ]
subject to
C n [ k ] ( 0 ) = C 0 [ k ] , C n [ k ] t f [ k ] = C f [ k ] , ψ [ k ] ( 0 ) = ψ 0 [ k ] , ψ [ k ] t f [ k ] = ψ f [ k ] , | | C ˙ n [ k ] ( 0 ) | | = v 0 [ k ] , | | C ˙ n [ k ] t f [ k ] | | = v f [ k ] , v min 2 | | C ˙ n [ k ] ( t ) | | 2 v max 2 , t [ 0 , t f [ k ] ] , | ψ ˙ [ k ] ( t ) | ω max , t [ 0 , t f [ k ] ] , | | C n i ( t ) C n j ( t ) | | 2 d s 2 , i , j { 1 , , m } , i j .
where the superscript [ k ] corresponds to the kth vehicle out of m vehicles, C 0 [ k ] and C f [ k ] are the initial and final positions, ψ 0 [ k ] and ψ f [ k ] are the initial and final headings, v 0 [ k ] and v f [ k ] are the initial and final speeds, v min and v max are the minimum and maximum speeds, ω max is the maximum angular velocity, d s is the minimum safe distance, and t f [ k ] is the final time of the kth vehicle.
The departure cities, in vehicle order, are: San Diego, New York, Minneapolis, and Seattle. The arrival cities, in vehicle order, are: Minneapolis, Seattle, Miami, and Denver. The initial and final speeds are all v 0 [ k ] = v f [ k ] = 205 m s k { 1 , , m } , the initial headings are ψ 0 = [ 0 , π , 0 , 0 ] rad, the final headings are ψ f = [ 0 , π , π 2 , 0 ] rad, the minimum speed is v min = 200 m s , the maximum speed is v max = 260 m s , the maximum angular velocity is ω max = 3 deg s = 0.0524 rad s , the minimum safe distance is d s = 5 km, and the degree of the Bernstein polynomials being used is 5.
The initial and final position constraints are enforced using the End Point Values property (Property A2). Similarly, the same property is used to enforce the initial and final speeds and headings (see (A2)). Note that the norm square of the speed and the norm square of the distance between vehicles can be expressed as 1D Bernstein polynomials (the sum, difference, and product between Bernstein polynomials are also Bernstein polynomials). A similar argument can be made for the norm square of the angular rate, which can be expressed as a rational Bernstein polynomial (see Property A7). Thus, the maximum speed and angular rate, and collision avoidance constraints can be enforced using the Evaluating Bounds or Evaluating Extrema procedures described in Section 4.1 and Section 4.2.
The optimized flight plans can be seen in Figure 26. The squared speed of each vehicle is shown in Figure 27. Note that each vehicle begins and ends with the same speed. The vehicles never slow down less than their initial speeds which means they never reach the minimum speed constrain, nor do the vehicles go faster than the maximum speed. In Figure 28, the angular velocity of each vehicle is shown. The minimum and maximum angular rate constraints are shown by the dotted lines. The vehicles’ angular rates never approach the minimum or maximum angular rate constraints due to the large area being covered. Finally, the squared euclidean distance between vehicles is shown in Figure 29. As expected, the squared Euclidean distance between two vehicles never falls below the minimum safe distance. Note that curves within the constraint plots end at different times. This is expected since each vehicle has a different final time. The furthest time reached in Figure 29 is less than that of the other plots because the other vehicles have already reached their final time before the longest flight reaches its final time.

5.3. Cluttered Environment

In many real world scenarios, robots must safely traverse cluttered environments. In this example, three aerial vehicles traveling at a constant altitude must navigate around several obstacles while also adhering to dynamic and minimum safe distance constraints. Let the position, speed, heading angle, and angular rate of each vehicle be defined as in Section 5.1. The goal of this example is to compute trajectories whose arc length is minimized subject to maximum speed constraints along with initial and final positions, heading angles, and speeds. The vehicles should also adhere to a minimum safe distance between each other and between obstacles. We formulate the problem as follows:
min P n i = 1 m k = 0 n 1 | | P k + 1 , n [ i ] P k , n [ i ] | |
subject to
C n [ k ] ( 0 ) = C 0 [ k ] , C n [ k ] ( t f ) = C f [ k ] , ψ [ k ] ( 0 ) = ψ 0 [ k ] , ψ [ k ] ( t f ) = ψ f [ k ] , | | C ˙ n [ k ] ( 0 ) | | = v 0 [ k ] , | | C ˙ n [ k ] ( t f ) | | = v f [ k ] , | | C ˙ n [ k ] ( t ) | | 2 v max 2 , t [ 0 , t f ] , | | C n [ i ] ( t ) C n [ j ] ( t ) | | 2 d s 2 , i , j { 1 , , m } , i j , | | C n [ i ] ( t ) O j | | 2 d o b s 2 , t [ 0 , t f ] , i { 1 , , m } , j { 1 , , b } ,
where O j is the position of the jth obstacle out of b obstacles.
The initial positions for each vehicle, in order, are [ 0 , 0 ] m, [ 10 , 0 ] m, and [ 20 , 0 ] m. The initial speeds are all 1 m s and the initial heading angles are all π 2 rad. The final positions for each vehicle are, in order, [ 20 , 30 ] m, [ 0 , 30 ] m, and [ 10 , 30 ] m. The final speeds and final heading angles are the same as the initial speeds and heading angles. The order of the Bernstein polynomials being used is 7, the final time is t f = 30 s, the minimum safe distance between vehicles is d s = 1 m, the minimum safe distance between vehicles and obstacles is d o b s = 2 m, and the maximum speed is v max = 10 m s . The vehicles traversing the cluttered environment can be seen in Figure 30. This experiment has been repeated in the Cooperative Autonomous Systems (CAS) lab using three AR Drones 2.0. The flight tests can be viewed at [47].

5.4. Vehicle Overtake

Here we consider an autonomous driving example in which one vehicle attempts to overtake another vehicle while driving around a 90 corner. The corner is defined by two arcs with a center point located at [ 140 , 0 ] m. The inner track has a radius of r i n n e r = 125 m and the outer track has a radius of r o u t e r = 140 m. To clearly distinguish the vehicle being overtaken, it will be referred to as the opponent.
For simplicity, we consider the objective of minimizing the arc-length of the trajectory, which can be done by minimizing the sum of the squared Euclidean norm of consecutive control points, i.e.,
E ( P n ) = i = 1 n | | P i , n P i 1 , n | | 2 .
The desired endpoint of the vehicle is at the end of the corner. This is computed by measuring the angle between the vehicle’s position and the end of the curve,
A ( P n ) = argtan 2 P n , n [ y ] q [ y ] , P n , n [ x ] q [ x ] π 2 2 ,
where the function argtan 2 returns an angle in the correct quadrant [48]. Given Equations (15) and (16), we formulate the problem as
min P n ( 1 α ) E ( P n ) + α A ( P n ) β
subject to
C n ( 0 ) = C 0 , ψ ( 0 ) = ψ 0 , | | C ˙ n ( 0 ) | | = v 0 , | | C ˙ n ( t ) | | 2 v max 2 , t [ 0 , t f ] , | ψ ˙ ( t ) | ω max , t [ 0 , t f ] , r i n n e r 2 | | C n ( t ) q | | 2 r o u t e r 2 , | | C n ( t ) O n ( t ) | | 2 d s 2 ,
where α and β are tuning parameters. C 0 , ψ 0 , and v 0 are the initial position, heading, and speed of the vehicle, respectively. v max and ω max are the maximum speed and angular rate, respectively. The predicted trajectory of the opponent is represented as the Bernstein polynomial O n ( t ) and the minimum safe distance to the opponent is d s . Using a sensor such as a camera or LiDAR, one could measure the state of the opponent and then predict its future position using a method such as the one presented in [49].
At time t = t 0 , when planning occurs, the position of the vehicle is [ 5 , 0 ] m, its speed is 50 m s , and its initial heading angle is π 2 rad . The control points of the Bernstein polynomial representing the opponent’s trajectory are
10 25 50 70 10 75 90 105 m .
The maximum speed is 65 m s , the maximum angular rate is π 5 rad s , and the minimum safe distance is 3 m. The tuning parameters are α = 1 10 6 and β = 100 .
Figure 31 illustrates the optimized vehicle trajectory overtaking the opponent’s trajectory. Figure 32 shows the squared speed of the vehicle along with the maximum speed constraint. As expected, the vehicle’s speed approaches the maximum speed in order to successfully overtake the opponent. Figure 33 shows the vehicle’s angular rate and its upper and lower constraints. It is clear that the vehicle remains within the desired bounds. Figure 34 shows the squared distance between the vehicle and the opponent. While the vehicle does come close to the opponent, it is never closer than the minimum safe distance.

5.5. Swarming

This section examines two methods for generating trajectories for large groups of autonomous aerial vehicles. The centralized method optimizes every trajectory at once. On the other hand, the decentralized method generates trajectories one at a time and compares them to previously generated trajectories.
The position of each vehicle in a swarm of m vehicles for the following examples is parameterized as a 3D Bernstein polynomial, i.e.,
i = 0 n P i , n [ j ] B i , n ( t ) = C n [ j ] ( t ) , j { 1 , , m } , P n [ j ] R 3 × n .

5.5.1. 101 Vehicle—Centralized

The centralized method optimizes the trajectories for each vehicle simultaneously. The goal is to minimize the arc length of each trajectory. There are m vehicles with 3rd order Bernstein polynomials representing their trajectories which are constrained to a minimum safe distance between each other and initial and final positions. This is formulated as follows:
min P n i = 1 m k = 0 n 1 | | P k + 1 [ i ] P k [ i ] | | ,
subject to
C n [ i ] ( 0 ) = C 0 i , C n [ i ] ( t f ) = C f [ i ] , i { 1 , , m } , | | C n [ i ] ( t ) C n [ j ] ( t ) | | 2 d s 2 , i , j { 1 , , m } , i j .
The initial positions for each vehicle were chosen randomly from a 25 m × 25 m grid at an altitude of z = 0 m. The final positions were chosen to spell out “CAS”, as seen in Figure 35, at an altitude of z = 100 m. In the next section we significantly reduce the number of dimensions in the optimization vector by using the decentralized approach.

5.5.2. 101 Vehicle—Decentralized

The decentralized method iteratively computes trajectories for the ith vehicle. Each new iteration is compared to the previously computed trajectories so that the minimum safety distance constraint is met. The problem that is solved at each iteration is written as
min P n [ i ] i = 1 m k = 0 n 1 | | P k + 1 [ i ] P k [ i ] | |
subject to
C n [ i ] ( 0 ) = C 0 [ i ] , C n [ i ] ( t f ) = C f [ i ] , | | C n [ i ] ( t ) C n [ j ] ( t ) | | 2 D s 2 , j { 1 , , i 1 } , i > 1 .
Note that the first vehicle does not need to satisfy the minimum safe distance constraint since no trajectories have been computed before it.
The parameters used in this example were identical to that of the previous subsection. The resulting figure has been omitted due to its similarity to Figure 35.

5.5.3. 1000 Vehicle—Decentralized

The decentralized method can be used to compute 1000 trajectories. In this example, it is employed to generate the paths seen in Figure 36 to display the University of Iowa Hawkeye logo. The initial points are equally dispersed at an altitude of z = 0 m on a 100 m × 100 m grid. The final points are the pattern shown at an altitude of z = 100 . The cost function aims to maximize the temporal distance between the current ith trajectory and the previously generated jth trajectories by taking the reciprocal of the sum of the Bernstein coefficients of the norm squared difference, i.e.
min P n [ i ] 1 j = 1 i 1 P [ n o r m , j ] , i > 1 ,
subject to
C n [ i ] ( 0 ) = C 0 [ i ] , C n [ i ] ( t f ) = C f [ i ] ,
where P [ n o r m , j ] are the Bernstein coefficients of the Bernstein polynomial representing the squared temporal distance between the ith and jth trajectories, i.e.,
| | C [ i ] ( t ) C [ j ] ( t ) | | 2 = i = 0 n P [ n o r m , j ] B i , n ( t ) .
It should be noted that this formulation of cost function and constraints is used as a proof of concept. For other possible cost function and constraint formulations, the reader is referred to [50,51].

5.6. Marine Vehicle Model

In this example, we consider a marine vehicle model known as the medusa. The equations of motion of the medusa are as follows
x ˙ = u cos ψ v sin ψ , y ˙ = u sin ψ + v cos ψ , ψ ˙ = r .
m u u ˙ m v v r + d u u = τ u , m v v ˙ + m u u r + d v v = 0 , m r r ˙ m u v u v + d r r = τ r ,
where x and y represent the vehicle’s position, ψ is the orientation, u (surge) and v (sway) are the linear velocities, r is the turning rate, and τ = [ τ u , τ r ] T is the vector of forces and torques due to thrusters/surfaces (control input).
In this example, we let the state, [ x , y , ψ , u , v , r ] , and input, [ τ u , τ r ] , be approximated by Bernstein polynomials, and impose the vehicle’s dynamics directly through Bernstein polynomial differentiation. Using Property A3, the dynamics constraints given by Equations (18) and (19) reduce to a set of algebraic constraints. Additional constraints imposed on this problem include collision avoidance and input saturation constraints. Figure 37 shows an example of motion planning for a medusa vehicle, which is required to reach a final destination in the minimum time. Ten markers are plotted along the trajectory (shown in blue) to represent the heading of the vehicle at that point in time. It can easily be seen that the vehicle’s trajectory avoids the (inflated) unsafe region illustrated by the orange circle.

5.7. Dynamic Routing Problem

5.7.1. Single Vehicle Case

We consider a problem where a single vehicle is supposed to visit M neighborhoods B i = { x R 2 : x b i r } in minimum time t f . Here r > 0 and the vectors b i R 2 , i [ 1 , M ] represent a sequence of points of interest that has been generated by a Traveling Salesman Problem (TSP) algorithm. Let t i denote a time instance when the vehicle’s position satisfies C n ( t i ) B i . Then, the dynamic routing problem for a single vehicle can be formulated as follows,
  • DR 1
min t i , i [ 1 , M ] , P n t f
subject to
C n ( t i ) B i t i 1 < t i < t i + 1 , i = 2 , M 1 t 1 > 0 , t f > t M C ˙ n 1 , C ¨ n 1 , C n ( 0 ) = C n ( t f ) = C 0

5.7.2. Numerical Solution: Single Vehicle Case

Let
C n i ( t ) = k = 0 n P i , k B k , n ( t ) , t [ t i 1 , t i ] , t 0 = 0 , t M + 1 = t f 0 , o . w . , i [ 1 , M + 1 ]
Define
C n ( t ) = i = 1 M + 1 C n i ( t )
Then the numerical solution of the dynamic routing problem DR 1 was obtained by solving the optimization problem
min t i , i [ 1 , M ] , P n i t f
subject to
C n i ( t i ) b i r t i 1 < t i < t i + 1 , i = 2 , M 1 t 1 > 0 , t f > t M C ˙ n 1 , C ¨ n 1 , C n ( 0 ) = C n ( t f ) = C 0 C n i ( t i ) = C n i + 1 ( t i ) , i [ 1 , M 1 ] C ˙ n i ( t i ) = C ˙ n i + 1 ( t i ) i [ 1 , M 1 ]
A simulation was performed illustrating a single agent visiting 30 neighborhoods. The resulting trajectory is shown in Figure 38. The agent is limited to velocities of arbitrary units ranging from 1 to 1 and is similarly limited to accelerations of arbitrary units also from 1 to 1. The velocities and accelerations of the vehicle can be seen in Figure 39 and Figure 40, respectively.

5.7.3. Multiple Vehicle Case

In this case, K drones are assigned a total of K neighborhood sets to visit. Each neighborhood set, P k , consists of an equal number of neighborhoods B i j which are defined by a set of points of interest b i k R 2 , i.e.,
B i k = { x R 2 : x b i k r , i [ 1 , M ] , k [ 1 , K ] } ,
and
P k = { B 1 k , , B M k , k [ 1 , K ] } .
Let t f k , k [ 1 , K ] denote the total time it takes for the kth vehicle to visit every neighborhood in the set P k once and let t i k denote a time instance when the kth vehicle’s position satisfies C n k ( t i k ) B i k . Using this notation, we propose the following definition of the multi-vehicle dynamic routing problem for given positive number w k and d
  • DR 2
min t i k , i [ 1 , M ] , k [ 1 , K ] , P n k k = 1 K w k t f k
subject to
C n k ( t i k ) B i k P k , k [ 1 , K ] t i 1 , k < t i k < t i + 1 , k , i [ 2 , M 1 ] , k [ 1 , K ] t 1 k > 0 , t f k > t M k | C ¨ n k ( t ) | u m a x , t [ 0 , t f k ] C n k ( 0 ) = C n k ( t f ) = C k 0 , k [ 1 , K ] | C n k ( t ) C n l ( t ) | d , k l , t [ 0 , max j [ 1 , K ] t f j ] , k [ 1 , K ] , l [ 1 , K ] .
Simulations were performed for a two agent and ten agent case each visiting 10 neighborhoods per agent. The resulting trajectories for the two agent case are shown in Figure 41 and for the ten agent case in Figure 42.

6. Conclusions

We presented a method to generate optimal trajectories by using Bernstein polynomials to transcribe the problem into a nonlinear programming problem. By exploiting the useful properties of Bernstein polynomials, our method provides computationally efficient algorithms that can also guarantee safety in continuous time which are useful in optimization routines. These algorithms include evaluating bounds, evaluating extrema, minimum spatial distance between two Bernstein polynomials, minimum spatial distance between a Bernstein polynomial and a convex polygon, collision detection, and the penetration algorithm. We also developed an open source toolbox which makes these transcription methods readily available in the Python programming language.
Numerical examples were provided to demonstrate the efficacy of the method. Simple cost functions and constraints were implemented to generate trajectories for several realistic mission scenarios including air traffic control, navigating a cluttered environment, overtaking a vehicle, trajectory generation for a large swarm of vehicles, trajectory generation for a marine vehicle, and navigation for vehicles operating in a Traveling Salesman mission. Our formulation offers a powerful tool for users to generate optimal trajectories in real time scenarios for single or multiple robot teams. Future work includes developing new cost functions, exploring different optimization frameworks, and replanning trajectories to react to a changing environment.

Author Contributions

Conceptualization, C.K.-J., V.C., I.K., A.P., C.W.; methodology, C.K.-J., V.C., I.K., A.P., C.W.; software, C.K.-J., T.B., I.K., C.W.; validation, C.K.-J., T.B., I.K., C.W.; investigation, C.K.-J., V.C., I.K., A.P., C.W.; resources, V.C., I.K., A.P.; writing—original draft preparation, C.K.-J., V.C., I.K.; writing—review and editing, C.K.-J.; supervision, V.C., I.K., A.P., C.W.; project administration, V.C.; funding acquisition, V.C., I.K., A.P. All authors have read and agreed to the published version of the manuscript.

Funding

This research was supported by the Office of Naval Research, grants N000141912106, N000142112091 and N0001419WX00155. Antonio Pascoal was supported by H2020-EU.1.2.2—FET Proactive RAMONES, under Grant GA 101017808 and LARSyS-FCT under Grant UIDB/50009/2020. Isaac Kaminer was supported by the Office of Naval Research grant N0001421WX01974.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A

In this section we present and examine relevant properties of Bernstein polynomials and rational Bernstein polynomials, which are used throughout the article.
Figure A1. Convex hull of a Bernstein polynomial where the solid blue line is the curve, the black dotted line is the convex hull, and the orange points connected by dashed lines are the Bernstein coefficients.
Figure A1. Convex hull of a Bernstein polynomial where the solid blue line is the curve, the black dotted line is the convex hull, and the orange points connected by dashed lines are the Bernstein coefficients.
Sensors 22 01869 g0a1
Property A1.
Convex Hull
Both the Bernstein polynomial, Equation (5), and the rational Bernstein polynomial (6) (provided that w i , n > 0 , i = 0 , , n ) satisfy
min k { 0 , , n } P k C n ( t ) max k { 0 , , n } P k , t [ t 0 , t f ] .
It follows that 2D (or 3D) Bernstein polynomials and rational Bernstein polynomials lie within the convex hull defined by their Bernstein coefficients. An example of this property is depicted in Figure A1, which shows a 2D Bernstein polynomial contained within its convex hull.
Property A2.
End Point Values
The first and last Bernstein coefficients of the Bernstein polynomial introduced in Equation (5), as well as the rational Bernstein polynomial in Equation (6), are their endpoints, i.e.,
C n ( t 0 ) = P 0 a n d C n ( t f ) = P n .
Furthermore, the tangents to the curve at its first and last coefficients are the same as the lines connecting the first and second coefficients and the penultimate and ultimate coefficients, respectively. It follows that the first derivative of the Bernstein polynomial at the end points is as follows
C ˙ n ( t 0 ) = n t f t 0 ( P 1 , n P 0 , n ) , C ˙ n ( t f ) = n t f t 0 ( P n , n P n 1 , n ) .
Similarly, for a rational Bernstein polynomial we have
C ˙ n ( t 0 ) = n w 1 ( t f t 0 ) w 0 ( P 1 , n P 0 , n ) , C ˙ n ( t f ) = n w n 1 ( t f t 0 ) w n ( P n , n P n 1 , n ) .
Property A3.
Derivatives
The derivative of the Bernstein polynomial introduced in Equation (5) is an ( n 1 ) th order Bernstein polynomial given by
C ˙ n 1 ( t ) = i = 0 n 1 P i , n 1 B i , n 1 ( t ) ,
with the vector of Bernstein coefficients P n 1 = [ P 0 , n 1 , , P n 1 , n 1 ] given by
P n 1 = P n D n .
In the equation above, D n denotes the differentiation matrix given by
D n = n t f t 0 1 0 0 1 0 0 1 0 0 1 R n + 1 × n .
Remark A1.
Properties A2 and A3 can be easily extended to compute higher order derivatives of Bernstein polynomials.
Property A4.
Integrals
The definite integral of a Bernstein polynomial is given by
t 0 t f C n ( t ) d t = t f t 0 n + 1 i = 0 n P i , n .
Figure A2. Geometric example of the de Casteljau algorithm splitting a 2D Bernstein polynomial at t d i v = 0.5 . The original curve is defined by the Bernstein coefficients { P 0 , n 0 , , P 3 , n 0 } , the left hand curve is shown in red, the right hand curve is shown in blue, and the superscript corresponds to the current iteration of the algorithm.
Figure A2. Geometric example of the de Casteljau algorithm splitting a 2D Bernstein polynomial at t d i v = 0.5 . The original curve is defined by the Bernstein coefficients { P 0 , n 0 , , P 3 , n 0 } , the left hand curve is shown in red, the right hand curve is shown in blue, and the superscript corresponds to the current iteration of the algorithm.
Sensors 22 01869 g0a2
Property A5.
The de Casteljau Algorithm
The de Casteljau algorithm computes a Bernstein polynomial defined over an interval [ t 0 , t f ] at any given t div [ t 0 , t f ] . Moreover, it can be used to split a single Bernstein polynomial into two independent Bernstein polynomials. Given the Bernstein polynomial introduced in Equation (5) with the vector of coefficients P n = [ P 0 , n , , P n , n ] , and a scalar t div [ t 0 , t f ] , the Bernstein polynomial at t div is computed using the following recursive relationship:
P i , n 0 = P i , n , i = 0 , , n ,
P i , n j = t f t div t f t 0 P i , n j 1 + t div t 0 t f t 0 P i + 1 , n j 1 ,
with i = 0 , , n j , and j = 1 , , n . Then, the Bernstein polynomial evaluated at t div is C n ( t div ) = P 0 , n n . Note that the superscript here signifies an index and not an exponent. Moreover, the Bernstein polynomial can be subdivided at t div into two nth order Bernstein polynomials with coefficients
P 0 , n 0 , P 0 , n 1 , , P 0 , n n a n d P 0 , n n , P 1 , n n 1 , , P n , n 0 .
A geometric example of a 3rd order Bernstein polynomial being split at t d i v = 0.5 using the de Casteljau is shown in Figure A2. Note that at the final iteration only a single point remains, P 0 , n 3 , and lies on the original curve. The points { P 0 , n 0 , P 0 , n 1 , P 0 , n 2 , P 0 , n 3 } become the Bernstein coefficients of the left curve and the points { P 0 , n 3 , P 1 , n 2 , P 2 , n 1 , P 3 , n 0 } become the coefficients of the right curve.
Remark A2.
For high order Bernstein polynomials, the exponential terms in Equation (5) can cause overflows. The de Casteljau algorithm can be used to overcome these issues on a computer when computing the value of a Bernstein polynomial, especially if lower bit floating point values are to be used such as 16 or 32 bits.
Property A6.
Degree Elevation
The degree of a Bernstein polynomial can be elevated by one using the following recursive relationship
P i , n + 1 = i n + 1 P i 1 , n + 1 i n + 1 P i , n ,
where P 0 , n + 1 = P 0 , n and P n + 1 , n + 1 = P n , n . Furthermore, any Bernstein polynomial of degree n can be expressed as a Bernstein polynomial of degree m, m > n . The vector of coefficients of the degree elevated Bernstein polynomial, namely P m = [ P 0 , m , , P m , m ] , can be calculated as
P m = P n E ,
where E = { e j , k } R ( n + 1 ) × ( m + 1 ) is the degree elevation matrix with elements given by
e i , i + j = m n j n i m i + j ,
where i = 0 , , n and j = 0 , , m n , all other values in the matrix are zero, and P n = [ P 0 , n , , P n , n ] is the vector of Bernstein coefficients of the curve being elevated (see [52]). Because E is conveniently independent of the coefficients, it can be computed ahead of time and stored for efficient computation of degree elevated Bernstein polynomials. By degree elevating a Bernstein polynomial, the coefficients converge to the polynomial, i.e.
max i P i , m C m i m ( t f t 0 ) + t 0 k m ,
where k is a positive constant independent of m (see [53]).
Property A7.
Arithmetic Operations
Arithmetic operations of Bernstein polynomials require that both curves be defined on the same time interval [ t 0 , t f ] . In case they are not, the de Casteljau algorithm can be used to split them at an intersecting time interval.
The sum and difference of two polynomials of the same order can be performed by simply adding and subtracting their Bernstein coefficients, respectively. For Bernstein polynomials of different order, the Degree Elevation (Property A6) may be used to increase the order of the lower order Bernstein polynomial.
Given two Bernstein polynomials, F m ( t ) and G n ( t ) , with degrees m and n, respectively, and having Bernstein coefficients X 0 , m , , X m , m and Y 0 , n , , Y n , n , the product C m + n ( t ) = F m ( t ) G n ( t ) is a Bernstein polynomial of degree ( m + n ) with coefficients P k , m + n , k { 0 , , m + n } given by
P k , m + n = j = max ( 0 , k n ) min ( m , k ) m j n k j m + n k X j , m Y k j , n .
The ratio between two Bernstein polynomials, F n ( t ) and G n ( t ) , with coefficients X 0 , n , , X n , n and Y 0 , n , , Y n , n , i.e., R n ( t ) = F n ( t ) / G n ( t ) , can be expressed as a rational Bernstein polynomial as defined in Equation (6), with coefficients and weights
P i , n = X i , n Y i , n , w i , n = Y i , n ,
respectively.
Property A8.
The de Casteljau Algorithm Extended to Rational Bernstein Polynomials
The de Casteljau algorithm can be extended to rational Bernstein polynomials (see [54]). Letting
w i , n r ( t ) = j = 0 r w i + j , n B i , r ( t ) ,
we can determine a point on an nth order rational Bernstein polynomial using the recursive equation
P i , n r ( t ) = t f t t f t 0 w i , n r 1 ( t ) w i , n r ( t ) P i , n r 1 ( t ) + t t 0 t f t 0 w i + 1 , n r 1 ( t ) w i , n r ( t ) P i + 1 , n r 1 ( t ) .
Moreover, the recursive relationship can be used to split the rational Bernstein polynomial into two nth order rational Bernstein polynomials with weights
w 0 , n 0 , w 0 , n 1 , , w 0 , n n a n d w 0 , n n , w 1 , n n 1 , , w n , n 0 ,
and coefficients
P 0 , n 0 , P 0 , n 1 , , P 0 , n n a n d P 0 , n n , P 1 , n n 1 , , P n , n 0 .
Property A9.
Degree Elevation for Rational Bernstein Polynomials
Degree elevation can be extended to rational Bernstein polynomials (see [54]). The nth order rational Bernstein polynomial given by Equation (6) can be rewritten as a rational Bernstein polynomial of order n + 1 with weights
w i , n + 1 = i n + 1 w i 1 , n + 1 i n + 1 w i , n .
where w 0 , n + 1 = w 0 , n and w n + 1 , n + 1 = w n , n , and coefficients
P i , n + 1 = i n + 1 w i , n P i , n + 1 i n + 1 w i + 1 , n P i + 1 , n i n + 1 w i , n + 1 i n + 1 w i + 1 , n .

References

  1. Milford, M.; Anthony, S.; Scheirer, W. Self-driving vehicles: Key technical challenges and progress off the road. IEEE Potentials 2019, 39, 37–45. [Google Scholar] [CrossRef]
  2. Mogili, U.R.; Deepak, B. Review on application of drone systems in precision agriculture. Procedia Comput. Sci. 2018, 133, 502–509. [Google Scholar] [CrossRef]
  3. Koerhuis, R. Odd.Bot Robot Takes on Herbicide Free Weed Elimination. 2018. Available online: https://www.futurefarming.com/Tools-data/Articles/2018/12/OddBot-robot-takes-on-herbicide-free-weed-elimination-375027E/ (accessed on 4 May 2020).
  4. Lutz, M.; Meurer, T. Optimal Trajectory Planning and Model Predictive Control of Underactuated Marine Surface Vessels using a Flatness-Based Approach. arXiv 2021, arXiv:2101.12730. [Google Scholar]
  5. Ackerman, E. Startup Developing Autonomous Delivery Robots That Travel on Sidewalks. 2015. Available online: https://spectrum.ieee.org/automaton/robotics/industrial-robots/starship-technologies-autonomous-ground-delivery-robots (accessed on 4 May 2020).
  6. Ackerman, E.; Koziol, M. In the Air with Zipline’s Medical Delivery Drones. 2019. Available online: https://spectrum.ieee.org/robotics/drones/in-the-air-with-ziplines-medical-delivery-drones (accessed on 4 May 2020).
  7. Lardinois, F. A First Look at Amazon’s New Delivery Drone. 2019. Available online: https://techcrunch.com/2019/06/05/a-first-look-at-amazons-new-delivery-drone/ (accessed on 4 May 2020).
  8. Johnson, A.; Hautaluoma, G. NASA’s Ingenuity Mars Helicopter Succeeds in Historic First Flight. 2021. Available online: https://www.nasa.gov/press-release/nasa-s-ingenuity-mars-helicopter-succeeds-in-historic-first-flight (accessed on 18 June 2020).
  9. Lumelsky, V.J.; Stepanov, A.A. Path-planning strategies for a point mobile automaton moving amidst unknown obstacles of arbitrary shape. Algorithmica 1987, 2, 403–430. [Google Scholar] [CrossRef] [Green Version]
  10. Kamon, I.; Rivlin, E. Sensory-based motion planning with global proofs. IEEE Trans. Robot. Autom. 1997, 13, 814–822. [Google Scholar] [CrossRef] [Green Version]
  11. McGuire, K.; de Croon, G.; Tuyls, K. A Comparative Study of Bug Algorithms for Robot Navigation. Robot. Auton. Syst. 2019, 121, 103261. [Google Scholar] [CrossRef] [Green Version]
  12. Fiorini, P.; Shiller, Z. Motion planning in dynamic environments using the relative velocity paradigm. In Proceedings of the IEEE International Conference on Robotics and Automation, Atlanta, GA, USA, 2–6 May 1993; pp. 560–565. [Google Scholar]
  13. Abe, Y.; Yoshiki, M. Collision avoidance method for multiple autonomous mobile agents by implicit cooperation. In Proceedings of the 2001 IEEE/RSJ International Conference on Intelligent Robots and Systems, Expanding the Societal Role of Robotics in the the Next Millennium (Cat. No. 01CH37180), Maui, HI, USA, 29 October–3 November 2001; Volume 3, pp. 1207–1212. [Google Scholar]
  14. Large, F.; Sckhavat, S.; Shiller, Z.; Laugier, C. Using non-linear velocity obstacles to plan motions in a dynamic environment. In Proceedings of the 7th International Conference on Control, Automation, Robotics and Vision, ICARCV 2002, Singapore, 2–5 December 2002; Volume 2, pp. 734–739. [Google Scholar]
  15. Wilkie, D.; Van Den Berg, J.; Manocha, D. Generalized velocity obstacles. In Proceedings of the 2009 IEEE/RSJ International Conference on Intelligent Robots and Systems, St. Louis, MO, USA, 10–15 October 2009; pp. 5573–5578. [Google Scholar]
  16. Khatib, O. Real-time obstacle avoidance for manipulators and mobile robots. In Autonomous Robot Vehicles; Springer: New York, NY, USA, 1986; pp. 396–404. [Google Scholar]
  17. Chen, Y.B.; Luo, G.C.; Mei, Y.S.; Yu, J.Q.; Su, X.L. UAV path planning using artificial potential field method updated by optimal control theory. Int. J. Syst. Sci. 2016, 47, 1407–1420. [Google Scholar] [CrossRef]
  18. Orozco-Rosas, U.; Montiel, O.; Sepúlveda, R. Mobile robot path planning using membrane evolutionary artificial potential field. Appl. Soft Comput. 2019, 77, 236–251. [Google Scholar] [CrossRef]
  19. Kavraki, L.E.; Svestka, P.; Latombe, J.C.; Overmars, M.H. Probabilistic roadmaps for path planning in high-dimensional configuration spaces. IEEE Trans. Robot. Autom. 1996, 12, 566–580. [Google Scholar] [CrossRef] [Green Version]
  20. LaValle, S.M.; Kuffner, J.J., Jr. Randomized kinodynamic planning. Int. J. Robot. Res. 2001, 20, 378–400. [Google Scholar] [CrossRef]
  21. Karaman, S.; Frazzoli, E. Incremental sampling-based algorithms for optimal motion planning. arXiv 2010, arXiv:1005.0416. [Google Scholar]
  22. Sleumer, N.; Tschichold-Gürmann, N. Exact Cell Decomposition of Arrangements Used for Path Planning in Robotics; Technical Report; ETH Zurich, Department of Computer Science: Zurich, Switzerland, 1999; Volume 329. [Google Scholar]
  23. Cai, C.; Ferrari, S. Information-driven sensor path planning by approximate cell decomposition. IEEE Trans. Syst. Man Cybern. Part B (Cybern.) 2009, 39, 672–689. [Google Scholar]
  24. Hart, P.E.; Nilsson, N.J.; Raphael, B. A formal basis for the heuristic determination of minimum cost paths. IEEE Trans. Syst. Sci. Cybern. 1968, 4, 100–107. [Google Scholar] [CrossRef]
  25. Vasconcelos, J.V.R.; Brandão, A.S.; Sarcinelli-Filho, M. Real-Time Path Planning for Strategic Missions. Appl. Sci. 2020, 10, 7773. [Google Scholar] [CrossRef]
  26. Likhachev, M.; Ferguson, D.I.; Gordon, G.J.; Stentz, A.; Thrun, S. Anytime Dynamic A*: An Anytime, Replanning Algorithm. In Proceedings of the International Conference on Automated Planning and Scheduling (ICAPS), Monterey, CA, USA, 5–10 June 2005; Volume 5, pp. 262–271. [Google Scholar]
  27. Karaman, S.; Walter, M.R.; Perez, A.; Frazzoli, E.; Teller, S. Anytime motion planning using the RRT. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 1478–1483. [Google Scholar]
  28. Mellinger, D.; Kumar, V. Minimum snap trajectory generation and control for quadrotors. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 2520–2525. [Google Scholar]
  29. Schulman, J.; Ho, J.; Lee, A.X.; Awwal, I.; Bradlow, H.; Abbeel, P. Finding Locally Optimal, Collision-Free Trajectories with Sequential Convex Optimization. In Proceedings of the Robotics: Science and Systems, Berlin, Germany, 24–28 June 2013; Volume 9, pp. 1–10. [Google Scholar] [CrossRef]
  30. Ratliff, N.; Zucker, M.; Bagnell, J.A.; Srinivasa, S. CHOMP: Gradient optimization techniques for efficient motion planning. In Proceedings of the 2009 IEEE International Conference on Robotics and Automation, Kobe, Japan, 12–17 May 2009; pp. 489–494. [Google Scholar]
  31. Zucker, M.; Ratliff, N.; Dragan, A.D.; Pivtoraiko, M.; Klingensmith, M.; Dellin, C.M.; Bagnell, J.A.; Srinivasa, S.S. Chomp: Covariant hamiltonian optimization for motion planning. Int. J. Robot. Res. 2013, 32, 1164–1193. [Google Scholar] [CrossRef] [Green Version]
  32. Kalakrishnan, M.; Chitta, S.; Theodorou, E.; Pastor, P.; Schaal, S. STOMP: Stochastic trajectory optimization for motion planning. In Proceedings of the 2011 IEEE International Conference on Robotics and Automation, Shanghai, China, 9–13 May 2011; pp. 4569–4574. [Google Scholar]
  33. Tang, S.; Thomas, J.; Kumar, V. Hold or Take Optimal Plan (HOOP): A quadratic programming approach to multi-robot trajectory generation. Int. J. Robot. Res. 2018, 37, 1062–1084. [Google Scholar] [CrossRef]
  34. Semenas, R.; Bausys, R.; Zavadskas, E.K. A Novel Environment Exploration Strategy by m-generalised q-neutrosophic WASPAS. Stud. Inform. Control 2021, 30, 19–28. [Google Scholar] [CrossRef]
  35. Farouki, R.; Goodman, T. On the optimal stability of the Bernstein basis. Math. Comput. Am. Math. Soc. 1996, 65, 1553–1566. [Google Scholar] [CrossRef] [Green Version]
  36. Cichella, V.; Kaminer, I.; Walton, C.; Hovakimyan, N. Optimal Motion Planning for Differentially Flat Systems Using Bernstein Approximation. IEEE Control Syst. Lett. 2018, 2, 181–186. [Google Scholar] [CrossRef]
  37. Cichella, V.; Kaminer, I.; Walton, C.; Hovakimyan, N.; Pascoal, A. Bernstein approximation of optimal control problems. arXiv 2018, arXiv:1812.06132. [Google Scholar]
  38. Cichella, V.; Kaminer, I.; Walton, C.; Hovakimyan, N.; Pascoal, A.M. Optimal Multi-Vehicle Motion Planning using Bernstein Approximants. IEEE Trans. Autom. Control 2020, 66, 1453–1467. [Google Scholar] [CrossRef]
  39. Kielas-Jensen, C.; Cichella, V. BeBOT: Bernstein polynomial toolkit for trajectory generation. In Proceedings of the 2019 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), Macau, China, 3–8 November 2019; pp. 3288–3293. [Google Scholar]
  40. Kielas-Jensen, C.; Cichella, V. BeBOT. Available online: https://github.com/caslabuiowa/BeBOT (accessed on 21 May 2020).
  41. Bézier, P. Definition numerique des courbes et surface. Automatisme 1966, 11, 625–632. [Google Scholar]
  42. Bézier, P. Définition numérique des courbes et surfaces (ii). Automatisme 1967, 12, 17–21. [Google Scholar]
  43. Forrest, A.R. Interactive interpolation and approximation by Bézier polynomials. Comput. J. 1972, 15, 71–79. [Google Scholar] [CrossRef]
  44. Chang, J.W.; Choi, Y.K.; Kim, M.S.; Wang, W. Computation of the minimum distance between two Bézier curves/surfaces. Comput. Graph. 2011, 35, 677–684. [Google Scholar] [CrossRef]
  45. Gilbert, E.G.; Johnson, D.W.; Keerthi, S.S. A fast procedure for computing the distance between complex objects in three-dimensional space. IEEE J. Robot. Autom. 1988, 4, 193–203. [Google Scholar] [CrossRef] [Green Version]
  46. Van Den Bergen, G. Proximity queries and penetration depth computation on 3d game objects. In Proceedings of the Game Developers Conference, San Jose, CA, USA, 20–24 March 2001; Volume 170. [Google Scholar]
  47. Kielas-Jensen, C.; Cichella, V. Trajectory Generation Using Bernstein Polynomials (Bézier Curves). Available online: https://www.youtube.com/watch?v=e0SPt92W578 (accessed on 31 July 2019).
  48. Programming Language C Standard; International Organization for Standardization: Geneva, Switzerland, 1999.
  49. Patterson, A.; Lakshmanan, A.; Hovakimyan, N. Intent-aware probabilistic trajectory estimation for collision prediction with uncertainty quantification. In Proceedings of the 2019 IEEE 58th Conference on Decision and Control (CDC), Nice, France, 11–13 December 2019; pp. 3827–3832. [Google Scholar]
  50. Hauser, J.; Saccon, A. A barrier function method for the optimization of trajectory functionals with constraints. In Proceedings of the 45th IEEE Conference on Decision and Control, San Diego, CA, USA, 13–15 December 2006; pp. 864–869. [Google Scholar]
  51. Zhang, X.; Liniger, A.; Borrelli, F. Optimization-based collision avoidance. IEEE Trans. Control. Syst. Technol. 2020, 29, 972–983. [Google Scholar] [CrossRef] [Green Version]
  52. Lee, B.G.; Park, Y. Distance for Bézier curves and degree reduction. Bull. Aust. Math. Soc. 1997, 56, 507–515. [Google Scholar] [CrossRef] [Green Version]
  53. Prautzsch, H.; Kobbelt, L. Convergence of subdivision and degree elevation. Adv. Comput. Math. 1994, 2, 143–154. [Google Scholar] [CrossRef]
  54. Farin, G. Algorithms for rational Bézier curves. Comput.-Aided Des. 1983, 15, 73–77. [Google Scholar] [CrossRef]
Figure 1. Spatial representation of two Bernstein polynomial trajectories in 2D near a circular obstacle. Trajectory C [ 1 ] ( t ) is drawn in blue and trajectory C [ 2 ] ( t ) is drawn in orange. The solid lines are the polynomials and the dashed lines connect the Bernstein coefficients for convenience. Note that the temporal aspect of the trajectories above has been omitted for clarity of presenting the geometric properties of Bernstein polynomials.
Figure 1. Spatial representation of two Bernstein polynomial trajectories in 2D near a circular obstacle. Trajectory C [ 1 ] ( t ) is drawn in blue and trajectory C [ 2 ] ( t ) is drawn in orange. The solid lines are the polynomials and the dashed lines connect the Bernstein coefficients for convenience. Note that the temporal aspect of the trajectories above has been omitted for clarity of presenting the geometric properties of Bernstein polynomials.
Sensors 22 01869 g001
Figure 2. Trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange) with their endpoints highlighted in 2D.
Figure 2. Trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange) with their endpoints highlighted in 2D.
Sensors 22 01869 g002
Figure 3. Convex hulls drawn as black dotted lines around the Bernstein coefficients of trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange). The dashed lines connect the control points of their corresponding trajectories.
Figure 3. Convex hulls drawn as black dotted lines around the Bernstein coefficients of trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange). The dashed lines connect the control points of their corresponding trajectories.
Sensors 22 01869 g003
Figure 4. Trajectories C [ 1 ] ( t ) (split into blue and green) and C [ 2 ] ( t ) (split into orange and red) split at t div = 15 s. Convex hulls are drawn around the Bernstein coefficients of the new split trajectories.
Figure 4. Trajectories C [ 1 ] ( t ) (split into blue and green) and C [ 2 ] ( t ) (split into orange and red) split at t div = 15 s. Convex hulls are drawn around the Bernstein coefficients of the new split trajectories.
Sensors 22 01869 g004
Figure 5. Convex hull drawn around the elevated Bernstein coefficients of trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange).
Figure 5. Convex hull drawn around the elevated Bernstein coefficients of trajectories C [ 1 ] ( t ) (blue) and C [ 2 ] ( t ) (orange).
Sensors 22 01869 g005
Figure 6. Squared speed of the trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) . A convex hull is drawn around the Bernstein coefficients. Note that even though the coefficients may be negative, the actual curve is not.
Figure 6. Squared speed of the trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) . A convex hull is drawn around the Bernstein coefficients. Note that even though the coefficients may be negative, the actual curve is not.
Sensors 22 01869 g006
Figure 7. Illustration of the quantity expressed in Equation (8) for trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) .
Figure 7. Illustration of the quantity expressed in Equation (8) for trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) .
Sensors 22 01869 g007
Figure 8. Angular rates of trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) . Note that the angular rates are rational Bernstein polynomials.
Figure 8. Angular rates of trajectories C [ 1 ] ( t ) and C [ 2 ] ( t ) . Note that the angular rates are rational Bernstein polynomials.
Sensors 22 01869 g008
Figure 9. Squared distance between trajectories and the center of the circular obstacle.
Figure 9. Squared distance between trajectories and the center of the circular obstacle.
Sensors 22 01869 g009
Figure 10. Two 3D Bernstein polynomial trajectories near a spherical obstacle. Trajectory C [ 3 ] ( t ) is drawn in blue and trajectory C [ 4 ] ( t ) is drawn in orange.
Figure 10. Two 3D Bernstein polynomial trajectories near a spherical obstacle. Trajectory C [ 3 ] ( t ) is drawn in blue and trajectory C [ 4 ] ( t ) is drawn in orange.
Sensors 22 01869 g010
Figure 11. 3D trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) with their endpoints highlighted.
Figure 11. 3D trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) with their endpoints highlighted.
Sensors 22 01869 g011
Figure 12. 3D convex hulls drawn as transparent blue surfaces around the Bernstein coefficients of trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) .
Figure 12. 3D convex hulls drawn as transparent blue surfaces around the Bernstein coefficients of trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) .
Sensors 22 01869 g012
Figure 13. Trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) split at t div = 15 s. Convex hulls are drawn around the Bernstein coefficients of the new split trajectories.
Figure 13. Trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) split at t div = 15 s. Convex hulls are drawn around the Bernstein coefficients of the new split trajectories.
Sensors 22 01869 g013
Figure 14. Convex hull drawn around the elevated Bernstein coefficients of trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) .
Figure 14. Convex hull drawn around the elevated Bernstein coefficients of trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) .
Sensors 22 01869 g014
Figure 15. Squared speed of the trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) . A convex hull is drawn around the Bernstein coefficients. Note that even though the coefficients may be negative, the actual curve is not.
Figure 15. Squared speed of the trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) . A convex hull is drawn around the Bernstein coefficients. Note that even though the coefficients may be negative, the actual curve is not.
Sensors 22 01869 g015
Figure 16. Squared acceleration of the trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) with corresponding convex hulls.
Figure 16. Squared acceleration of the trajectories C [ 3 ] ( t ) and C [ 4 ] ( t ) with corresponding convex hulls.
Sensors 22 01869 g016
Figure 17. Squared distances between the trajectories and then center of the spherical obstacle.
Figure 17. Squared distances between the trajectories and then center of the spherical obstacle.
Sensors 22 01869 g017
Figure 18. Bounds for Bernstein polynomials. The solid blue line is the Bernstein polynomial, the dashed lines connect the coefficients of each different order, the black dotted line represents the convex hull of the 5th degree Bernstein polynomial, and the red dotted lines represent the actual extrema.
Figure 18. Bounds for Bernstein polynomials. The solid blue line is the Bernstein polynomial, the dashed lines connect the coefficients of each different order, the black dotted line represents the convex hull of the 5th degree Bernstein polynomial, and the red dotted lines represent the actual extrema.
Sensors 22 01869 g018
Figure 19. (a) Minimum distance between curves. (b) Minimum distance between a curve and a polygon. All distances are measured to the blue curve. A red curve or polygon indicates that a collision exists.
Figure 19. (a) Minimum distance between curves. (b) Minimum distance between a curve and a polygon. All distances are measured to the blue curve. A red curve or polygon indicates that a collision exists.
Sensors 22 01869 g019
Figure 20. Illustration of penetration.
Figure 20. Illustration of penetration.
Sensors 22 01869 g020
Figure 21. Iteration of the DEPA algorithm.
Figure 21. Iteration of the DEPA algorithm.
Sensors 22 01869 g021
Figure 22. Two intersecting polygons and resulting Minkowski Difference.
Figure 22. Two intersecting polygons and resulting Minkowski Difference.
Sensors 22 01869 g022
Figure 23. Time optimal trajectory for vehicle with initial and final speeds and headings, maximum speed, maximum angular rate, and maximum safe distance constraints ranging from least to most conservative distance estimates.
Figure 23. Time optimal trajectory for vehicle with initial and final speeds and headings, maximum speed, maximum angular rate, and maximum safe distance constraints ranging from least to most conservative distance estimates.
Sensors 22 01869 g023
Figure 24. Plot of the squared speed constraints for each separate trial.
Figure 24. Plot of the squared speed constraints for each separate trial.
Sensors 22 01869 g024
Figure 25. Plot of the angular rate constraints for each separate trial.
Figure 25. Plot of the angular rate constraints for each separate trial.
Sensors 22 01869 g025
Figure 26. Commercial flight trajectories between major US cities.
Figure 26. Commercial flight trajectories between major US cities.
Sensors 22 01869 g026
Figure 27. Verifying speed constraints for the Air Traffic Control example.
Figure 27. Verifying speed constraints for the Air Traffic Control example.
Sensors 22 01869 g027
Figure 28. Verifying angular rate constraints for the Air Traffic Control example.
Figure 28. Verifying angular rate constraints for the Air Traffic Control example.
Sensors 22 01869 g028
Figure 29. Verifying minimum safe distance constraints for the Air Traffic Control example.
Figure 29. Verifying minimum safe distance constraints for the Air Traffic Control example.
Sensors 22 01869 g029
Figure 30. Aerial vehicles navigating a cluttered environment.
Figure 30. Aerial vehicles navigating a cluttered environment.
Sensors 22 01869 g030
Figure 31. Overtaking trajectory. The track follows a quarter circle whose center point is at q . The inner track line has a radius of r i n n e r and the outer track line has a radius of r o u t e r .
Figure 31. Overtaking trajectory. The track follows a quarter circle whose center point is at q . The inner track line has a radius of r i n n e r and the outer track line has a radius of r o u t e r .
Sensors 22 01869 g031
Figure 32. Squared speed profile of the vehicle.
Figure 32. Squared speed profile of the vehicle.
Sensors 22 01869 g032
Figure 33. Angular rate profile of the vehicle.
Figure 33. Angular rate profile of the vehicle.
Sensors 22 01869 g033
Figure 34. Squared distance between vehicle and opponent.
Figure 34. Squared distance between vehicle and opponent.
Sensors 22 01869 g034
Figure 35. 101 vehicles spelling out CAS using the centralized method.
Figure 35. 101 vehicles spelling out CAS using the centralized method.
Sensors 22 01869 g035
Figure 36. Trajectories for 1000 aerial vehicles with initial and final position and minimum safety distance constraints.
Figure 36. Trajectories for 1000 aerial vehicles with initial and final position and minimum safety distance constraints.
Sensors 22 01869 g036
Figure 37. Medusa Example.
Figure 37. Medusa Example.
Sensors 22 01869 g037
Figure 38. Trajectory of a single agent visiting 30 neighborhoods. The circles with an X in their center represent the neighborhoods and the circles along the vehicle’s trajectory represent the points at which the vehicle makes its delivery.
Figure 38. Trajectory of a single agent visiting 30 neighborhoods. The circles with an X in their center represent the neighborhoods and the circles along the vehicle’s trajectory represent the points at which the vehicle makes its delivery.
Sensors 22 01869 g038
Figure 39. Velocity components of a single agent visiting 30 neighborhoods.
Figure 39. Velocity components of a single agent visiting 30 neighborhoods.
Sensors 22 01869 g039
Figure 40. Acceleration components of a single agent visiting 30 neighborhoods.
Figure 40. Acceleration components of a single agent visiting 30 neighborhoods.
Sensors 22 01869 g040
Figure 41. Two agents visiting ten neighborhoods each.
Figure 41. Two agents visiting ten neighborhoods each.
Sensors 22 01869 g041
Figure 42. Ten agents visiting ten neighborhoods each.
Figure 42. Ten agents visiting ten neighborhoods each.
Sensors 22 01869 g042
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Kielas-Jensen, C.; Cichella, V.; Berry, T.; Kaminer, I.; Walton, C.; Pascoal, A. Bernstein Polynomial-Based Method for Solving Optimal Trajectory Generation Problems. Sensors 2022, 22, 1869. https://doi.org/10.3390/s22051869

AMA Style

Kielas-Jensen C, Cichella V, Berry T, Kaminer I, Walton C, Pascoal A. Bernstein Polynomial-Based Method for Solving Optimal Trajectory Generation Problems. Sensors. 2022; 22(5):1869. https://doi.org/10.3390/s22051869

Chicago/Turabian Style

Kielas-Jensen, Calvin, Venanzio Cichella, Thomas Berry, Isaac Kaminer, Claire Walton, and Antonio Pascoal. 2022. "Bernstein Polynomial-Based Method for Solving Optimal Trajectory Generation Problems" Sensors 22, no. 5: 1869. https://doi.org/10.3390/s22051869

APA Style

Kielas-Jensen, C., Cichella, V., Berry, T., Kaminer, I., Walton, C., & Pascoal, A. (2022). Bernstein Polynomial-Based Method for Solving Optimal Trajectory Generation Problems. Sensors, 22(5), 1869. https://doi.org/10.3390/s22051869

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop