Next Article in Journal
Multi-Objective Resource-Constrained Scheduling in Large and Repetitive Construction Projects
Previous Article in Journal
Editorial for the Special Issue on “Recent Advances in Nonsmooth Optimization and Analysis”
Previous Article in Special Issue
Analysis of a Two-Step Gradient Method with Two Momentum Parameters for Strongly Convex Unconstrained Optimization
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Non-Smooth Numerical Optimization Approach to the Three-Point Dubins Problem (3PDP)

1
Department of Industrial Engineering, University of Trento, Via Sommarive 9, 38123 Trento, Italy
2
Faculty of Engineering, Free University of Bozen-Bolzano, Piazza Università 1, 39100 Bolzano, Italy
*
Author to whom correspondence should be addressed.
These authors contributed equally to this work.
Algorithms 2024, 17(8), 350; https://doi.org/10.3390/a17080350
Submission received: 9 July 2024 / Revised: 6 August 2024 / Accepted: 8 August 2024 / Published: 10 August 2024

Abstract

:
This paper introduces a novel non-smooth numerical optimization approach for solving the Three-Point Dubins Problem (3PDP). The 3PDP requires determining the shortest path of bounded curvature that connects given initial and final positions and orientations while traversing a specified waypoint. The inherent discontinuity of this problem precludes the use of conventional optimization algorithms. We propose two innovative methods specifically designed to address this challenge. These methods not only effectively solve the 3PDP but also offer significant computational efficiency improvements over existing state-of-the-art techniques. Our contributions include the formulation of these new algorithms, a detailed analysis of their theoretical foundations, and their implementation. Additionally, we provide a thorough comparison with current leading approaches, demonstrating the superior performance of our methods in terms of accuracy and computational speed. This work advances the field of path planning in robotics, providing practical solutions for applications requiring efficient and precise motion planning.

1. Introduction

One of the central problems in robotics is motion, or path planning, which accounts for computing a feasible path (possibly an optimal one, for some design criterion) for a robot moving from a starting configuration to a final one. A configuration can be just the position, but can also contain additional information like the orientation or the curvature. A feasible path can be required to pass along fixed or moving obstacles or to follow internal waypoints [1,2,3]. Other physical limitations that restrict the path’s shape are differential constraints, called nonholonomic, which characterize a vehicle’s trajectories. An important one is the requirement of bounded curvature, which asks that the path does not have excessive sharp turns because the robot can steer up to a minimum turning radius ρ min , which is defined as the inverse of the maximum curvature of the path, κ max = 1 ρ min . As an optimality criterion, minimizing the path length is very common. Another common assumption is that the vehicle travels at a constant speed; thus, the shortest path is equivalent to the other important optimization functional, the minimum time. However, this can be extended and completed by combining motion primitives [4,5,6].
The mathematical model containing all these design requirements is the Markov–Dubins problem, which is defined formally as follows. A Markov–Dubins path (MDP) [7] between two assigned points in R 2 , P i = ( x i , y i ) and P f = ( x f , y f ) , with angles ϑ i and ϑ f is the C 1 and piecewise C 2 path of minimum length γ : [ 0 , L ] R 2 such that the absolute value of the curvature of the path γ , at almost every point, is not greater than κ max > 0 ; see [8]. The problem, originally formulated by Markov in 1889 was solved only in 1957 by Dubins [9], who proved that there are six extremal solutions to the associated optimal control problem:
Minimize L = 0 L 1 d subject to | u ( ) | κ max ,
x ( ) = cos ( θ ( ) ) , y ( ) = sin ( θ ( ) ) , θ ( ) = u ( ) , x ( 0 ) = x i , y ( 0 ) = y i , θ ( 0 ) = ϑ i , x ( L ) = x f , y ( L ) = y f , θ ( L ) = ϑ f .
Each extremal is composed of at most three internal arcs. This sequence of curves can be written as words: L S R , R L R , L S L , etc., where L, S, and R represent a left turn, straight segment, and right turn, respectively. A more compact notation is obtained by writing C for an arc of a circle and S for a straight line segment. Not all possible combinations of curves are optimal; it has been proved that the optimal words are only [8,10] C S C , C S , S C , S , C C C , C C , and C. Thus, there are 15 possible combinations: L S L , L S R , R S L , R S R , R L R , L R L , L S , R S , S L , S R , S , L R , R L , L , R .
In practice, only the first six words are considered; the others can be obtained by setting some of their arcs to zero. However, there is no way to know in advance which of the six words is the shortest, and usually, the solution is found through trial-and-error (or brute force) enumeration of all six. A recent method to avoid this trial-and-error procedure employs Machine Learning to train an AI to determine the optimal solution without the need to enumerate all candidate solutions [11].
The Multipoint Markov–Dubins Problem (MPMDP) generalizes the classic problem to a sequence of assigned planar points P 0 , , P n using interpolation with Dubins paths [12,13]. The initial and final angles, ϑ 0 and ϑ n , are assigned, while the other intermediate angles ϑ j , for  j = 1 , , n 1 , are free and thus are unknowns of the problem. Even for a few points, the brute force method, i.e., trying all cases for each pair of consecutive points, becomes rapidly infeasible due to the exponential growth of possible test cases. Recent solutions to the multipoint problem are based on a Non-Linear Programming approach (NLP) [12,13] or Mixed-Integer Non-Linear Programming (MINLP) [12]. The most effective technique is actually the iDPP method based on the Iterative Dynamic Programming Principle [12] and is suitable for parallel computing architectures on CPUs as well as on GPUs [14].
A special case of the MPMDP requires finding an obstacle-free path through three points, which is a problem with name and importance: 3PDP—Three-Point Dubins Problem. Despite being a subcase of the solved MPMDP case, the 3PDP has received special attention in the last decade because of its application as a subroutine in a high-level planner for the Dubins Traveling Salesman Problem (DTSP) [15,16,17]. This subroutine is used to insert a new point in an existing path; therefore, the initial, the new middle, and the final point are specified, as well as the initial and final angles. Thus, the 3PDP reduces to the one-dimensional problem of finding the angle corresponding to the central point, so that the curvature constraint is satisfied, and the minimum length is preserved. To solve this non-smooth minimization problem, several methods can be employed [18,19,20].
The crucial point of interest in this special instance of the MPMDP is the computational time: since it is called repeatedly as a subroutine of the DTSP, the solutions based on brute force, Dynamic Programming, or NLP/MINLP are considered too inefficient because of the considerable overhead. Therefore, a solution to this problem has been sought, as detailed in the next section, aiming at computational efficiency.

1.1. Problem Formulation

The 3PDP is formulated as follows: given an initial point P i = ( x i , y i ) with orientation ϑ i , a middle point P m = ( x m , y m ) , and a final point P f = ( x f , y f ) with orientation ϑ f , find the shortest concatenation of two Dubins paths that begin in P i , pass through P m , and reach P f while respecting the constraints of having the maximum absolute curvature not exceeding κ max ; see Figure 1. The problem is clearly one-dimensional, with the angle ϑ m at P m being the only unknown of the problem. Once ϑ m is determined, the solution becomes trivial, since it is just twice the application of the standard Dubins problem.
Despite being formally simple, the 3PDP is quite involved: the function of the total length to be minimized is, indeed, not continuous and thus non-smooth. Therefore, classic optimization methods cannot be applied, and different methods are required [19,21].

1.2. Paper Contribution and Layout

Our research presents an efficient and compact solution to the Three-Point Dubins Problem (3PDP), addressing the non-smooth minimization challenge. Our key contributions are as follows:
  • Analytical Derivative Computation: We formulated a compact, closed-form solution for the Markov–Dubins problem. With this formulation, we significantly reduce computational overhead and improve the efficiency. This is instrumental to finding the analytical expressions for the derivatives of the Dubins path length with respect to the initial and final angles. These expressions allow for a more precise and faster computation of path lengths and gradients, enabling a better optimization performance. Additionally, we established bounds for the existence regions of each of the six possible solutions. With this analysis, we can isolate discontinuities and provide a more accurate and efficient solution to the 3PDP.
  • Optimal Path Length and Derivative Analysis: We computed the length and derivatives of the optimal 3PDP path, precisely framing it as a non-smooth minimization problem.
  • Introduction of Two Non-smooth Minimization Methods: We propose two specialized non-smooth minimization algorithms tailored for the 3PDP:
    A pattern search algorithm, which can be further enhanced with Algorithm 748 [22].
    A trichotomy algorithm, similarly augmentable with Algorithm 748.
    Algorithm 748 can be used to perform the root-finding of the first derivatives of the path length, improving the efficiency and accuracy of the solution up to machine precision.
  • Implementation and Accessibility: We provided a comprehensive implementation of our algorithms in a C++ library with a Matlab interface, named Clothoids [23,24]. The library, along with clear descriptions and pseudocode of the algorithms, is freely available and open-source, facilitating further research and practical applications, bridging the gap between theoretical research and practitioners, ensuring that our work can be readily used and extended by others.
This paper is structured as follows: Section 2 gives insight into the 3PDP and presents state-of-the-art methods on the subject. Section 3 develops the solution to the standard Dubins problem and, in particular, the length of the solution as a function of the givens of the problem. Our novel derivation allows us to compute the derivatives of the lengths of the various cases, as shown in Section 4. In Section 5, we detail our solution of the 3PDP, comprising all cases. The corresponding algorithms are discussed in Section 6 and tested in Section 7. Finally, we present our conclusions in Section 8.

