当前位置:网站首页>Study Notes 11--Direct Construction of Local Trajectories
Study Notes 11--Direct Construction of Local Trajectories
2022-07-30 09:53:00 【FUXI_Willard】
本系列博客包括6个专栏,分别为:《自动驾驶技术概览》、《自动驾驶汽车平台技术基础》、《自动驾驶汽车定位技术》、《自动驾驶汽车环境感知》、《自动驾驶汽车决策与控制》、《自动驾驶系统设计及应用》.
此专栏是关于《自动驾驶汽车决策与控制》书籍的笔记.
2.Car local trajectory planning
2.2 Local trajectory direct construction method
2.2.1 直线/Circular arc segment structure
Assumes that the cars are driven forward,Dubins曲线是在满足曲率约束和规定的始端和末端的切线方向的条件下,连接两个二维平面(即X-Y平面)的最短路径;If the car can also reverse driving,则路径为Reeds-Shepp曲线;
对于汽车,Simple kinematics model for:
{ x ˙ = v cos θ y ˙ = v sin θ θ ˙ = u (1) \begin{cases} &\dot{x}=v\cos\theta\\ &\dot{y}=v\sin\theta\\ &\dot{\theta}=u \end{cases}\tag{1} ⎩⎨⎧x˙=vcosθy˙=vsinθθ˙=u(1)
其中: ( x , y ) (x,y) (x,y)Is the location of the car, θ \theta θ是航向,The car at a constant speed v v v移动,Turning speed control u u u是有界的;
Best path types can use similar to vehicle driving behavior"右转( R ),左转(L),直线(S)"Description to express;
The best path is always one of the six types:RSR,RSL,LSR,LSL,RLR,LRL;
实例说明: Consider for some given the initial position and end position and tangent,The best path is shown asRSR类型,Show car marching order:Turn right arc( R ),直线段(S),Turn right arc( R );The sequence formation of the shortest curve,将起始点 A A A连接到终点 B B B,And at each endpoint curve tangent condition,And size of curvature is less than the given value at that point;
2.2.2 Polynomial helix structure

Represents the type of curvature arc length can be used(Corresponding path of s s s轴)A polynomial function of curves;
使用三阶(Cubic)Or five order(Quintic)多项式螺旋线,其曲率 κ \kappa κAnd the trajectory arc length s s s的关系 κ ( s ) \kappa(s) κ(s)的关系如下:
- 三阶: κ ( s ) = κ 0 + κ 1 s + κ 2 s 2 + κ 3 s 3 \kappa(s)=\kappa_0+\kappa_1{s}+\kappa_2s^2+\kappa_3s^3 κ(s)=κ0+κ1s+κ2s2+κ3s3;
- 五阶: κ ( s ) = κ 0 + κ 1 s + κ 2 s 2 + κ 3 s 3 + κ 4 s 4 + κ 5 s 5 \kappa(s)=\kappa_0+\kappa_1{s}+\kappa_2s^2+\kappa_3s^3+\kappa_4s^4+\kappa_5s^5 κ(s)=κ0+κ1s+κ2s2+κ3s3+κ4s4+κ5s5;
Based on the use of third order(五阶)Spiral connection path,Its parameters by gradient descent(Gradient Descent)Rapid and efficient method to search;
In the third order polynomial, for example:Considering initial stance from the car q i n i t = ( x 1 , y 1 , θ 1 , κ 1 ) q_{init}=(x_1,y_1,\theta_1,\kappa_1) qinit=(x1,y1,θ1,κ1)To the target position q g o a l = ( x G , y G , θ G , κ G ) q_{goal}=(x_G,y_G,\theta_G,\kappa_G) qgoal=(xG,yG,θG,κG),With continuous curvature and third-order helix;在初始状态时,Considering the curvature of the first derivative and second derivative are need to meet the initial state restrictions,可得:
κ 0 = κ 1 κ 1 = d κ ( 0 ) / d s κ 2 = d 2 κ ( 0 ) / d s 2 (2) \begin{aligned} &\kappa_0=\kappa_1\\ &\kappa_1=d\kappa(0)/ds\\ &\kappa_2=d^2\kappa(0)/ds^2 \end{aligned}\tag{2} κ0=κ1κ1=dκ(0)/dsκ2=d2κ(0)/ds2(2)
2.2.3 样条曲线
- Curve interpolation is after all the given points method,Curve fitting is generated curve approximation to the given point;
- For car motion planning and control system,Based on spline interpolation trajectory can make automobile control points,Increase the fitting curve and the degree of match the target trajectory;
- Spline curve by numerical calculation,Using the parameter adjustment curve to approximate polygon and get,Is based on the polygon edges and constructed the smooth curve points;The shape of a spline curve is influenced by the number and location of polygon vertices,Which is used to determine the spline curve of polygon is referred to as the characteristics of the spline curve polygon or control polygon,Polygon vertices is called spline curve control points,Spline curve in data fitting need through the given point type called value point;
Some commonly used curve structure:
BezierCurve structure
一段 n n n次BezierCurve expression is:
P ( u ) = ∑ i = 0 n B i n ( u ) P i , u ∈ [ 0 , 1 ] (3) P(u)=\sum_{i=0}^nB_{i}^n(u)P_i,u\in[0,1]\tag{3} P(u)=i=0∑nBin(u)Pi,u∈[0,1](3)B i n ( u ) = n ! i ! ( n − i ) ! u i ( 1 − u ) n − i , i ∈ { 0 , 1 , … , n } (4) B_{i}^n(u)=\frac{n!}{i!(n-i)!}u^i(1-u)^{n-i},i\in\{0,1,\dots,n\}\tag{4} Bin(u)=i!(n−i)!n!ui(1−u)n−i,i∈{ 0,1,…,n}(4)
其中: u u u是位置参数, P i P_i Pi是Bezier曲线的控制点;
BezierCurve control points roughly describes the curve to the,By controlling the control points of curves can control the shape of the curve;All the control points of a polygon is called curve characteristics of poly;
In the planning when the car path,The commonly used geometric properties:
端点性质
Curve begins with the first control point,Ending at the last control point;
P ( 0 ) = P 0 , P ( 1 ) = P n (5) P(0)=P_0,P(1)=P_n\tag{5} P(0)=P0,P(1)=Pn(5)The starting and end pointBezierCurve tangent to feature polygons respectively the first and last a while;
T ( 0 ) = n ( P 1 − P 0 ) , T ( 1 ) = n ( P n − P n − 1 ) (6) T(0)=n(P_1-P_0),T(1)=n(P_n-P_{n-1})\tag{6} T(0)=n(P1−P0),T(1)=n(Pn−Pn−1)(6)BezierStarting and end point of the second derivative curve respectively, and the former only3A control point and the last3个控制点有关;
S ( 0 ) = n ( n − 1 ) ( P 2 − 2 P 1 + P 0 ) , S ( 1 ) = n ( n − 1 ) ( P n − 2 P n − 1 + P n − 2 ) (7) S(0)=n(n-1)(P_2-2P_1+P_0),S(1)=n(n-1)(P_n-2P_{n-1}+P_{n-2})\tag{7} S(0)=n(n−1)(P2−2P1+P0),S(1)=n(n−1)(Pn−2Pn−1+Pn−2)(7)
凸包性
Bezier曲线 P ( u ) P(u) P(u)Is the control point P i P_i Pi的凸线性组合,Curve on control points constitute the convex hull of;When the control points constitute the characteristics of the polygon is a convex,整条BezierCurve is convex,The curve without inflection point(拐点);
几何不变性
If meet continuous position constraint condition,You need two control points,The curve of the1个和最后1个控制点;If meet the direction continuity conditions,则需要4个控制点,前2The last two points of control and;If meet the curvature constraints,则需要6个控制点,前3个和最后3个控制点;
S ( 0 ) = n ( n − 1 ) ( P 2 − 2 P 1 + P 0 ) c ( u ) = [ P x ′ ( u ) P y ′ ′ ( u ) − P x ′ ′ ( u ) P y ′ ( u ) / ∣ ∣ P ′ ( u ) ∣ ∣ 3 ] (8) S(0)=n(n-1)(P_2-2P_1+P_0)c(u)=[P'_x(u)P''_y(u)-P''_x(u)P'_y(u)/||P'(u)||^3]\tag{8} S(0)=n(n−1)(P2−2P1+P0)c(u)=[Px′(u)Py′′(u)−Px′′(u)Py′(u)/∣∣P′(u)∣∣3](8)
若要实现BezierThe smooth transition curve of two line,BezierCurve at least6个控制点,由于 n n n次BezierCurve has a n + 1 n+1 n+1个控制点,则BezierThe number of curve at least as5次;
BSummary of spline curve
- BFrom the bezier spline curve,But unlike Bessel curve,BSpline curve can adjust local,Avoid the bezier curve is not easy to local adjustment shortcoming,This feature is called local supportive;
- BThe advantages of spline curve with continuous curvature,Especially at junctions between adjacent curve curvature is continuous;
- Is commonly used in trajectory planning is the third orderB样条曲线,In order to meet the vehicle kinematics constraints;
A control vertex P 0 , P 1 , P 2 , … , P n P_0,P_1,P_2,\dots,P_n P0,P1,P2,…,Pn,则 k k k阶 ( k − 1 ) (k-1) (k−1)次BThe mathematic expression of the spline curve as:
P ( t ) = ∑ i = 0 n N i , k ( t ) P i (9) P(t)=\sum_{i=0}^nN_{i,k}(t)P_i\tag{9} P(t)=i=0∑nNi,k(t)Pi(9)
其中: N i , k ( t ) N_{i,k}(t) Ni,k(t)是B样条基函数, N i , k ( t ) N_{i,k}(t) Ni,k(t)Each part is calledB样条;BB-spline basis function is a k k k阶 k − 1 k-1 k−1次分段多项式,也被称为 k k k阶 k − 1 k-1 k−1次多项式样条;参数 t t tIs a set of known as node vector of decreasing sequence;
德布尔-Cox, a recursive definition:
N i , 1 ( t ) = { 1 , t i ≤ t ≤ t i + 1 , 0 , t ≤ t i , t ≥ t i + 1 , k = 1 (10) N_{i,1}(t)= \begin{cases} 1,&t_i≤t≤t_{i+1},\\ 0,&t≤t_i,t≥t_{i+1} \end{cases},k=1\tag{10} Ni,1(t)={ 1,0,ti≤t≤ti+1,t≤ti,t≥ti+1,k=1(10)N i , k = t − t i t i − k − 1 − t i N i , k − 1 ( t ) + t i + k − t t i + k − t i + 1 N i + 1 , k − 1 ( t ) , k ≥ 2 (11) N_{i,k}=\frac{t-t_i}{t_{i-k-1}-t_i}N_{i,k-1}(t)+\frac{t_{i+k}-t}{t_{i+k}-t_{i+1}}N_{i+1,k-1}(t),k≥2\tag{11} Ni,k=ti−k−1−tit−tiNi,k−1(t)+ti+k−ti+1ti+k−tNi+1,k−1(t),k≥2(11)
约定: 0 0 = 0 \frac{0}{0}=0 00=0;
The recurrence formula shows that:To determine the first i i i个 k k k阶B样条 N i , k ( t ) N_{i,k}(t) Ni,k(t),需要用 t i , t i + 1 , … , t i + k t_i,t_{i+1},\dots,t_{i+k} ti,ti+1,…,ti+k共 k + 1 k+1 k+1个结点;According to interval [ t i , t i + k ] [t_i,t_{i+k}] [ti,ti+k]为 N i , k ( t ) N_{i,k}(t) Ni,k(t)的支撑区间;
In the curve equation, n + 1 n+1 n+1个控制顶点 P i ( i = 0 , 1 , 2 , … , n ) P_i(i=0,1,2,\dots,n) Pi(i=0,1,2,…,n)要用到 n + 1 n+1 n+1个 k k k阶B样条基 N i , k ( t ) N_{i,k}(t) Ni,k(t);Support interval and set defines a set ofBThe spline base node vector T = [ t 0 , t 1 , … , t n + k ] T=[t_0,t_1,\dots,t_{n+k}] T=[t0,t1,…,tn+k];
Assuming control polygon vertices as n n n,阶数为 k k k(次数为 k − 1 k-1 k−1),The node vector is T = [ t 0 , t 1 , … , t n + k ] T=[t_0,t_1,\dots,t_{n+k}] T=[t0,t1,…,tn+k];BSpline curve according to the distribution of nodes in the vector,划分成4中类型:
- 均匀B样条曲线;这种BSpline curve equals the difference between the nodes in the vector,The equally spaced evenly distributed;
- 准均匀B样条曲线;准均匀BIn two endpoints spline curve duplication k k k;With such characteristics node vector quasi uniform can be determinedB样条基;
- 分段贝塞尔曲线;当BTwo endpoints spline node vector in the duplication k k k,And the duplication of all internal nodes as k − 1 k-1 k−1时,This node vector segmentation can be determinedBernstein基;When the bezier curve is used to represent sectionB样条曲线后,每一段的BSpline curve can be individually adjusted without affecting other parts of the curve,Adjustment of a control point is also affect the control points involved in controlling the shape of the curve segment;
- 非均匀Bezier曲线;In guarantee node sequence of decreasing the duplication is not more than two endpoints and k k k、Nodes in the duplication is not more than k − 1 k-1 k−1的情况下,Node vector can be arbitrary;Such a set of node vector can determine the non-uniformB样条基;
BSpline curve has the following properties:
- 局部性.参数为 t ( t i < t < t i + 1 ) t(t_i<t<t_{i+1}) t(ti<t<ti+1)的 k k k阶BSpline curve on a bit can affect k k k个控制点,And with the rest of the control points do not produce contact;When adjusting a control point on the curve P i P_i Pi的时候,Only can affect the interval ( t i , t i + 1 ) (t_i,t_{i+1}) (ti,ti+1)In the shape of the curve,Impact on other curve;
- 连续性.假如BIn a certain node spline curve r r r重结点,Then the curve in the node continuous order is greater than or equal to k − r − 1 k-r-1 k−r−1;
- 凸包性.BSpline curve is always located in the control polygon convex hull inside;
- 分段参数多项式. P ( t ) P(t) P(t)In each interval is about parameters t t t的多项式,And it's less than or equal to the number k − 1 k-1 k−1;
- 变差缩减性.Plane there are a certain number of control points is used to constitute aBSpline curve control polygon,Arbitrary plane in a straight line withBSpline curve intersection points less than or equal to the number of the lines and the number of control polygon intersection point;
- 几何不变性.BThe shape of a spline curve and the change of position is not due to the coordinate system and change;
- 仿射不变性.在仿射变换下,BThe expression form of spline curve will not change;
- Modelling the flexibility of the.利用BSpline curve can construct linear end、尖点、Special cases such as tangent;
边栏推荐
- 公共Jar包的版本管理
- 延迟队列MQ
- PyQt5-用像素点绘制正弦曲线
- (***重点***)Flink常见内存问题及调优指南(一)
- Detailed description of iperf3 parameter options
- 【 HMS core 】 【 】 the FAQ HMS Toolkit collection of typical questions 1
- Integral Special Notes-Three Formulas for Curve Area Integral
- Excel xlsx file not supported两种解决办法【杭州多测师】【杭州多测师_王sir】
- 2022 Hangzhou Electric Multi-School 1st Game
- 国外资源加速下载器,代码全部开源
猜你喜欢

MySQL Explain usage and parameter detailed explanation

ThreadLocal内存泄漏是伪命题?

Taosi TDengine 2.6+ optimization parameters

企业数字化建设,自研还是采购?

XP电源维修fleXPower电源X7-2J2J2P-120018系列详解

ClickHouse

leetcode 剑指 Offer 48. 最长不含重复字符的子字符串

STM32CubeMX配置生成FreeRTOS项目

树莓派_烧写Raspberry官方镜像系统

Two solutions for Excel xlsx file not supported
随机推荐
一个低级错误导致的诡异现象——走近科学能拍三集,(C语言)最简单的数组元素读取,不正确!?
Test automation selenium (a)
大根堆的创建(视频讲解)
如何避免CMDB沦为数据孤岛?
公共Jar包的版本管理
20220728使用电脑上的蓝牙和汇承科技的蓝牙模块HC-05配对蓝牙串口传输
leetcode 剑指 Offer 42. 连续子数组的最大和
EViews 12.0软件安装包下载及安装教程
Matplotlib--绘图标记
Concise Notes on Integrals - Types of Curve Integrals of the Second Kind
延迟队列MQ
(***重点***)Flink常见内存问题及调优指南(一)
【深度学习】(问题记录)<对一个变量求梯度得到什么>-线性回归-小批量随机梯度下降
MySQL [operator]
代码随想录笔记_哈希_202 快乐数
LeetCode二叉树系列——94.二叉树的中序遍历
快解析结合泛微OA
【HMS core】【FAQ】HMS Toolkit典型问题合集1
初识Apifox——如何使用Apifox做一个简单的接口测试
MySQL【运算符】