資源簡(jiǎn)介
dubins詳細(xì)代碼,matlab版本,適用于航跡規(guī)劃、路徑規(guī)劃,求滿足約束的兩點(diǎn)之間最短路徑
代碼片段和文件信息
clc;
clear?all
R=1;
x0=8;
y0=10;
phi0=90;
x=x0+R*cos((phi0+90)/57.3)???%逆時(shí)針圓圓心--起始圓
y=y0+R*sin((phi0+90)/57.3)
plot([x][y]‘*‘)
hold?on
x1=x0+R*cos((phi0-90)/57.3)??%順時(shí)針圓圓心--起始圓
y1=y0+R*sin((phi0-90)/57.3)
plot([x1][y1]‘*‘)
a0=0;
b0=9;
theta0=90;
a=a0+R*cos((theta0+90)/57.3)????%逆時(shí)針圓圓心--終止圓
b=b0+R*sin((theta0+90)/57.3)
plot([a][b]‘*‘)
a1=a0+R*cos((theta0-90)/57.3)????%順時(shí)針圓圓心--終止圓
b1=b0+R*sin((theta0-90)/57.3)
plot([a1][b1]‘*‘)
drawCircle(xyR);
drawCircle(x1y1R);
drawCircle(abR);
drawCircle(a1b1R)
quiver(x0y0R*cos(phi0/57.3)R*sin(phi0/57.3))
quiver(a0b0R*cos(theta0/57.3)R*sin(theta0/57.3))
%圓心距
L1=sqrt((x-a)*(x-a)+(y-b)*(y-b))
L2=sqrt((x-a1)*(x-a1)+(y-b1)*(y-b1))
L3=sqrt((x1-a)*(x1-a)+(y1-b)*(y1-b))
L4=sqrt((x1-a
評(píng)論
共有 條評(píng)論