2. Background and State-of-the-Art Methods

Several results approximate the solution of the MPMDP under the hypothesis that the distance between consecutive points is at least d : = 4 ρ min = 4 / κ max , a condition that implies that only CSC paths will constitute the solution, so that cases CCC are not considered. Under this hypothesis, in defining the angles at the waypoints as the angles of the line segment connecting the adjacent points in the sequence, the approximation yields a path that is not more than 1.91 times longer than the optimal one. Without the d > d distance assumption, there is a method to construct a path that is at most 5.03 times longer than the optimal, a factor which decreases to 2.58 if the distance between the points is more than d [25,26].
Apart from the bounds, some exact results can be derived and computed in different ways, covering some or all the possible feasible paths.
The first exact result in the problem of visiting an ordered sequence of waypoints with a Dubins path is given in [25,27,28], under the assumption that the distance between consecutive points is at least d , thus considering the CSC cases only. It is shown that the problem becomes locally convex over an open region; however, this region is not even connected, and therefore, 2 n 2 subproblems must be solved, each containing a local minimum of the original problem. In their analysis, the authors reduce the complexity to 2 k , with k being the number of sharp turns of the path.
A different approach, based on inversive geometry [26], proposes an iterative method (IM) to solve the 3PDP with a 3 × 3 non-linear system of equations to find the optimal angle at the middle point for paths CSC-CSC (or shorter words). This method that combines geometric arguments with the bisection algorithm is compared with the brute force method of discretizing the middle angle with 360 samples and testing all cases (called the discretization-based method—DBM [29,30]), showing a computational time improvement ranging from a factor of about 14 in the best case, for points that have a distance greater than d , to a worse case improvement of a factor of 5 for points that are closer than d . Regarding accuracy, the iterative method in [26] is generally more precise than the brute force DBM. However, it does not cover the cases where the path contains a CCC word.
An approach that covers all cases and is based on algebraic methods is the one proposed in [31], where the trigonometric relations that characterize the solution are transformed into polynomials of relatively high degree, from 4 to 20. In the paper, it is discussed that although, in principle, there are 6 × 6 potential path types (4 CSCs and 2 CCCs for each pair of points), of these 36 cases, only 18 are optimal candidates; see Table 1.
The algorithm requires constructing and finding the (real) roots of these 18 polynomials and, for each admissible root, testing the length of the path. The angle corresponding to the shortest length is elected as the optimal angle at the midpoint. This method is called the polynomial-based method, PBM, and requires, in the worst case, the computation of 2 × 4 + 2 × 6 + 10 × 8 + 4 × 20 = 180 pairs of Dubins paths, plus the time to find up to their 180 roots. Depending on the distance of the points, this method achieves a speed-up ranging from 25 to 45 times the speed of the DBM with 360 samples [31].
A recent method [28] is based on geometrical observations and solves the case for points having a distance larger than d ; thus, the cases are CSC (but not CCC). It takes the name of the geometry-based method or GBM. This method is purely geometrical and bases the solution on the construction of a special ellipse. The solution is computed by building circles of radius ρ min with tangents on the initial and final points (four possible circles). Then, an ellipse is defined by its foci laying in the previously built circle centers. The ellipse must be tangent to the circle of radius ρ min centered in the middle point.
The optimal angle is given by the angle of the common tangent to the ellipse and the circle centered at the middle point, and a semi-analytical solution to the problem is provided. The computational improvement over the DBM is of a factor of 150, and it can find a shorter solution in about 92 % of the instances: if the path contains a CSC word, the solution will be exact and thus better than the DBM, but not when the path contains a CCC.

3. Derivation of Dubins Path with Trigonometry

This section is devoted to deriving the solution of the classic Dubins problem to obtain analytic relations for the optimal lengths so that the next section can compute their derivatives.
Without loss of generality, the original problem (1) can be transformed into a simpler one by translating, rotating, and scaling the original configuration such that x i = y i = 0 , and  x f = d , y f = 0 with a unitary maximum curvature of κ max = 1 . Let d be the Euclidean distance between the initial and final points scaled by the maximum curvature:
d = ( x f x i ) 2 + ( y f y i ) 2 / κ max .
Then, the aforementioned transform is the following, (3): the translation is given by ( x i , y i ) and is followed by a rotation around ( 0 , 0 ) by an angle ϕ given by ϕ = atan 2 ( y f y i , x f x i ) , followed by a scaling of κ max 1 = ρ min , or compactly,
x y = 1 κ max cos ϕ sin ϕ sin ϕ cos ϕ x x i y y i .
Let α = ϑ i + ϕ and β = ϑ f + ϕ be the initial and final angles in the transformed coordinate system. The new initial point is thus the origin with angle α , and the final point is on the positive x -axis at distance d, (2), from the origin and angle β with maximum unitary curvature.
The solution to a Dubins problem is a sequence of three curves (lines or arcs [32]) that can be written in the following form for  j 0 , 1 , 2 :
j th curve : x ( ) = x j + s ( sin ( ϑ j + s ) sin θ j ) + ( 1 s 2 ) cos θ j , y ( ) = y j + s ( cos θ j cos ( ϑ j + s ) ) + ( 1 s 2 ) sin θ j , θ ( ) = ϑ j + s ,
where is the curvilinear abscissa, x ( ) and y ( ) are the coordinates, and θ ( ) is the orientation. Let us define x 0 = y 0 = 0 and ϑ 0 = α , corresponding to the initial point. Notice that, when the integer variable s is equal to 0, the function represents a line segment, whereas, when s = 1 , the curve is an arc of a unitary circle turning left, and, when s = 1 , the circle is turning right.
The Dubins problem is formulated with three internal segments (CSC or CCC) with known initial and final coordinates and headings in the transformed coordinate system. Hence, we can juxtapose three of such curves. Using the notation s 1 , s 2 , and s 3 for the signs of the curvature of the three segments coming from (4), we can write the equations for the three segments:
x 1 = 0 + s 1 ( sin ϑ 1 sin α ) y 1 = 0 + s 1 ( cos α cos ϑ 1 ) ϑ 1 = α + s 1 1 x 2 = x 1 + s 2 ( sin ϑ 2 sin ϑ 1 ) + ( 1 s 2 2 ) 2 cos ϑ 1 y 2 = y 1 + s 2 ( cos ϑ 1 cos ϑ 2 ) + ( 1 s 2 2 ) 2 sin ϑ 1 ϑ 2 = ϑ 1 + s 2 2 0 = x 2 + s 3 ( sin β sin ϑ 2 ) d = y 2 + s 3 ( cos ϑ 2 cos β ) β = ϑ 2 + s 3 3 .
The proposed transformation simplifies the equations, eliminating x 1 , x 2 , y 1 , y 2 , ϑ 1 , and ϑ 2 from the general system (5). Moreover, we can separate two families of solutions based on the presence or absence of the middle singular arc (straight line segment), that is, the CSC and CCC cases.
Before proceeding, it is also convenient to define some notation and shorthand for the trigonometric functions of the angles α and β that will be used in the following sections, to specify that the expression depends on trigonometric combinations of α and β :
S = sin α sin β C = cos α cos β S + = sin α + sin β C + = cos α + cos β P α , β = { sin α , cos α , sin β , cos β }
where P α , β denotes a set of the trigonometric functions of the angles α and β . We remark that S ± and C ± are functions of P α , β , but we drop the explicit dependence on P α , β to keep the notation light.
For all three cases, we want to compute the total length of the path, which is the sum of the lengths of the three segments.
= 1 + 2 + 3 .

3.1. Case CSC

This case happens when s 2 = 0 and, depending on the sign of s 1 and s 3 , gives origin to the curves LSL, RSR, LSR, and RSL. Then, system (5) simplifies to
d = s 1 ( sin ϑ 1 sin α ) + 2 cos ϑ 1 + s 3 ( sin β sin ϑ 2 ) 0 = s 1 ( cos α cos ϑ 1 ) + 2 sin ϑ 1 + s 3 ( cos ϑ 2 cos β ) ,
and by imposing the continuity conditions to (8) on the angle of the line segment ϑ 1 = ϑ 2 = ϑ S = α + s 1 1 = β s 3 3 , we have
d = ( s 1 s 3 ) sin ϑ S s 1 sin α + s 3 sin β + 2 cos ϑ S 0 = ( s 3 s 1 ) cos ϑ S + s 1 cos α s 3 cos β + 2 sin ϑ S .
We combine these two Equation in (9), multiplying by sin ϑ S and cos ϑ S , respectively, and we obtain an explicit expression for 2 and an implicit expression for ϑ S :
2 = ( d s 3 sin β + s 1 sin α ) cos ϑ S + ( s 3 cos β s 1 cos α ) sin ϑ S 0 = ( d s 3 sin β + s 1 sin α ) sin ϑ S ( s 3 cos β s 1 cos α ) cos ϑ S + s 3 s 1 .
This case can be further separated into two subcases, the first, C S C + , with the two circular arcs turning in the same direction (LSL and RSR), and the other, C S C , with circular arcs in the opposite direction (LSR and RSL). They have two different solutions, as detailed below.

3.1.1. The Subcase C S C + : LSL and RSR

