EGO-Planner: a local path planning method without ESDF (Euclidean distance field) gradient

0 abstract

based ongradientThe planner is widely used in quadcopterslocal path planning,inEuclidean distance field (ESDF)for assessmentGradient magnitude and directionCrucial. However, there is a lot of redundancy in computing such a field, since the trajectory optimization process only coversESDFA very limited subspace of update range. In this paper, a method based onNo ESDFGradient planning framework significantly reduces computation time. The main improvements areThe collision term in the penalty function is formulated by comparing the collision trajectory with the collision-free guidance path. Only when the trajectory encounters a new obstacle will the generated obstacle information be stored, allowing the planner toExtract only necessary obstacle information. Then, if dynamic feasibility is violated, we wouldExtend time allotmentIntroducing anisotropic curve fitting algorithm, adjusting the trajectory while maintaining the original shapehigher order derivatives

1 Overview

1.1 Traditional methods

  • Traditional methods generally use gradient-based planners, but rely on pre-built ESDF ESDFES D F plot to evaluate the magnitude and direction of gradients and use numerical optimization to generatelocal optimal solutions. However, just buildingESDF ESDFES D F diagram is difficult,ESDF ESDFESDF calculations take up 70% of the total time spent executing local planning.70% , so, buildESDF ESDFESDF becomes the bottleneck of gradient - based planners.

1.2 How to build ESDF ESDFESDF

  • The method can be divided into incremental full update and batch local calculation. However, neither of these two methods pays attention totrajectory itself. Therefore, too much computation is spent on computing ESDF ESDF which does not contribute to planningES D F value. In other words, currently based onESDF ESDFThe ES D F method cannotServes trajectory optimization individually and directly. As shown in the figure below, for general autonomous navigation scenarios, the UAV is expected to avoid collisions locally, and the trajectory only covers a limited space within the ESDF update range. In practice, although some manual rules can determine a small ESDF range, they lack theoretical rationality and still lead to unnecessary calculations

Insert image description here

  • As shown in the figure, the trajectory during the optimization process only covers a very limited space of the ESDF update range.

  • E S D F ESDF The updated space of ES D F is the space surroundedpink

  • But the space covered during trajectory optimization (as shown in the purple part in the picture above)

  • So the trajectory only covers ESDF ESDFThe limited space of ESDF update range. In practice, although some manual rules can determine a small ESDF range, they lack theoretical rationality and still lead to unnecessary calculations .


1.3 EGO − Planner EGO-PlannerEGOIntroduction to Pl ann er

  • EGO − Planner EGO-PlannerEGOPl ann er is anESDF-free ESDFGradient-based local path planning framework for ES D F
  • EGO − Planner EGO-PlannerEGOPlanner consists of a gradient-based spline optimizer and a post-refinement procedure

1.3.1 Method steps

  • First optimize the trajectory using smoothness, collisions, and dynamic feasibility
  • vs. precomputed ESDF ESDFUnlike traditional methods of ES D F , collision costs are modeled by comparing trajectories within obstacles with guided collision-free trajectories.
  • The force is then projected onto the collision trajectory and an estimated gradient is generated to wrap the trajectory outside the obstacle
  • During the optimization process, the trajectory will bounce several times between nearby obstacles , eventually terminating in a safe area
  • This way we only calculate gradients when necessary and avoid calculating ESDF ESDF in regions that are not relevant to the local trajectoryESDF
  • 如果生成的轨迹违反动态限制,这通常是由不合理的时间分配引起的,则激活细化过程
  • 在细化期间,当超出限制时重新分配轨迹时间。随着时间分配的扩大,生成了一种新的 B B B样条,它在平衡可行性和拟合精度的同时,拟合了之前的动态不可行
  • 为了提高鲁棒性,拟合精度采用各向异性建模,在轴向和径向上有不同的惩罚

2 相关工作

2.1 基于梯度的运动规划

  • 基于梯度的运动规划是无人机局部轨迹生成的主流,这是一种无约束的非线性优化
  • 许多框架利用其丰富的梯度信息,直接优化配置空间的轨迹
  • 还有一种连续时间多项式的轨迹优化方法,但是,势函数积分导致了很大的计算代价
  • 还有就是老朋友 B − S p l i n e B-Spline BSpline的参数化,利用其凸包特性
  • 通过寻找无碰撞路径(通常可由采样的路径规划找出,比如 K i n o d y n a m i c Kinodynamic Kinodynamic R R T ∗ RRT* RRT),将无碰撞的初始路径作为前端,成功率显著提高
  • 当初始无碰撞路径的生成考虑动力学约束的同时,性能会进一步提高
  • 结合感知意识,鲁棒性提升明显
  • E S D F ESDF ES D F plays a vital role in assessing the distance to nearby obstacles in terms of gradient magnitude and direction.