As stated in the previous section, this solution type falls into the CSC + case, where s 2 = 0 and s 1 = s 3 = s . Hence, we can rewrite Equation (10) in terms of the parameters P α , β using notation (6) as follows:
( d + s S ) sin ϑ S + s C cos ϑ S = 0 ( d + s S ) cos ϑ S s C sin ϑ S = 2 .
From the first equation, we can solve for ϑ S , and the second is already solved for 2 , as a function of ϑ S . Thus, we have
ϑ S CSC + = atan 2 C , d + s S mod π .
We choose the only ϑ S producing a non-negative 2 . Any ϑ S not respecting this constraint is discarded. The length 2 is obtained from (11), knowing the solution in (12), and from the condition ϑ 1 = ϑ 2 = ϑ S = α + s 1 = β s 3 , we can derive the other lengths 1 and 3 , which are as follows:
1 CSC + = s ( ϑ S CSC + α ) mod 2 π 2 CSC + = ( d + s S ) cos ϑ S CSC + s C sin ϑ S CSC + 3 CSC + = s ( β ϑ S CSC + ) mod 2 π .

3.1.2. The Subcase C S C : LSR and RSL

This solution type falls into the C S C case, where s 2 = 0 , s 1 = s , and s 3 = s . It is possible to rewrite Equation (10) in terms of the parameters P α , β using notation (6) as follows:
( d + s S + ) sin ϑ S + s C + cos ϑ S = 2 s ( d + s S + ) cos ϑ S s C + sin ϑ S = 2 .
We can substitute the expression for ϑ S to obtain a polynomial equation as a function of the auxiliary variable X.
ϑ S = π + 2 arctan ( X ) , cos ϑ S = X 2 1 X 2 + 1 , sin ϑ S = 2 X X 2 + 1 .
Therefore, using (15) in (14), multiplying by ( X 2 + 1 ) , and using s 2 = 1 , we can obtain a quadratic equation in X as follows:
0 = ( 2 C + ) X 2 + 2 ( s d + S + ) X + ( 2 + C + ) .
Hence, once the polynomial equation is solved. We can substitute the expression for ϑ S in (14), derive the lengths 2 , and retrieve 1 and 3 with the following: 
ϑ S CSC = atan 2 ( 2 X , X 2 1 ) .
If | 2 S + | 1 , the polynomial in (16) is not well posed and ill conditioned. Therefore, we can change the coordinates to X = 1 / Y to reshape the polynomial, yielding the following expression:
ϑ S = π + 2 arctan ( 1 / Y ) , cos ϑ S = 1 Y 2 Y 2 + 1 , sin ϑ S = 2 Y Y 2 + 1 .
From the condition ϑ 1 = ϑ 2 = ϑ S = α + s 1 1 = β s 3 3 and (14), (15), or (18), we can derive the lengths 1 , 2 , and  3 , recalling also (17), as follows: 
1 CSC = s ( ϑ S CSC α ) mod ( 2 π ) 2 CSC = ( d + s S + ) cos ϑ S CSC s C + sin ϑ S CSC 3 CSC = s ( ϑ S CSC β ) mod ( 2 π ) .

3.1.3. Range of the Solution

The solution exists only for angles coming from real roots of polynomial (16). The discriminant D CSC + of that polynomial is
1 4 D CSC + = ( s d + S + ) 2 ( 2 C + ) ( 2 + C + ) = 2 s d ( sin α + sin β ) + sin α sin β + cos α cos β + d 2 2 ,
In introducing new variables Z and W, defined by the relations α = 2 arctan Z and β = 2 arctan W , it is possible to convert the trigonometric expressions into polynomials. Substituting each of these relations into the discriminant in (20), we obtain two polynomials:
P CSC + ( Z ; β ) = ( s d sin β cos β + t ) Z 2 + 2 ( s d + sin β ) Z + s d sin β + cos β + t , P CSC + ( W ; α ) = ( s d sin α cos α + t ) W 2 + 2 ( s d + sin α ) W + s d sin α + cos α + t ,
where t = d 2 2 1 . The real roots of P CSC + ( Z ; β ) represent the border of the range interval where α can run, to obtain a solution for the C S C + problem for a fixed β . The same holds for P CSC + ( W ; α ) for the interval range of β .
The range detection is fundamental in the solution to the 3PDP. In general, the length of the 3PDP is a discontinuous function of the middle angle (see Figure 2). Standard direct search [33,34] and non-smooth minimization algorithms [35,36] can fail to find the solution if evaluation points are located in a small discontinuity region (see Figure 3). Hence, our proposed approach, discussed in the later sections, employs the solution of polynomial (21) to isolate the discontinuity points and treat them separately in the minimization algorithm.
The range detection is fundamental to finding the points that are candidate to be points of discontinuity of the length of the Dubins path with respect to initial or final angles α and β .

3.2. Case C C C

The CCC case, happening when s 2 0 , comprises two paths: LRL and RLR. In this situation, we can impose s 1 = s 3 = s 2 = s and simplify (5) to obtain
s d = ( sin ϑ 1 sin α ) ( sin ϑ 2 sin ϑ 1 ) + ( sin β sin ϑ 2 ) 0 = ( cos α cos ϑ 1 ) ( cos ϑ 1 cos ϑ 2 ) + ( cos ϑ 2 cos β ) .
Equation (22) can be rewritten in compact form as
s d = 2 ( sin ϑ 1 sin ϑ 2 ) + sin β sin α 0 = 2 ( cos ϑ 2 cos ϑ 1 ) + cos α cos β β = α + s ( 1 2 + 3 ) .
We can state Equation (23) in terms of the parameters P α , β using notation (6) as
s d = 2 ( sin ϑ 1 sin ϑ 2 ) S 0 = 2 ( cos ϑ 2 cos ϑ 1 ) + C .
From (24) and squaring, we obtain
1 4 ( s d + S ) 2 = ( sin ϑ 1 sin ϑ 2 ) 2 = sin ϑ 1 2 + sin ϑ 2 2 2 sin ϑ 1 sin ϑ 2 1 4 ( C ) 2 = ( cos ϑ 2 cos ϑ 1 ) 2 = cos ϑ 1 2 + cos ϑ 2 2 2 cos ϑ 1 sin ϑ 2
and by adding the two equalities (25) (and dividing by 2), we obtain
( s d + S ) 2 + ( C ) 2 8 = 1 sin ϑ 1 sin ϑ 2 cos ϑ 1 sin ϑ 2 = 1 cos ( ϑ 2 ϑ 1 ) = 1 cos 2 ,
where the last step follows inserting the sixth equation of (5), that is, ϑ 2 ϑ 1 = s 2 2 , and noting that cosine is even. Thus, 2 can be obtained from (26) as follows:
t CCC = 3 + cos ( α β ) + s d ( sin β sin α ) 4 d 2 8 , cos 2 = 1 ( s d + S ) 2 + ( C ) 2 8 = t CCC , 2 = arccos ( t CCC ) , or 2 = 2 π arccos ( t CCC ) .
The solution exists when the argument of arccos is in the interval [ 1 , 1 ] . Therefore, the t C C C solved in (27) must be comprised between 1 and 1, yielding the following inequality:
1 3 + cos ( α β ) + s d ( sin β sin α ) 4 d 2 8 1 .
The previous expression (28) can be multiplied by 4 and moved d 2 / 2 + 3 to the left and right side:
d 2 2 7 cos ( α β ) + s d ( sin β sin α ) d 2 2 + 1 .
We can obtain the other relations from the trigonometric relations furnished by (24). From  ϑ 1 = α + s 1 and ϑ 2 = α + s ( 1 2 ) and expanding the trigonometric functional, we obtain a linear system in cos 1 and sin 1 , and from ϑ 1 = β + s ( 2 3 ) and ϑ 2 = β s 3 and expanding the trigonometric functions again, we obtain a linear system in cos 3 and sin 3 as follows:
sin α sin α ˜ s ( cos α cos α ˜ ) cos α cos α ˜ s ( sin α ˜ sin α ) cos 1 sin 1 = 1 2 s d + S C , sin β ˜ sin β s ( cos β cos β ˜ ) cos β ˜ cos β s ( sin β ˜ sin β ) cos 3 sin 3 = 1 2 s d + S C ,
where α ˜ = α s 2 and β ˜ = β + s 2 . In conclusion, we can summarize the results for the CCC case as follows:
Evaluate
t CCC = 3 + cos ( α β ) s d S 4 d 2 8 ,
If t CCC [ 1 , 1 ] , then build
2 = arccos ( t CCC ) and 2 = 2 π arccos ( t CCC ) ;
solve the linear system (30) and compute
1 = atan 2 sin 1 , cos 1 mod 2 π , 3 = atan 2 sin 3 , cos 3 mod 2 π .
Discard the solutions that do not satisfy α + s ( 1 CCC 2 CCC + 3 CCC ) = β mod 2 π .

Range of the Solution

The solution exists only when condition (29) is satisfied. Introducing new variables X and Y, in the same fashion as before, defined from the angles α = 2 arctan X and β = 2 arctan Y , and substituting them in the inequality (29), we obtain four quadratic polynomials:
p = s d sin β d 2 2 , q = 2 ( sin β s d ) P CCC , 1 ( X ; β ) = ( p cos β 1 ) X 2 + q X + p + cos β 1 P CCC , 2 ( X ; β ) = ( p cos β + 7 ) X 2 + q X + p + cos β + 7
and
p = s d sin α d 2 2 , q = 2 ( sin α + s d ) P CCC , 3 ( X ; α ) = ( p cos α 1 ) X 2 + q X + p + cos α 1 P CCC , 4 ( X ; α ) = ( p cos α + 7 ) X 2 + q X + p + cos α + 7 .
The real roots of the polynomials return the border of the interval range where α can run, to yield a solution for the C C C problem with β fixed. The same holds for P CCC , 2 / 3 ( X ; α ) for the interval range of β .
The following section uses the results derived so far to compute the derivatives of the optimal lengths so that an algorithm for the 3PDP can be constructed.

4. Derivatives of the Optimal Lengths

In this section, we present the partial derivatives of the optimal lengths with respect to the initial and final angles α and β .

4.1. Derivatives of the LSL and RSR Cases

For the CSC + case given in (13), we can trivially derive some partial derivatives of the lengths with respect to α or β . For instance, α ( 1 + 3 ) = s and β ( 1 + 3 ) = s . The derivatives of 2 with respect to α and β can be computed and simplified using (11) and collecting (12):
α 2 CSC + = s cos ( α ϑ S CSC + ) s C cos ϑ S CSC + + ( s d + S ) sin ϑ S α ϑ S CSC + = s cos ( α ( α + s 1 CSC + ) ) = s cos 1 CSC + , β 2 CSC + = s cos ( β ϑ S CSC + ) s C cos ϑ S CSC + + ( s d + S ) sin ϑ S CSC + β ϑ S CSC + = s cos ( β ( β s 3 CSC + ) ) = s cos 3 CSC + .
Therefore, we can write the partial derivatives of the sum of the lengths using the result from (36):
α ( 1 CSC + + 2 CSC + + 3 CSC + ) = s ( cos 1 CSC + 1 ) , β ( 1 CSC + + 2 CSC + + 3 CSC + ) = s ( 1 cos 3 CSC + ) .
To remove the dependency of 1 and 3 from (37), we substitute their expression (13), so that we can write the partial derivatives of the sum of the lengths as follows (considering the total length, = 1 + 2 + 3 ):
α ( CSC + ) = s ( cos ( ϑ S CSC + α ) 1 ) , β ( CSC + ) = s ( 1 cos ( β ϑ S CSC + ) ) .
The upper bound of the derivative in (37) and (38) and thus of the Lipschitz constant is 2.

4.2. Derivatives of the LSR and RSL Cases

We compute herein the partial derivatives of the optimal lengths for the CSC case given in (19) with respect to α or β :
α ( 1 CSC + 3 CSC ) = 2 s α ϑ S CSC s , β ( 1 CSC + 3 CSC ) = 2 s β ϑ S CSC s .
Then, using (6) and (14), we have
α 2 CSC = α ( d + s S + ) cos ϑ S CSC s C + sin ϑ S CSC = s cos ( α ϑ S CSC ) ( d + s S + ) sin ϑ S CSC + s C + cos ϑ S CSC α ϑ S CSC = s cos 1 CSC 2 s α ϑ S CSC , β 2 CSC = β ( d + s S + ) cos ϑ S CSC s C + sin ϑ S CSC = s cos ( β ϑ S CSC ) ( d + s S + ) sin ϑ S CSC + s C + cos ϑ S CSC β ϑ S CSC = s cos 3 CSC 2 s α ϑ S CSC .
In this case, the partial derivatives of the sum of the lengths cancel out the contribution of the partial derivative of ϑ S , yielding a simplified expression derived from (39) and (40):
α ( 1 CSC + 2 CSC + 3 CSC ) = s ( cos 1 CSC 1 ) , β ( 1 CSC + 2 CSC + 3 CSC ) = s ( cos 3 CSC 1 ) .
Substituting the lengths into their expression from (19), we can write the partial derivatives of the sum of the lengths from (41) as
α ( CSC ) = s ( cos ( ϑ S CSC α ) 1 ) , β ( CSC ) = s ( cos ( ϑ S CSC β ) 1 ) .
The upper bound of the derivative and thus of the Lipschitz constant is 2.

4.3. Derivatives of the LRL and RLR Cases

Using Equation (33) again, we have
2 2 CCC = 1 CCC + 2 CCC + 3 CCC s ( β α ) mod ( 2 π ) ,
and thus, deriving (43), we obtain
2 α 2 CCC = α CCC + s , 2 β 2 CCC = β CCC s .
Then, from (44) and in recalling Equation (33) and the expression of t CCC from (27),
α ( CCC ) = 2 α ( 2 CCC ) s = ± sin ( α β ) + s d cos α 2 1 ( t CCC ) 2 s , β ( CCC ) = 2 α ( 2 CCC ) + s = s sin ( α β ) + s d cos β 2 1 ( t CCC ) 2 .
The sign depends on whether the first or the second solution for 2 is used.
The results in (38), (42) and (45) are compactly implemented in Algorithm 1, which solves the classic point-to-point Dubins problem and returns the solution and its derivatives. This is instrumental for building the algorithm that solves the 3PDP presented in the next section.
Algorithm 1 Dubin’s solver with derivatives
  1:
function Dubins( P i , ϑ i , P f , ϑ f , κ m a x )
  2:
    Input:  P i = ( x i , y i ) , ϑ i , P f = ( x f , y f ) , ϑ f , κ m a x ;
  3:
    Transform to a standard problem with rotation, translation, and scaling
  4:
     ϕ atan 2 ( y f y i , x f x i ) ; d | | P i P f | | / κ max   (2); α ϑ i + ϕ ; β ϑ f + ϕ ;
  5:
     1 , 2 , 3 , s 1 , s 2 , s 3 , α , β  DubinsCSCp (d, α, β)
  6:
     1 , 2 , 3 , s 1 , s 2 , s 3 , α , β  DubinsCSCp (d, α, β)
  7:
     1 , 2 , 3 , s 1 , s 2 , s 3 , α , β  DubinsCSCp (d, α, β)
  8:
    Select the solution with minimal 1 + 2 + 3
  9:
    return  1 / κ m a x , 2 / κ m a x , 3 / κ m a x , s 1 , s 2 , s 3 , α / κ m a x , β / κ m a x ;
10:
end function
  1:
function DubinsCSCp(d, α , β )
  2:
     S sin α sin β ;    C cos α cos β ; (6)
  3:
    for  s { 1 , 1 }  do
  4:
         ϑ S atan 2 C , d + s S mod π ( 12 )   1 s ( ϑ S α ) mod 2 π ( 13 ) 1 + 2 + 3 ( 7 ) 2 ( d + s S ) cos ϑ S s C sin ϑ S ( 13 ) α s ( cos ( ϑ S α ) 1 ) ( 38 ) 3 s ( β ϑ S ) mod 2 π ( 13 ) β s ( 1 cos ( β ϑ S ) ) ( 38 )
  5:
    end for
  6:
    Select the solution with minimal and return  1 , 2 , 3 , s , 0 , s , α , β ;
  7:
end function
  1:
function DubinsCSCm(d, α , β )
  2:
     S + sin α + sin β ;    C + cos α + cos β ; (6)
  3:
    for  s { 1 , 1 }  do
  4:
        for X real root of ( 2 C + ) X 2 + 2 ( s d + S + ) X + ( 2 + C + ) = 0  do
  5:
            ϑ S atan 2 ( 2 X , X 2 1 ) ( 12 )   1 s ( ϑ S α ) mod ( 2 π ) ( 19 ) 1 + 2 + 3 ( 7 ) 2 ( d + s S + ) cos ϑ S s C + sin ϑ S ( 19 ) α s ( cos ( ϑ S α ) 1 ) ( 42 ) 3 s ( ϑ S β ) mod ( 2 π ) ( 19 ) β s ( cos ( ϑ S β ) 1 ) ( 42 )
  6:
        end for
  7:
    end for
  8:
    Select the solution with minimal or set 1 = 2 = 3 = in case no solution exists.
  9:
    return  1 , 2 , 3 , s , 0 , s , α , β ;
10:
end function
  1:
function DubinsCCC(d, α , β )
  2:
     S sin α sin β ; (6)
  3:
    for  s { 1 , 1 }  do
  4:
         t ( 3 + cos ( α β ) s d S ) / 4 d 2 / 8   (31)
  5:
        if  t [ 1 , 1 ]  then
  6:
           for  2 { arccos ( t ) , 2 π arccos ( t ) }   (32) do
  7:
               solve linear system  (30) and compute
  8:
                1 atan 2 sin 1 , cos 1 mod 2 π   (33);
  9:
                3 atan 2 sin 3 , cos 3 mod 2 π   (33);
10:
                α ± ( sin ( α β ) + s d cos α ) / ( 2 1 t 2 ) s   (45)
11:
                β s ( sin ( α β ) + s d cos β ) / ( 2 1 t 2 )   (45)
12:
           end for
13:
        end if
14:
        if not  α + s ( 1 2 + 3 ) = β mod 2 π   (34)  (35) then
15:
           Discard the solution
16:
        end if
17:
    end for
18:
    return  1 , 2 , 3 , s , s , s , α , β ;
19:
end function

5. Three-Point Dubins Problem (3PDP)