2.2 E S D F ESDF ESDF

  • E S D F ESDFESDF has long been used to construct objects from noisy sensor data. Some scholars have proposed an envelope algorithm that converts ESDF ESDFThe time complexity of ES D F construction is reduced to O ( n ) O(n)O ( n ) ;nnn is expressed as the number of voxels. This algorithm does not work withESDF ESDFIncremental construction of ES D F , while dynamic update fields are often required during quadcopter flight. To solve this problem,O leynikova OleynikovaOl ey nik o v a andHan HanH an proposed incrementalESDF ESDFESDF generation method, Voxblox VoxbloxVoxblox F I E S T A FIESTA F I EST A . Although these methods are very efficient in dynamic update situations, the resultingESDF ESDFESDF almost always contains redundant information that may not be used in the planning process at all. As shown above, the trajectory only sweeps the entireESDF ESDFA very limited subspace of the ES D F update range. Therefore, there is value in designing a smarter, more lightweight approach rather than maintaining the entire domain.

2.3 Collision avoidance

  • The decision variable is BBControl point QQ of B- spline curveQ. _ EveryQQQ each independently has its own environment information. At the beginning, a BBthat satisfies the constraints but does not consider obstacles is generated.B- spline curveΦ ΦΦ , next, for each collision segment detected in the iteration, use some algorithms (such as A*, RRT* and other global planning algorithms) to generate a collision-free pathΓ ΓΓ . For each control point Q i Q_iof the colliding line segmentQi, will generate a positioning point pij p_{ij} on the obstacle surface.pij, and corresponds to a repulsive direction vector vij v_{ij}vij v i j v_{ij} vijwith vector Q i Q_iQi p i j p_{ij} pijIn the same direction, it should not be equal here, because this vij v_{ij}vijIt is just a unit direction vector, just look at the red dotted and solid lines in the figure below. Each pair p , v {p, v}p,v corresponds to a specific control pointQ i Q_iQi, this can also be seen from the figure, as shown in the figure below.

Insert image description here


  • for i ∈ N + i ∈ N+iN + represents the index of the control point,j ∈ N j ∈ NjN means { p , vp, v p,Index of v } pair. Note that each { p , vp, v p,v } pairs belong only to one specific control point. For the sake of brevity, the subscriptsijij without causing ambiguity. Then fromQ i Q_iQito the jjthThe obstacle distance of j obstacles is defined as

  • p , v {p, v} p,How is v generated?
  • Trajectory through obstacles Φ ΦΦ is the control pointQQQ generates several(p, v) (p, v)(p,v ) to
  • p p p is a point on the obstacle surface ( pp was mentioned earlierp is determined by the control pointQQQ generated),vvv is from the control pointQQQ points toppunit vector of p )
  • Perpendicular to the tangent vector R i R_iRi这个切向量,仔细看,就是之前用 A ∗ A* A 生成的那条的不考虑碰撞的曲线的切线)的平面 Ψ Ψ Ψ Γ Γ Γ Γ Γ Γ是那一条无碰撞路径)相交,形成一条线 l l l,从中确定 p , v {p,v} p,v 对。 距离场定义 d i j = ( Q i − p i j ) ⋅ v i j d_{ij} = (Q_i − p_{ij} ) · v_{ij} dij=(Qipij)vij 的切片可视化。颜色表示距离,箭头是等于 v v v 的相同梯度。 p p p 在平面上(障碍物表面上的点,如图 c c c )。
    Insert image description here

2.3.1 算法1: C h e c k A n d A d d O b s t a c l e I n f o CheckAndAddObstacleInfo C h e c k A n d A dd O b s t a c l e I n f o


Insert image description here