In this section, we derive the formulation for the 3PDP. The resulting Dubins spline will be a concatenation of two Dubins paths. Hence, the total length of such a spline will be the sum of the lengths of the two elementary Dubins paths:
total ( P i , P m , P f , ϑ i , ϑ m , ϑ f ) = dub 1 ( P i , P m , ϑ i , ϑ m ) + dub 2 ( P m , P f , ϑ m , ϑ f ) ,
where P i = ( x i , y i ) , P m = ( x m , y m ) , and P f = ( x f , y f ) are the three points defining the 3PDP path, ϑ i and ϑ f are the initial and final angles of the path, and finally, ϑ m is the angle of the middle point and the only unknown variable. Therefore, we will consider the total length total as a function of ϑ m only and also consider its derivative, total . Hence, (46) can be rewritten as
total ( ϑ m ) = dub 1 ( ϑ m ) + dub 2 ( ϑ m ) , total ( ϑ m ) = dub 1 ( ϑ m ) + dub 2 ( ϑ m ) .
The derivatives are computed thanks to the results of the previous sections and, given (47), we have the following:
dub 1 ( ϑ m ) = ϑ m dub 1 ( P i , P m , ϑ i , ϑ m ) = β dub 1 ϑ m β 1 , dub 2 ( ϑ m ) = ϑ m dub 2 ( P m , P f , ϑ m , ϑ f ) = α dub 2 ϑ m α 2 .
Recalling that for a single segment ϑ i = α ϕ and x f = d , y f = 0 , ϑ f = β ϕ , and ϕ = atan 2 ( y f y i , x f x i ) , we obtain
ϑ m β 1 = ϑ m ( ϑ m + ϕ 1 ) = 1 , ϑ m α 2 = ϑ m ( ϑ m + ϕ 2 ) = 1
However, ϕ 1 = atan 2 ( y m y i , x m x i ) and ϕ 2 = atan 2 ( y f y m , x f x m ) do not depend on ϑ m and can be considered constants. Therefore, the derivatives of the lengths with respect to ϑ m are computed using (48) and (49):
total ( ϑ m ) = β 1 dub 1 ( P i , P m , ϑ i , β 1 ϕ 1 ) + α 2 dub 2 ( P m , P f , α 2 ϕ 2 , ϑ f ) .
However, we cannot simply find the root of the previous equation because the lengths are piecewise continuous functions of ϑ m . Therefore, we need to use a numerical method to find the optimal angle ϑ m that minimizes the total length of the path.
Figure 2 illustrates the optimal configuration of the three-point Dubins connection. In the second subfigure, the total length is depicted as a function of the middle-point angle. This total length, which is the sum of the two individual lengths, can exhibit discontinuities. Depending on the problem’s boundary conditions, some configurations are feasible only for a limited range of internal angles. Additionally, the third subplot displays the behavior of the analytical derivative of the total length. Notably, there are jumps in the derivative even in regions where the total length appears to be smooth.
Therefore, finding the minimum length solution cannot rely on standard minimization or root-finding algorithms [19]. These traditional methods assume a certain level of smoothness and continuity in the target function and its derivatives. Therefore, we introduce a specialized section about algorithms designed to handle such irregularities effectively as in non-smooth optimization [18,19,20]. Furthermore, it is important to highlight that the minimum can occur at a jumping point where the derivative may differ from zero.

6. Algorithms

In this section, we present two algorithms employed to find the optimal angle ϑ m that minimizes the total length of the three-point Dubins path. Both algorithms are based on a mixed approach that combines a pattern search method with a non-derivative root finder.
As highlighted in the previous section, the total length of the path can have discontinuities in the derivative. Therefore, the angle ϑ m that minimizes the total length of the path cannot be found, in general, by simply computing the root of the derivative of the total length. This is true from a global perspective. However, if some regularity conditions are met in a specific region (interval), the root of the derivative can be used to find the optimal angle ϑ m .

6.1. Discretization-Based Method (DBM [29])

This algorithm is the baseline used in the literature to compare new methods. It is based on the observation that once the angle ϑ m is fixed, the corresponding length of the 3PDP is readily obtained by applying the classic Dubins solution two times, first from P i , ϑ i to P m , ϑ m and a second time from P m , ϑ m to P f , ϑ f . The method discretizes the round angle with N points and selects as the solution of the 3PDP the angle that returns the minimum length. This is not very accurate and not very fast. Nevertheless, it is a straightforward method used as a baseline with standard value N = 360 and a discretization of one degree. It is described in Algorithm 2.
Algorithm 2 Discretization-Based Method (DBM [29])
  1:
function Dubins3pDBM( P i , ϑ i , P f , ϑ f , P m , κ m a x , N)
  2:
     ϑ m 0 ;    Δ ϑ 2 π / N ;    min ;
  3:
    while  ϑ m < 2 π  do
  4:
         STwoDubins ( P i , ϑ i , P m , ϑ m , P f , ϑ f , κ m a x ) ;
  5:
        if  S . < min  then
  6:
            min S . ;    C S ;      (* select this solution *)
  7:
        end if
  8:
         ϑ m ϑ m + Δ ϑ ;
  9:
    end while
10:
    return C;   (* the structure of the selected solution *)
11:
end function
  1:
function TwoDubins( P i , ϑ i , P m , ϑ m , P f , ϑ f , κ m a x )
  2:
    S.ADubins ( P i , ϑ i , P m , ϑ m , κ m a x ) ;
  3:
    S.BDubins ( P m , ϑ m , P f , ϑ f , κ m a x ) ;
  4:
     S . S . A . + S . B . ;      (* store total length *)
  5:
     S . ϑ i ϑ i ;    S . ϑ m ϑ m ;    S . ϑ f ϑ f ;
  6:
    return S;      (* return a structure with the two curves *)
  7:
end function

6.2. Pattern Search with Root Finder

Algorithm 3 combines the potential of a pattern search method with a non-derivative root finder. The pattern search method is used iteratively to refine the interval of angles where the total length has a local minimum. The iterative search stops when the interval is small enough or whenever sufficient conditions to use the non-derivative root finder are met. The non-derivative root finder yields the optimal angle ϑ m inside the regular interval retrieved by the pattern search method. The sufficient conditions are that the solution does not change type inside the interval. If the derivatives at the interval’s endpoints have opposite signs, then, by continuity, the minimum is inside the interval. In this case, a non-derivative root finder, which searches the zero of the derivative of the length, is used. The algorithm employed to find the root is a variant of the bisection with interpolation Algorithm 748 from [22].
Algorithm 3 Pattern Search Refinement (Based on Direct Search [37])
  1:
function Dubins3pPatternRefine( P i , ϑ i , P m , ϑ m , P f , ϑ f , κ m a x , ϑ m L , ϑ m C , ϑ m R )
  2:
     L T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m L , P f , ϑ f , κ m a x ) ;
  3:
     C T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m C , P f , ϑ f , κ m a x ) ;
  4:
     R T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m R , P f , ϑ f , κ m a x ) ;
  5:
    while  R . ϑ m L . ϑ m > Δ ϑ min  do (* refine solution *)
  6:
        OPTIONAL: If curve type for L, C is the same
  7:
        and the length derivative changes sign, use algo 748
  8:
        to refine the solution between L . θ m and C . θ m and return.
  9:
        
10:
        OPTIONAL: If curve type for C, R is the same
11:
        and the length derivative changes sign, use algo 748
12:
        to refine the solution between C . θ m and R . θ m and return.
13:
        
14:
         L ^ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( L . ϑ m + C . ϑ m ) / 2 , P f , ϑ f , κ m a x ) ;
15:
         R ^ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( R . ϑ m + C . ϑ m ) / 2 , P f , ϑ f , κ m a x ) ;
16:
        if  L ^ . < R ^ .  then
17:
           if  L ^ . < C .  then
18:
                R C ;     C L ^ ;
19:
           else
20:
                L L ^ ;     R R ^ ;
21:
           end if
22:
        else
23:
           if  R ^ . < C .  then
24:
                L C ;     C R ^ ;
25:
           else
26:
                L L ^ ;     R R ^ ;
27:
           end if
28:
        end if
29:
    end while
30:
    return C;   (* best solution found *)
31:
end function
Algorithm 4 (Pattern Trichotomy) is similar to the previous one with a slight variation. The main drawback of the pattern search method is that it can find only one local minimum of the total length. Algorithm 4 overcomes, in part, this limitation using a pattern search method to find multiple local minima of the total length. The algorithm iteratively searches for the local minima of the total length and stores them in a list of candidate minima. Then, the algorithm explores the candidates in a neighborhood of decreasing size and stops the search in two cases. The first is when the interval is small enough. The second case is when sufficient conditions are met, where the fast bisection can be used on the total length derivative. In both cases, the solution found is stored if it is better than a previously computed one.
The previously described methods (Algorithms 3 and 4) are not always able to catch the correct minima if there are discontinuities or jumps smaller than the first sampling range Δ ϑ . Our proposed hybrid method (Algorithm 5) overcomes this problem by isolating first the discontinuity points, and then adding at least two more points (before and after the jump). Furthermore, additional points are sampled according to the interval range Δ ϑ . The discontinuity isolation is performed by computing the existence range of the solution computed in (21), (34) and (35). The algorithm loops over all the sampled points, comparing the left and right samples. If the length at the central point is less or equal to the left and right lengths, we refine the solution. The algorithm returns the best solution found. The refinement phase is conducted by either the Dubins3pPatternRefine or Dubins3pTrichotomyRefine functions described in Algorithms 3 and 4.
Algorithm 4 Trichotomy Refine (Based on Trichotomy Method [36])
  1:
function Dubins3pTrichotomyRefine( P i , ϑ i , P m , ϑ m , P f , ϑ f , κ m a x , ϑ m L , ϑ m C , ϑ m R )
  2:
     L T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m L , P f , ϑ f , κ m a x ) ;
  3:
     C T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m C , P f , ϑ f , κ m a x ) ;
  4:
     R T D ʙ ɪ ɴ ( P i , ϑ i , P m , ϑ m R , P f , ϑ f , κ m a x ) ;
  5:
    while  R . ϑ m L . ϑ m > Δ ϑ min  do (* refine solution *)
  6:
        OPTIONAL: If curve type for L, C is the same
  7:
        and the length derivative change signs, use algo 748
  8:
        to refine the solution between L . θ m and C . θ m and return.
  9:
        
10:
        OPTIONAL: If curve type for C, R is the same
11:
        and the length derivative changes sign, use algo 748
12:
        to refine the solution between C . θ m and R . θ m and return.
13:
        
14:
         L ^ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( L . ϑ m + 2 C . ϑ m ) / 3 , P f , ϑ f , κ m a x ) ;
15:
        if  L ^ . C .  then
16:
            L ˜ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( 2 L . ϑ m + C . ϑ m ) / 3 , P f , ϑ f , κ m a x ) ;
17:
           if  L ˜ . L ^ .  then
18:
                C L ˜ ;    R L ^ ;
19:
           else
20:
                L L ˜ ;    R C ;    C L ^ ;
21:
           end if
22:
        else
23:
            R ^ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( R . ϑ m + 2 C . ϑ m ) / 3 , P f , ϑ f , κ m a x ) ;
24:
           if  R ^ . C .  then
25:
                R ˜ T D ʙ ɪ ɴ ( P i , ϑ i , P m , ( 2 R . ϑ m + C . ϑ m ) / 3 , P f , ϑ f , κ m a x ) ;
26:
               if  R ˜ . R ^ .  then
27:
                    L R ^ ;    C R ˜ ;
28:
               else
29:
                    L C ;    C R ^ ;    R R ˜ ;
30:
               end if
31:
           else
32:
                L L ^ ;    R R ^ ;
33:
           end if
34:
        end if
35:
    end while
36:
    return C;   (* best solution found *)
37:
end function
Algorithm 5 Hybrid Search
  1:
function Dubins3pHybridSearch( P i , ϑ i , P f , ϑ f , P m , κ m a x , Δ ϑ )
  2:
     ϑ d Compute the candidate discontinuity points
  3:
     ϑ s sample points (at least 2 close to ϑ d with distance less or equal to Δ ϑ )
  4:
    for all  ϑ m ϑ c  do
  5:
         ϑ m L , ϑ m R left and right sample points of ϑ m
  6:
        if  ( ϑ m ) ( ϑ m L ) and ( ϑ m ) ( ϑ m R )  then
  7:
           CRefine ( P i , ϑ i , P m , ϑ m , P f , ϑ f , κ m a x , ϑ m L , ϑ m , ϑ m R )
  8:
        end if
  9:
    end for
10:
    return C;   (* the structure of the best computed solution *)
11:
end function
where Refine can be Dubins3pPatternRefine or Dubins3pTrichotomyRefine

7. Numerical Tests and Results

In this section, we briefly present the numerical results and performance achievements. The tests were conducted on a commercial laptop with an Apple M2 Max processor. The test was performed on a sampled pool of 10 , 000 random three-point Dubins problems, which is the standard benchmark test for the 3PDP found in the literature. The results are summarized in Table 2, Table 3, Table 4 and Table 5.
We employed two different ranges of sampling, the first coming from the literature and representing a standard benchmark case, whereas the second was more representative of the solution-type distribution. Without loss of generality, we kept the initial and final points fixed at ( 1 , 0 ) and ( 1 , 0 ) , respectively.
In the first sampling, we took the middle point uniformly distributed in [ 10 , 10 ] × [ 10 , 10 ] . The initial and final angles were in the interval [ π , π ] , and the maximum curvature was kept constant at 1. The same test was conducted in [26,28,31]. In summary,
( x m , y m ) [ 10 , 10 ] × [ 10 , 10 ] , θ i , θ f [ π , π ] , and κ m a x = 1 ,
The second test sampled the middle point randomly inside the region [ 2 , 2 ] × [ 2 , 2 ] . As before, the initial and final angles were randomly sampled in the interval [ π , π ] , and we randomly generated the maximum curvature inside the interval [ 0.1 , 1.5 ] . In brief,
( x m , y m ) [ 2 , 2 ] × [ 2 , 2 ] , θ i , θ f [ π , π ] , and κ m a x [ 0.1 , 1.5 ] .
We proposed the second test because, when the middle point is distant from the initial and the final points, we lose two potential solutions of the 3PDP. When the distance is greater than the maximum curvature inverse, we can only observe 4 of the 18 possible solutions, which are the ones with the straight line in the middle.
In Table 2 and Table 4, we present the mean and standard deviation of both the number of iterations and computational time for the sampling in (50) and (51), respectively. The last columns of the tables present the number of calls to the Dubins function, on average. It is important to highlight that the number of iterations is linked to the number of Dubins calls (twice). The information is redundant, but most of the available state-of-the-art publications report the number of Dubins calls. The computational time is measured in milliseconds. It is important to stress that the computational time depends on the implementation.
Table 3 and Table 5 present a comparison between different approaches scaling the results with the DBM benchmark. The ratio is computed as the number of iterations and time of the algorithm divided by the number of iterations and time of the DBM algorithm. The results are presented for the sampling in (50) and (51), respectively.
The four tables (Table 2, Table 3, Table 4 and Table 5) showcase the strong performance of our algorithm when the middle point is distant, on average. In fact, in this occurrence, both the length and the derivative do not jump; hence, non-smooth root-finding algorithms can be used to obtain the minimum length curve.
The results show that the proposed algorithms outperform the benchmark algorithms in terms of the number of iterations and time. The pattern search with the root finder and the pattern trichotomy algorithms are more efficient than the brute force (DBM) and refinement (iDDP) algorithms by a factor ranging between 4.27 and 6.67 times depending on the proposed sampling. Moreover, it should be noted that these methods do not achieve the same precision: indeed, the DBM evaluates the problem with a 1-degree precision, while the other methods have a precision of 10 2 degrees. However, the threshold precision can be set to a custom value in our proposed methods.
The Pattern Trichotomy algorithm is the most efficient one. It requires the fewest iterations and the least amount of time. The pattern search algorithm is slightly less efficient than the Pattern Trichotomy algorithm. However, it is still more efficient than the DBM, IM, PBM, and iDDP algorithms. The pattern search algorithm combined with the root finder (algorithm 748) requires fewer iterations on average. However, the trichotomy algorithm implementation allows a speed-up in the computational time. Hence, the pattern trichotomy algorithm equipped with a root finder is the fastest and most efficient. Furthermore, when root finding is employed, both pattern search with algorithm 748 and Pattern Trichotomy with algorithm 748 yield the same exact result up to machine precision.
Looking at the comparison in Table 5, we can see that the pattern search and Pattern Trichotomy algorithms require approximately 4 times fewer iterations than the DBM algorithm, and 2.8 times with respect to the iDPP. However, if we compare the time required by the algorithms, the pattern search exhibits a factor of 270, and the Pattern Trichotomy, a factor of 320. Other speed-up factors (compared to the brute force DBM) declared in the literature are about 3 for the iDPP [12], which is a general method capable of solving the MPMDP with n points, adapted for the case n = 3 ; about 5 for the inversive geometry iterative method (IM) [26]; between 25 and 45 for the polynomial-based method (PBM) [31]; and about 150 for the geometry-based method (GBM) [28], (which solves exactly the case of points at distance d > d only, and gives a good approximation otherwise). Therefore, we can conclude that our methods are performant.
Figure 3 illustrates the optimal configuration of the three-point Dubins connection in a challenging configuration. In the second subfigure, the total length showcases strong discontinuities resulting in a tiny interval of existence of the retrieved minimum. Furthermore, the derivative displays many noncontinuous points, hence demonstrating the non-applicability of derivative methods, at least globally.
We compared the example proposed in [28,31], where they tested their implementation versus the DBM. The test example has the following definition:
P i = ( 0 , 0 ) , ϑ i = π 3 , P m = ( 10 , 5 ) , P f = ( 15 , 20 ) , ϑ f = π 6 .
The DBM yields the following solution:
total = 27.11279494 , θ M = 0.8575935377 .
This is a suboptimal solution, as highlighted in [28]. Their work claims to obtain a solution that is 1.08 × 10 6 % better than that of the DBM. Our approach provides solutions with the following values, reported in Table 6 and Figure 4, representing our best solution. The DBM performs 360 iterations and will need to perform 100 times more to achieve the same precision as in [28]. Moreover, the pattern search and Pattern Trichotomy algorithms stop the iteration when a custom tolerance is reached ( 1 / 100 degree). On the other hand, when combined with Algorithm 748, our approach retrieves the solution to machine precision, yielding the true numerical minimum.

8. Conclusions