Pseudocode analysis:

  1. F i n d C o n s e c u t i v e C o l l i d i n g S e g m e n t ( Q ) : FindConsecutiveCollidingSegment(Q): F in d C o n sec u t i v e C o ll i d in g S e g m e n t ( Q ) : Find the control pointQQQThe obstacle that collides with and determines whether it exists
  2. G e t C o l l i s i o n S e g m e n t ( ) : GetCollisionSegment(): G e tC o ll i s i o n S e g m e n t ( ) : Extract and control pointQQQColliding obstacles
  3. . p u s h _ b a c k ( ) : .push\_back(): .p u s h _ bac k ( ) : Add obstacles to the obstacle set SSS in
  4. P a t h S e a r c h ( ) : PathSearch(): P a t h S e a rc h ( ) : Generate a collision-free path for obstacles
  5. F i n d _ p _ v _ P a i r s ( Q , p a t h ) : Find\_p\_v\_Pairs(Q, path): Find_p_v_Pairs(Q,p a t h ) : The matching(p, v) (p, v)(p,v ) to
  • Q i Q_i Qito the jjthThe distance between j obstacles is as follows, you need to pay attention to the unit vectorvvv will not change again after the first generation, sodij d_{ij}dijThe value of is divided into positive and negative, dij = ( Q i − pij ) ⋅ vij d_{ij} = (Q_i − p_{ij} ) · v_{ij}dij=(Qipij)vij
  • Through the above formula, we can use it to determine the control point Q i Q_iQi
  • Because as I said before, vij v_{ij} among the old obstaclesvijwith vector Q i Q_iQi p i j p_{ij} pijin the same direction, then the vector Q i Q_iQip i j p_{ij}pijThat is − ( Q i − pij ) -(Q_i - p_{ij})(Qipij) , which is the same asvij v_{ij}vijin the same direction, while ( Q i − pij ) (Q_i - p_{ij})(Qipij) must be the same asvij v_{ij}vijIn reverse, if it is not a newly discovered obstacle, then dij = ( Q i − pij ) ⋅ vij d_{ij} = (Q_i − p_{ij} ) · v_{ij}dij=(Qipij)vijThe calculation must be dij < 0 d_{ij} < 0dij<0 (the two are in opposite directions), and fornewly discovered obstacles, it must bedij = ( Q i − pij ) ⋅ vij d_{ij} = (Q_i − p_{ij} ) · v_{ij}dij=(Qipij)vij, calculated as dij > 0 d_{ij} > 0dij>0

In summary, in order to prevent the trajectory from being pulled out in front of the current obstacle, in order to avoid repeated { p , v } \{p, v\} before the trajectory escapes from the current obstacle in the first few iterations{ p,v } pair, { p , v } \{p,v\}is generated repeatedly during the iteration process{ p,v } Yes, the criterion for judging whether it is a new obstacle is: if the control pointQ i Q_iQiWhen in an obstacle, and for all obstacles jj currently obtainedj satisfiesdij > 0 d_{ij} >0dij>0 , the obstacle is anewly discoveredobstacle, so only the obstacle information that affects the trajectory is calculated and the running time is reduced.

2.3.2 Summary of collision force estimation

In order to incorporate the necessary* environmental awareness into local planning, an objective function needs to be explicitly constructed ( designing a gradient-based trajectory optimizer ) to keep the trajectory clear of obstacles. ESDF ESDFESDF provides this crucial collision information at the cost of a heavy computational burden. In addition, as shown in Figure2 22 , due toESDF ESDFInsufficient error information returned by ES D F , based on ESDF ESDFThe planner of ES D F can easily get stuck ina local minimumand cannot escape the obstacle. To avoid this, an additional front end is always needed to provide a collision-free initial trajectory. Since explicitly designed repulsions are quite effective for different tasks and environments, the above methodESDF ESDFimportant information forcollision avoidance.ESDF


Insert image description here


3 Gradient-based trajectory optimizer

3.1 Modeling

  • This article uses uniform BBB- spline curveΦ ΦΦ represents the trajectory, and its order ispb p_bpb, uniform BBEach node of the B -spline curve has the same time interval{ t 1 , t 2 , . . . , t M } \{t_1, t_2, ... , t_M\}{ t1,t2,...,tM} , the time interval between each node and its parent node is the same, which is:△ t = tm + 1 − tm △_t = t_{m+1} - t_mt=tm+1tm
  • B B The first property of the B -spline curve, that is, the convex hull property, shows that a certain section of the curve is only related topb + 1 p_b+1pb+1 continuous control point (Q ∈ R 3 \mathrm{Q} \in \mathbb{R}^3QR3 ) is related, and the curve is contained within the convex hull formed by these points, such asBBB -spline(ti, ti + 1) (t_i, t_{i+1})(ti,ti+1) 内的跨度位于由 { Q i − p b , Q i − p b + 1 , . . . , Q i } \{Q_i - p_b, Q_{i - p_b + 1}, ... , Q_i\} { Qipb,Qipb+1,...,Qi} 形成的凸包内
  • B B B 样条曲线的第二个性质表面, B B B 样条曲线的 k k k 阶导数仍然是 p b − k p_b−k pbk B B B 样条曲线,由于时间间隔 △ t △_t t 是相同的,轨迹 Φ Φ Φ 的一阶( V i V_i Vi)、二阶( A i A_i Ai)、三阶( J i J_i Ji)导数的控制点分别为:V i = Q i + 1 − Q i Δ t , A i = V i + 1 − V i Δ t , J i = A i + 1 − A i Δ t \mathbf{V }_i=\frac{\mathbf{Q}_{i+1}-\mathbf{Q}_i}{\Delta t}, \mathbf{A}_i=\frac{\mathbf{V}_{i+ 1}-\mathbf{V}_i}{\Delta t}, \mathbf{J}_i=\frac{\mathbf{A}_{i+1}-\mathbf{A}_i}{\Delta t}Vi=ΔtQi+1Qi,Ai=ΔtVi+1Vi,Ji=ΔtAi+1Ai
  • In fact, the general framework is Fast − P lanner Fast-PlannerFastPlanner 's framework ,HKUST HKUSTHK U ST is still awesome
  • Then according to UAV UAVUAV 的微分平坦特性,需要降低要规划的变量,优化问题被重新定义为: min ⁡ Q J = λ s J s + λ c J c + λ d J d \min _{\mathrm{Q}} J=\lambda_s J_s+\lambda_c J_c+\lambda_d J_d QminJ=λsJs+λcJc+λdJd