We presented two novel algorithms for solving the 3PDP, a non-smooth constrained minimization problem and an optimal control problem. Our methods leverage the pattern search technique, integrating analytic derivatives within continuous-length function intervals to enhance computational efficiency. This improvement is crucial for the 3PDP and may also be used for the Dubins Traveling Salesman Problem. In these examples, high performance is essential due to the routine’s frequent invocation.
Extensive numerical tests were conducted on a standard benchmark pool of 10,000 random Three-Point Dubins Problems. Two different sampling ranges were employed to reflect standard benchmarks and more representative scenarios with a middle point close to the initial and final points. The results demonstrate that our proposed algorithms significantly outperform existing methods in terms of both iteration count and computational time.
For the first sampling range, our pattern search and Pattern Trichotomy algorithms achieved an iteration count reduction factor of approximately 4.27 to 6.674 times compared to the DBM algorithm, and a time reduction factor ranging from ∼325 to ∼493 times. For the second sampling range, the iteration count reduction factors were similar with a range of 4.27 to 5.47 times, with the time reduction factors being 265 to 354 times compared to the DBM algorithm. Additionally, when combined with Algorithm 748, both the pattern search and Pattern Trichotomy methods consistently yielded results with machine precision, demonstrating their robustness and accuracy.
These performance improvements are notable when compared to other state-of-the-art methods, such as the polynomial-based method (PBM) in [31], which achieves a 25–45 times speed-up over the DBM, and the geometry-based method (GBM) in [28], which offers a speed-up of approximately 150 times. Our methods achieve a computational speed-up factor exceeding 300 times compared to the DBM and less than half the time declared in [28].
Overall, our methods represent a significant advancement in solving the 3PDP efficiently, making them highly suitable for applications where computational performance is critical.

9. Future Works

Our research is ongoing, and this work is part of a broader project. We are working on the generalization of the 3PDP to the Multipoint Markov–Dubins problem (MPMDP). The goal is to provide a general and fast method to solve these Dubins-related challenging problems encountered in robotics. Our research aims to find a solution that does not rely on finite meshing exploration.
Moreover, we are working on domain-specific applications for the 3PDP. We are including our implementation into an autonomous parking framework [38]. The solution to the 3PDP is used to efficiently compute an exploration trajectory with obstacle collision checking. Furthermore, we are extending the framework developed in [4] to include low-speed maneuvers with the 3PDP. The goal is to employ a piecewise constant curvature profile for valet maneuvers.

Author Contributions

Conceptualization, M.P., E.B. and M.F.; Methodology, M.P., E.B. and M.F. The authors contributed equally to this work. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

Data are contained within the article.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Wang, C.; Zhong, Z.; Xiang, X.; Zhu, Y.; Wu, L.; Yin, D.; Li, J. UAV Path Planning in Multi-Task Environments with Risks through Natural Language Understanding. Drones 2023, 7, 147. [Google Scholar] [CrossRef]
  2. Perez-Ramos, J.L.; Ramirez-Rosales, S.; Canton-Enriquez, D.; Diaz-Jimenez, L.A.; Xicotencatl-Ramirez, G.; Herrera-Navarro, A.M.; Jimenez-Hernandez, H. Algorithm Based on Morphological Operators for Shortness Path Planning. Algorithms 2024, 17, 184. [Google Scholar] [CrossRef]
  3. Latif, E.; Parasuraman, R. On the Intersection of Computational Geometry Algorithms with Mobile Robot Path Planning. Algorithms 2023, 16, 498. [Google Scholar] [CrossRef]
  4. Piazza, M.; Piccinini, M.; Taddei, S.; Biral, F. MPTREE: A Sampling-based Vehicle Motion Planner for Real-time Obstacle Avoidance. IFAC-PapersOnLine 2024, 58, 146–153. [Google Scholar] [CrossRef]
  5. Chitsaz, H.; LaValle, S.M. Time-optimal paths for a Dubins airplane. In Proceedings of the 2007 46th IEEE Conference on Decision and Control, New Orleans, LA, USA, 12–14 December 2007; pp. 2379–2384. [Google Scholar] [CrossRef]
  6. Scharff Willners, J.; Gonzalez-Adell, D.; Hernández, J.D.; Pairet, È.; Petillot, Y. Online 3-Dimensional Path Planning with Kinematic Constraints in Unknown Environments Using Hybrid A* with Tree Pruning. Sensors 2021, 21, 1152. [Google Scholar] [CrossRef] [PubMed]
  7. Markov, A.A. Some examples of the solution of a special kind of problem on greatest and least quantities. Soobshch. Karkovsk. Mat. Obshch 1887, 1, 250–276. [Google Scholar]
  8. Kaya, C.Y. Markov–Dubins path via optimal control theory. Comput. Optim. Appl. 2017, 68, 719–747. [Google Scholar] [CrossRef]
  9. Dubins, L.E. On curves of minimal length with a constraint on average curvature, and with prescribed initial and terminal positions and tangents. Am. J. Math. 1957, 79, 497–516. [Google Scholar] [CrossRef]
  10. Park, S. Three-Dimensional Dubins-Path-Guided Continuous Curvature Path Smoothing. Appl. Sci. 2022, 12, 11336. [Google Scholar] [CrossRef]
  11. Consonni, C.; Brugnara, M.; Bevilacqua, P.; Tagliaferri, A.; Frego, M. A new Markov–Dubins hybrid solver with learned decision trees. Eng. Appl. Artif. Intell. 2023, 122, 106166. [Google Scholar] [CrossRef]
  12. Frego, M.; Bevilacqua, P.; Saccon, E.; Palopoli, L.; Fontanelli, D. An Iterative Dynamic Programming Approach to the Multipoint Markov-Dubins Problem. IEEE Robot. Autom. Lett. 2020, 5, 2483–2490. [Google Scholar] [CrossRef]
  13. Kaya, C.Y. Markov–Dubins interpolating curves. Comput. Optim. Appl. 2019, 73, 647–677. [Google Scholar] [CrossRef]
  14. Saccon, E.; Bevilacqua, P.; Fontanelli, D.; Frego, M.; Palopoli, L.; Passerone, R. Robot motion planning: Can GPUs be a game changer? In Proceedings of the 2021 IEEE 45th Annual Computers, Software, and Applications Conference (COMPSAC), Virtual, 12–16 July 2021; pp. 21–30. [Google Scholar]
  15. Isaacs, J.T.; Hespanha, J.P. Dubins Traveling Salesman Problem with Neighborhoods: A Graph-Based Approach. Algorithms 2013, 6, 84–99. [Google Scholar] [CrossRef]
  16. Nayak, A.; Rathinam, S. Heuristics and Learning Models for Dubins MinMax Traveling Salesman Problem. Sensors 2023, 23, 6432. [Google Scholar] [CrossRef]
  17. Li, L.; Shi, D.; Jin, S.; Yang, S.; Zhou, C.; Lian, Y.; Liu, H. Exact and Heuristic Multi-Robot Dubins Coverage Path Planning for Known Environments. Sensors 2023, 23, 2560. [Google Scholar] [CrossRef]
  18. Mäkelä, M.M. On the methods of nonsmooth optimization. In System Modelling and Optimization; Sebastian, H.J., Tammer, K., Eds.; Springer: Berlin/Heidelberg, Germany, 1990; pp. 177–186. [Google Scholar]
  19. Bagirov, A.; Karmitsa, N.; Mäkelä, M.M. Introduction to Nonsmooth Optimization: Theory, Practice and Software; Springer: Berlin/Heidelberg, Germany, 2014; Volume 12. [Google Scholar]
  20. Bagirov, A.M.; Karmitsa, N.; Taheri, S. Partitional Clustering via Nonsmooth Optimization; Springer Nature: Cham, Switzerland, 2020. [Google Scholar]
  21. Holmes, M.H. Introduction to Numerical Methods in Differential Equations; Springer: Berlin/Heidelberg, Germany, 2007. [Google Scholar]
  22. Alefeld, G.E.; Potra, F.A.; Shi, Y. Algorithm 748: Enclosing zeros of continuous functions. ACM Trans. Math. Softw. (TOMS) 1995, 21, 327–344. [Google Scholar] [CrossRef]
  23. Bertolazzi, E.; Bevilacqua, P.; Frego, M. Clothoids: A C++ library with MATLAB interface for the handling of clothoid curves. Rend. Del Semin. Mat. 2018, 76, 47–56. [Google Scholar]
  24. Bertolazzi, E.; Frego, M. Clothoids: A C++ Library with Matlab Interface. 2019. Available online: https://github.com/ebertolazzi/Clothoids (accessed on 1 June 2024).
  25. Goaoc, X.; Kim, H.S.; Lazard, S. Bounded-Curvature Shortest Paths through a Sequence of Points. Research Report RR-7465, INRIA, HAL ID:inria-00539957. 2010. Available online: https://inria.hal.science/inria-00539957 (accessed on 1 June 2024).
  26. Sadeghi, A.; Smith, S.L. On efficient computation of shortest Dubins paths through three consecutive points. In Proceedings of the 2016 IEEE 55th Conference on Decision and Control (CDC), Las Vegas, NV, USA, 12–14 December 2016; pp. 6010–6015. [Google Scholar] [CrossRef]
  27. Goaoc, X.; Kim, H.S.; Lazard, S. Bounded-Curvature Shortest Paths through a Sequence of Points Using Convex Optimization. SIAM J. Comput. 2013, 42, 662–684. [Google Scholar] [CrossRef]
  28. Parlangeli, G.; De Palma, D.; Attanasi, R. A novel approach for 3PDP and real-time via point path planning of Dubins’ vehicles in marine applications. Control Eng. Pract. 2024, 144, 105814. [Google Scholar] [CrossRef]
  29. Chen, Z.; Shima, T. Relaxed Dubins problems through three points. In Proceedings of the 2019 27th Mediterranean Conference on Control and Automation (MED), Akko, Israel, 1–4 July 2019; pp. 501–506. [Google Scholar]
  30. Cohen, I.; Epstein, C.; Isaiah, P.; Kuzi, S.; Shima, T. Discretization-based and look-ahead algorithms for the dubins traveling salesperson problem. IEEE Trans. Autom. Sci. Eng. 2016, 14, 383–390. [Google Scholar] [CrossRef]
  31. Chen, Z.; Shima, T. Shortest Dubins paths through three points. Automatica 2019, 105, 368–375. [Google Scholar] [CrossRef]
  32. Bertolazzi, E.; Frego, M. A Note on Robust Biarc Computation. Comput.-Aided Des. Appl. 2019, 16, 822–835. [Google Scholar] [CrossRef]
  33. Hooke, R.; Jeeves, T.A. “ Direct Search” Solution of Numerical and Statistical Problems. J. ACM 1961, 8, 212–229. [Google Scholar] [CrossRef]
  34. Custódio, A.L.; Madeira, J.A. GLODS: Global and local optimization using direct search. J. Glob. Optim. 2015, 62, 1–28. [Google Scholar] [CrossRef]
  35. Audet, C. A Survey on Direct Search Methods for Blackbox Optimization and Their Applications; Springer: Berlin/Heidelberg, Germany, 2014. [Google Scholar]
  36. Antonova, A.; Ibryaeva, O.L. A new zero-order 1-D optimization algorithm: Trichotomy method. arXiv 2019, arXiv:1903.07117. [Google Scholar]
  37. Audet, C.; Dennis, J.E., Jr. Mesh adaptive direct search algorithms for constrained optimization. SIAM J. Optim. 2006, 17, 188–217. [Google Scholar] [CrossRef]
  38. Pagot, E.; Piccinini, M.; Bertolazzi, E.; Biral, F. Fast Planning and Tracking of Complex Autonomous Parking Maneuvers with Optimal Control and Pseudo-Neural Networks. IEEE Access 2023, 11, 124163–124180. [Google Scholar] [CrossRef]