微分平坦特性,在做轨迹规划的过程中不可能对 U A V UAV UAV 12 12 12 维的全维度空间进行规划,这是非常复杂的,但可以找到一个平坦输出的空间,这个空间只有四个维度的变量,位置 x , y , z x,y,z x,y,z和偏航角 Ψ Ψ Ψ剩下所有的状态都能用这四个变量和其有限阶导数的代数组合所表示,因此在做无人机轨迹规划的时候只需要对这四个变量进行规划就可以了。

  • 是不是很熟悉?这其实就是在贝塞尔曲线那里的三个惩罚项函数
  • J s J_s Jsis the smooth term penalty, J c J_cJcis the collision term penalty, J d J_dJdis the dynamic feasible item penalty, λ λλ isthe weight of the penalty term

3.1.1 Smooth term penalty

  • In B − Spline B-SplineBSPL in e trajectory optimization was proposed, you can check out my previousB log BlogBl o g , has been mentioned. The smoothness penalty is formulated asthe time integralover the squared derivative ofacceleration, jerk, etc.. Thanks toBBThe convex hull property of B -spline curves, as long as the trajectory Φ Φis minimizedThe sum of squares of the second-order and third-order control points of Φ can effectively reduce the sum of squares of acceleration and jerk (similar tominimum minimumminimum s n a p snap s na p , this thing is really classic, used everywhere), the formula is as follows: J s = ∑ i = 1 N c − 2 ∥ A i ∥ 2 2 + ∑ i = 1 N c − 3 ∥ J i ∥ 2 2 J_s=\sum_{i=1}^{N_c-2}\left\|A_i\right\|_2^2+\sum_{i=1}^{N_c-3}\left\|J_i\right\| _2^2Js=i=1Nc2Ai22+i=1Nc3Ji22