Figure 1. An example and scheme of an instance of the 3PDP. This path is an example of the LSLSR type. The three arcs of each Dubins are represented by colors red, green, and blue.
Figure 1. An example and scheme of an instance of the 3PDP. This path is an example of the LSLSR type. The three arcs of each Dubins are represented by colors red, green, and blue.
Algorithms 17 00350 g001
Figure 2. Example of the total length of a three-point Dubins path. Spatial coordinates are in meters, and angles are in radiant. (Top: path result with alternating colors for each arc; Middle: total length as a function of middle angle ϑ m ; Bottom: derivative of total length as a function of middle angle ϑ m ).
Figure 2. Example of the total length of a three-point Dubins path. Spatial coordinates are in meters, and angles are in radiant. (Top: path result with alternating colors for each arc; Middle: total length as a function of middle angle ϑ m ; Bottom: derivative of total length as a function of middle angle ϑ m ).
Algorithms 17 00350 g002
Figure 3. Example of the total length of a three-point Dubins path. Spatial coordinates are in meters, and angles are in radiant. (Top: path result with alternating colors for each arc; Middle: total length as a function of middle angle ϑ m ; Bottom: derivative of total length as a function of middle angle ϑ m ).
Figure 3. Example of the total length of a three-point Dubins path. Spatial coordinates are in meters, and angles are in radiant. (Top: path result with alternating colors for each arc; Middle: total length as a function of middle angle ϑ m ; Bottom: derivative of total length as a function of middle angle ϑ m ).
Algorithms 17 00350 g003
Figure 4. An example of the total length of a three-point Dubins path for comparison with [28]. (Top: path result with alternating colors for each arc; Middle: total length as a function of the middle angle ϑ m ; Bottom: derivative of total length as a function of the middle angle ϑ m ).
Figure 4. An example of the total length of a three-point Dubins path for comparison with [28]. (Top: path result with alternating colors for each arc; Middle: total length as a function of the middle angle ϑ m ; Bottom: derivative of total length as a function of the middle angle ϑ m ).
Algorithms 17 00350 g004
Table 1. The types of the 18 admissible paths; the subscript indicates the degree of the corresponding polynomial according to [31]. For instance, RSLRL20 means that the path is of type CSCCC and that the resulting polynomial has degree 20.
Table 1. The types of the 18 admissible paths; the subscript indicates the degree of the corresponding polynomial according to [31]. For instance, RSLRL20 means that the path is of type CSCCC and that the resulting polynomial has degree 20.
CCCCCCCCSCCSCCCCSCSC
RLRLR6RLRSR8RSRLR8RSRSR4
LRLRL6RLRSL20LSRLR20LSRSR8
LRLSL8RSLRL20RSRSL8
LRLSR8LSLRL8LSRSL8
LSLSL4
RSLSL8
LSLSR8
RSLSR8
Table 2. The evaluation of the proposed algorithms with the benchmark test with mean μ and standard deviation σ of iterations and computational times for the sampling in (50).
Table 2. The evaluation of the proposed algorithms with the benchmark test with mean μ and standard deviation σ of iterations and computational times for the sampling in (50).
AlgorithmIter NumberTime (ms)N. Dubins Calls
μ σ μ σ
Pattern search85.5410.660.1740.036∼171
Pattern search + 74846.2710.720.1220.031∼92
Pattern Trichotomy73.697.970.1500.026∼147
Pattern Trichotomy + 74854.998.740.1150.025∼109
DBM – Algorithm 23600.054.8463.210720
iDPP [12]1280.019.4550.740256
Table 3. Comparison between number of iterations and time with respect to brute force DBM for sampling in (50). (n/a means not available.)
Table 3. Comparison between number of iterations and time with respect to brute force DBM for sampling in (50). (n/a means not available.)
AlgorithmIter Number RatioTime Ratio
Pattern search4.27325.66
Pattern search + 7486.57471.78
Pattern Trichotomy4.94374.73
Pattern Trichotomy + 7486.67493.50
iDPP [12]2.812.82
IM [26]n/a5
PBM [31]n/a[25, 45]
GBM [28]n/a150
Table 4. The evaluation of the proposed algorithms with the benchmark test with mean μ and standard deviation σ of iterations and computational times for the sampling in (51).
Table 4. The evaluation of the proposed algorithms with the benchmark test with mean μ and standard deviation σ of iterations and computational times for the sampling in (51).
AlgorithmIter NumberTime (ms)N. Dubins Calls
μ σ μ σ
Pattern search88.3520.570.2170.047∼176
Pattern search + 74877.7023.550.1870.031∼155
Pattern Trichotomy74.7813.340.1790.032∼149
Pattern Trichotomy + 74868.5414.810.1630.034∼137
DBM – Algorithm 23600.055.5773.357720
iDPP [12]1280.019.7200.845256
Table 5. Comparison between number of iterations and time with respect to brute force DBM for sampling in (51). (n/a means not available.)
Table 5. Comparison between number of iterations and time with respect to brute force DBM for sampling in (51). (n/a means not available.)
AlgorithmIter Number RatioTime Ratio
Pattern search4.27265.66
Pattern search + 7485.02315.19
Pattern Trichotomy4.95318.01
Pattern Trichotomy + 7485.47354.27
iDPP [12]2.812.82
IM [26]n/a5
PBM [31]n/a[25, 45]
GBM [28]n/a150
Table 6. Comparison of result with the best result (pattern search + 748 and Pattern Trichotomy + 748).
Table 6. Comparison of result with the best result (pattern search + 748 and Pattern Trichotomy + 748).
AlgorithmLength θ M
Pattern search + 74827.11279340.8556738609
Pattern Trichotomy + 748+0.0+0.0
Pattern search + 1.552 × 10 11 + 3.711 × 10 5
Pattern Trichotomy + 8.985 × 10 13 + 8.929 × 10 6
DBM – Algorithm 2 + 5.672 × 10 8 + 2.243 × 10 3
iDPP [12] + 0.0 + 1.510 × 10 8
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Piazza, M.; Bertolazzi, E.; Frego, M. A Non-Smooth Numerical Optimization Approach to the Three-Point Dubins Problem (3PDP). Algorithms 2024, 17, 350. https://doi.org/10.3390/a17080350

AMA Style

Piazza M, Bertolazzi E, Frego M. A Non-Smooth Numerical Optimization Approach to the Three-Point Dubins Problem (3PDP). Algorithms. 2024; 17(8):350. https://doi.org/10.3390/a17080350

Chicago/Turabian Style

Piazza, Mattia, Enrico Bertolazzi, and Marco Frego. 2024. "A Non-Smooth Numerical Optimization Approach to the Three-Point Dubins Problem (3PDP)" Algorithms 17, no. 8: 350. https://doi.org/10.3390/a17080350

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