3.1.2 Collision penalty

  • The collision penalty moves the control point away from the obstacle by taking a safety gap and penalizing the control point dij < sf d_{ij}< s_fdij<sfto achieve. In order to further optimize, a quadratic continuously differentiable penalty function is constructed , and as dij d_{ij}dijdecreases to suppress its slope, thus obtaining the piecewise function: jc ( i , j ) = { 0 , cij ≤ 0 cij 3 , 0 ≤ cij ≤ sf 3 sfcij 2 − 3 sf 2 cij + sf 3 , cij > sf j_c(i, j)= \begin{cases}0, & c_{ij} \leq 0 \\ c_{ij}^3, & 0 \leq c_{ij} \leq s_f \\ 3 s_f c_{ij} ^2-3 s_f^2 c_{ij}+s_f^3, & c_{ij}>s_f\end{cases}jc(i,j)= 0,cij3,3 sfcij23 sf2cij+sf3,cij00cijsfcij>sf
    c i j = s f − d i j c_{i j}=s_f-d_{i j} cij=sfdij
  • Summing the penalties for all control points gives the total collision term penalty: J c = ∑ i = 1 N cjc ( Q i ) J_c=\sum_{i=1}^{N_c} j_c\left(Q_i\right)Jc=i=1Ncjc(Qi)
  • Compared with the traditional trilinear interpolation method to find the gradient of the collision term, the quadratic continuously differentiable penalty function pair Q i Q_i is directly calculatedQi 的导数来得到梯度: ∂ j c ∂ Q i = ∑ i = 1 N c ∑ j = 1 N p { 0 , c i j ≤ 0 − 3 c i j 2 , 0 ≤ c i j ≤ s f − 6 s f c i j + 3 s f 2 , c i j > s f \frac{\partial j_c}{\partial Q_i}=\sum_{i=1}^{N_c} \sum_{j=1}^{N_p} \begin{cases}0, & c_{i j} \leq 0 \\ -3 c_{i j}^2, & 0 \leq c_{i j} \leq s_f \\ -6 s_f c_{i j}+3 s_f^2, & c_{i j}>s_f\end{cases} Qijc=i=1Ncj=1Np 0,3 cij2,6 sfcij+3 sf2,cij00cijsfcij>sf

3.1.3 Feasible item penalty

  • Its feasibility is ensured by limiting the high-order derivatives of the trajectory in each dimension . Due to the nature of the convex hull, constraining the derivatives of the control points is sufficient to constrain the entire BBB -splines. F ( ) F()F ( ) is for each dimension (velocity accelerationJ erk JerkPenalty function constructed from higher-order derivatives of J er k ): J d = ∑ i = 1 N c − 1 ω v F ( V i ) + ∑ i = 1 N c − 2 ω a F ( A i ) + ∑ i = 1 N c − 3 ω j F ( J i ) J_d=\sum_{i=1}^{N_c-1} \omega_v F\left(V_i\right)+\sum_{i=1}^{N_c- 2} \omega_a F\left(A_i\right)+\sum_{i=1}^{N_c-3} \omega_j F\left(J_i\right)\\Jd=i=1Nc1ohvF(Vi)+i=1Nc2ohaF(Ai)+i=1Nc3ohjF(Ji)
    F ( C ) = ∑ r = x , y , z f ( c r ) F(C)=\sum_{r=x, y, z} f\left(c_r\right) F(C)=r=x,y,zf(cr)
    f ( c r ) = { a 1 c r 2 + b 1 c r + c 1 , c r < − c j ( − λ c m − c r ) 3 , − c j < c r < − λ c m 0 , − λ c m ≤ c r ≤ λ c m ( c r − λ c m ) 3 , λ c m < c r < c j a 2 c r 2 + b 2 c r + c 2 , c r > c j f\left(c_r\right)= \begin{cases}a_1 c_r^2+b_1 c_r+c_1, & c_r<-c_j \\ \left(-\lambda c_m-c_r\right)^3, & -c_j<c_r<-\lambda c_m \\ 0, & -\lambda c_m \leq c_r \leq \lambda c_m \\ \left(c_r-\lambda c_m\right)^3, & \lambda c_m<c_r<c_j \\ a_2 c_r^2+b_2 c_r+c_2, & c_r>c_j\end{cases} f(cr)= a1cr2+b1cr+c1,(λcmcr)3,0,(crλcm)3,a2cr2+b2cr+c2,cr<cjcj<cr<λcmλcmcrλcmλcm<cr<cjcr>cj

It can be seen that the penalty functions applied in problem modeling are all polynomial sums, which is beneficial to reducing the complexity of solving optimization problems. (Lightweight algorithm)

3.2 Optimization solution (numerical optimization)

  • Ratio: min ⁡ QJ = λ s J s + λ c J c + λ d J d \min _{\mathrm{Q}} J=\lambda_s J_s+\lambda_c J_c+\lambda_d J_dQminJ=lsJs+lcJc+ldJdwill continue to change as new obstacles are added, which requires the solver to restart and solve quickly, and the objective function mainly consists of quadratic terms, so Hessian HessianHessian ( Hessian matrix) information can speed up convergence. But get the exactHessian HessianHess ian consumes a lot of computer resources. So use the quasi-Newton method (quasi − N ewton quasi-NewtonquasiNewton m e t h o d s methods m e t h o d s ) Approximately calculate Hessian Hessianfrom gradient informationHessian
  • B arzilai − B orwein Barzilai- BorweinBarz i l ai _ _Borwein m e t h o d method method t r u n c a t e d truncated truncated N e w t o n Newton Newton m e t h o d method method L − B F G S L-BFGS LBFGS m e t h o d h methodh After m e t h o d h , it was found that L − BFGS L-BFGSLBFGS performs best, balancing restart loss and inverseHessianThe accuracy of the Hessian estimate. L − BFGS L-BFGSLBFGS evaluates the approximate Hessianfrom the previous objective functionHess ian , but requires a series of iterations to reach a relatively accurate estimate

4 Time redistribution and trajectory further optimization

  • Exact time allocation before optimization is unreasonable because no information about the final trajectory is known at that time, so an additional time reallocation procedure is crucial to ensure dynamic feasibility
  • Previously, the trajectory was parameterized as non-uniform BB.B -splines that iteratively lengthen a subset of the node spans when some segments exceed the derivative limit
  • However, a node spans △ tn △t_{n}tnCan affect multiple control points, causing discontinuities in higher-order derivatives of the previous trajectory when adjusting node spans near the start state
  • So the safe trajectory Φ s Φ_s obtained from the previous sectionPhis, after reasonable time reallocation, regenerate a BB with even time allocation and reasonableB- spline curveΦ f Φ_fPhif, and then use the anisotropic curve fitting method ( an anan a n i s o t r o p i c anisotropic anisotropic c u r v e curve curve f i t t i n g fitting fitting m e t h o d method method)使 Φ f Φ_f PhifWhile maintaining shape with Φ s Φ_sPhisalmost the same derivative shape at the same time (since Φ s Φ_sPhisare safe trajectories, so the shapes must be more or less the same), and can freely optimize their control points to satisfy the constraints of higher-order derivatives

4.1 Specific steps

  • First like Fast − P lanner Fast-PlannerFastAs Planner did, calculate the limit exceedance rate ( the maximum proportion exceeding the limit , subscriptmmm 表示限制的最大值): r e = max ⁡ { ∣ V i , r / v m ∣ , ∣ A j , r / a m ∣ , ∣ J k , r / j m ∣ 3 , 1 } r_e=\max \left\{\left|\mathbf{V}_{i, r} / v_m\right|, \sqrt{\left|\mathbf{A}_{j, r} / a_m\right|}, \sqrt[3]{\left|\mathbf{J}_{k, r} / j_m\right|},1\right\} re=max{ Vi,r/vm,Aj,r/am ,3Jk,r/jm ,1}
  • we r_ereShow that relative to Φ s Φ_sPhisIn other words, Φ f Φ_fPhifHow much time needs to be allocated
  • V i V_iViA j A_jAjand J k J_kJkare respectively with △ t △t The first, second and third orders of t are inversely proportional. The speed and its derivatives can be reduced through the inverse relationship with time.
  • Obtained Φ f Φ_fPhifThe new time interval is: Δ t ′ = re Δ t \Delta t^{\prime}=r_e \Delta tΔt=reΔt
  • By solving a closed- form least squares problem as follows, the initial generation time span is Δ t ′ \Delta t^{\prime} under the constraints of velocity and its derivativesΔt ’s trajectoryΦ f Φ_fPhif, while maintaining and Φ s Φ_sPhisThe same shape and number of control points, and then recalculate the smoothness term penalty and feasibility term penalty to get a new objective function: min ⁡ QJ ′ = λ s J s + λ d J d + λ f J f \min _{\mathbf{ Q}} J^{\prime}=\lambda_s J_s+\lambda_d J_d+\lambda_f J_fQminJ=lsJs+ldJd+lfJf
  • λ f \lambda_flfis the weight of the fitness ( fitting ) term, J f J_fJfis defined as from Φ f ( α T ′ ) Φ_f(αT′)Phif( α T ) toΦ s ( α T ) Φ_s(αT)Phis( α T ) Integral of anisotropic displacement (α ∈ [0, 1] α∈[0, 1]a[ 0 , 1 ] ), whereTTT andT′ T′T is the trajectoryΦ s Φ_sPhisΦ f Φ_fPhifthe duration of
  • Since the fitted curve Φ s Φ_sPhisIt is already collision-free ( just said Φ s Φ_sPhisis a safe trajectory ), so for the two curves, use the axial displacement da d_a with low weight daTo relax the smooth adjustment restrictions , use a high-weighted radial displacement dr d_rdrto prevent collisions , as shown in the figure below,

Insert image description here


  • Use a spherical metric (it seems to have been mentioned in one of the teacher's articles, I forgot the details) to make the displacement on the surface of the same sphere produce the same penalty. (About radial displacement and axial displacement should be understood in the specific algorithm,At present, I think that the axial displacement is the tangent direction of the point, and the radial direction is the perpendicular direction of the tangent line. The calculation formulas for both are as follows:)
    d a = ( Φ f − Φ s ) ⋅ Φ ˙ s ∥ Φ ˙ s ∥ d r = ∥ ( Φ f − Φ s ) × Φ ˙ s ∥ Φ ˙ s ∥ ∥ \begin{aligned} d_a &=\left(\Phi_f-\boldsymbol{\Phi}_s\right) \cdot \frac{\dot{\Phi}_s}{\left\|\dot{\Phi}_s\right\|}\\ d_r &=\left\|\left(\Phi_f-\boldsymbol{\Phi}_s\right) \times \frac{\dot{\Phi}_s}{\left\|\dot{\Phi}_s\right\|}\right\| \end{aligned} dadr=( FfPhis) Phi˙s Phi˙s= ( FfPhis)× Phi˙s Phi˙s

  • Used to measure Φ f ( α T ′ ) Φ_f(αT′)Phif( α T ) penalty size ellipsoid is an ellipsoid withΦ f ( α T ′ ) Φ_f(αT′)Phif( α T ) is the center of the ellipse, and its semi-major axis length isaaa . Its semi-minor axis length isbbb . Then the axial displacementda d_adaand radial displacement dr d_rdr 为:
    d a ( α T ′ ) = ( Φ f ( α T ′ ) − Φ s ( α T ) ) ⋅ Φ s ˙ ( α T ) ∥ Φ s ˙ ( α T ) ∥ d r ( α T ′ ) = ∥ ( Φ f ( α T ′ ) − Φ s ( α T ) ) × Φ s ˙ ( α T ) ∥ Φ s ˙ ( α T ) ∥ ∥ \begin{aligned} &d_a\left(\alpha T^{\prime}\right)=\left(\Phi_f\left(\alpha T^{\prime}\right)-\Phi_s(\alpha T)\right) \cdot \frac{\dot{\Phi_s}(\alpha T)}{\left\|\dot{\Phi_s}(\alpha T)\right\|} \\ &d_r\left(\alpha T^{\prime}\right)=\left\|\left(\Phi_f\left(\alpha T^{\prime}\right)-\Phi_s(\alpha T)\right) \times \frac{\dot{\Phi_s}(\alpha T)}{\left\|\dot{\Phi_s}(\alpha T)\right\|}\right\| \end{aligned} da( αT _)=( Ff( αT _)Phis( α T ) ) Phis˙( α T ) Phis˙( α T )dr( αT _)= ( Ff( αT _)Phis( α T ) )× Phis˙( α T ) Phis˙( α T )

  • Then the fitting term can be expressed as:
    J f = ∫ 0 1 [ da ( α T ′ ) 2 a 2 + dr ( α T ′ ) 2 b 2 ] d α J_f=\int_0^1\left[\frac{d_a \left(\alpha T^{\prime}\right)^2}{a^2}+\frac{d_r\left(\alpha T^{\prime}\right)^2}{b^2}\ right] \mathrm{d} \alphaJf=01[a2da( αT _)2+b2dr( αT _)2]d a

  • Among them aaa andbbb are the semi-major axis and semi-minor axis of the ellipse respectively, and the semi-minor axis bbcorresponding to the radial displacementb Increase the penalty weight of radial displacement to prevent collisions

  • The fitting term of the above formula is discretized into a limited number of points Φ f ( α Δ t ′ ) Φ_f(αΔt′)Phif( α Δ t )Φ s ( α Δ t ) Φ_s(αΔt)Phis( a D t )

  • Among them, K ∈ R \mathrm{K} \in \mathbb{R}KR 0 ≤ k ≤ [ T / △ t ] 0 \leq k \leq [T/△t] 0k[T/△t]

5 Experimental results

5.1 Algorithm framework


Insert image description here


  • Code analysis
  • F i n d I n i t ( Q , G ) : FindInit(Q, G): FindInit(Q,G ) : Generate a BBthat satisfies terminal constraints but does not consider obstacles.B- spline curveΦ ΦThe control point corresponding to Φ corresponds to the initialization step.
  • I s C o l l i s i o n F r e e ( E , Q ) : IsCollisionFree(E, Q): IsCollisionFree(E,Q ) : Determine whether the control point is collision-free in the environment. If there is a collision,falsef a l se , outputtrue truetrue
  • C h e c k A n d A d d O b s t a c l e I n f o ( E , Q ) : CheckAndAddObstacleInfo(E, Q): C h e c k A n d A dd O b s t a c l e I n f o ( E ,Q ) : Detect the obstacles where the control points are located and add obstacle information ({ p, v} \{p, v\}{ p,v } pair and distance field)
  • E v a l u a t e P e n a l t y ( Q ) : EvaluatePenalty(Q): E v a l u a t e P e na lt y ( Q ) : Construct corresponding penalty terms for control points based on problem modelingJJJ and the corresponding gradient (this penalty term is the three penalties, the smooth term penalty, the collision term penalty, and the feasible term penalty)
  • O n e S t e p O p t i m i z e ( J , G ) : OneStepOptimize(J, G): OneStepOptimize(J,G ) : Solve the minimization problem of the penalty term, that is,the optimization solution, thereby obtaining the control point position that satisfies the minimization of the penalty term, that is, completing the first step of trajectory optimization
  • I s F e a s i b l e ( Q ) : IsFeasible(Q): I s F e a s ib l e ( Q ) : Judgment is determined by control pointQQWhether the trajectory determined by Q is feasible (mainly whether the speed and its multi-order derivatives exceed the limiting maximum value)
  • R e A l l o c a t e T i m e ( Q ) : ReAllocateTime(Q): R e A ll oc a t e T im e ( Q ) : By reassigning the control pointQQThe time reduction speed of the trajectory determined by Q and its multi-order derivatives make it meet various speed constraints.
  • C u r v e F i t t i n g O p t i m i z e ( Q ) : CurveFittingOptimize(Q): C u r v e F i tt in g Opt imi ze ( Q ) : Replace the collision term in the previous penalty with a curve fitting term to solve the penalty term optimization problem. On the premise of satisfying the new time interval, it can fit the trajectory composed of the old control points to obtain a new trajectory, and achieve constrained feasibility on the premise of inheriting the collision-free characteristics of the old trajectory.

5.2 Implementation details

  • Set the order of the B-spline curve pb = 3 p_b=3pb=3 , the number of control pointsN c = 25 N_c = 25Nc=About 25 , depending on the planning and expected distance (about7m 7m7 m ) and the initial distance between adjacent points (approximately0.3 m 0.3m0.3 m ) decided. These parameters are empirically derived by balancing the complexity and degrees of freedom of the problem

  • Because according to BBAccording to the properties of B -spline curves, a control point only affects the surrounding trajectory, so the time complexity of the algorithm isO ( N c ) O(N_c)O ( Nc)

  • L − B F G S L-BFGS LThe complexity of BFGS is also linear over the same relative tolerance (T he TheThe c o m p l e x i t y complexity complexity o f of of L − B F G S L-BFGS LBFGS i s is is a l s o also also l i n e a r linear linear o n on on t h e the the s a m e same same r e l a t i v e relative relative t o l e r a n c e tolerance tolerance)

  • In collision-free path search, we use AAA star (A ∗ A*A ) algorithm performs trajectory optimization, and the trajectory it generatesΓ ΓΓ often sticks to obstacles. Therefore, we can directly useAATrajectory Γ Γgenerated by A star algorithmSelect the anchor point on Γ ( anchor anchoranchor p o i n t point point p p p without having to search the surface of the obstacle (here is the real explanation of the use ofAAThe role of the A -star algorithm). For Figure3b 3b3 vector R i R_idefined in bRi, through uniform bbThe properties of b -spline parameterization can be derived:
    R i = Q i + 1 − Q i − 1 2 Δ t \mathbf{R}_i=\frac{\mathbf{Q}_{i+1}-\ mathbf{Q}_{i-1}}{2 \Delta t}Ri=tQi+1Qi1

  • Here R i R_iRiIt is determined in the figure below that { p , v } \{p,v\}{ p,v } The key to right


Insert image description here


After reading this, let’s look at Figure 3 in the paper : 3:3 :
Step 1: Generate aBBB- spline curveΦ ΦΦ , relying onAATrajectory Γ Γgenerated by A star algorithmΓStep
2: According to the aboveR i R_iRiFormula via BBThe control points of the B -spline curve calculate the vectorR i R_iRi, and then make a perpendicular to R i R_iRiThe plane Ψ ΨΨ , planeΨΨΨ and rely onAATrajectory Γ Γgenerated by A star algorithmΓ intersects at the anchor point (anchor anchoranchor p o i n t point point p p p,连接对应的定位点( a n c h o r anchor anchor p o i n t point point p p p 与控制点 Q Q Q,才得到直线 l l l,而向量 v v v 是向量 l l l 对应的由起点控制点 Q Q Q 到终点定位点 p p p 对应的单位向量。( v v v 可能是生成以后不会再变化的)。到这里才生成了 { p , v } \{p,v\} { p,v}
Q : Q: Q关于 { p , v } \{p,v\} { p,v } In the process, why is the anchor pointppp locatesAAIs the trajectory generated by the A- star algorithm close to the obstacle rather than directly positioned on the surface of the obstacle?
A:A:A : NeckA ∗ A*The trajectory generated by the A * algorithm must be a safe and collision-free trajectory. Secondly, if it is directly positioned on the surface of the obstacle, because this is a simulation, errors will inevitably occur, making the results inconsistent with the results obtained in the real world. Furthermore, use A*A*The computing power of trajectory positioning generated by the A algorithm is lowerthan that of positioning directly on the obstacle surface, so whether it is to leave a stable margin or to reduce the calculation power, you still choose to useA ∗ A*A * algorithm for positioning.


Insert image description here


6 Summary

This method still has some flaws, namely A ∗ A*The A * algorithm searches for local minima introduced and the uniform time redistribution introduces conservative trajectories. Therefore, we will work on performing topology planning to escape local minima and reformulate the problem to generate near-optimal trajectories. The planner is designed for static environments and does not need to deal with slow moving obstacles (below0.5 m/s 0.5m/s0.5 m / s ). In the future, we will study dynamic environment navigation through moving object detection and topology planning.

Guess you like

Origin blog.csdn.net/weixin_44673253/article/details/126985079