資源簡介
一個用粒子群開發的Matlab移動機器人路徑規劃

代碼片段和文件信息
%--------判斷兩個點的連接是否為連通狀態--------------------
function?result?=?Conn(x1y1x2y2)
%----聲明全局----------------------------
global?obstaclesx;
global?obstaclesy;
global?robotv;
%------------------
result?=?true;
theta?=?straightLine(x1y1x2y2);
%進行半徑為robtov的膨脹
%計算出機器人的四邊形
x?=?robotv*cos(theta);
y?=?robotv*sin(theta);
roblinex?=?[x1+xx2+xx2-xx1-xx1+x];
robliney?=?[y1+yy2+yy2-yy1-yy1+y];
%判斷連接處是否有障礙物,有的話返回false
for?i?=?1:size(obstaclesx1)
????%求機器人多邊形和障礙物多邊形是否相交
?
????if?poly_cross(roblinexroblineyobstaclesx(i:)obstaclesy(i:))
????????result?=?false;
????????return;
????end
end
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2014-05-19?14:20??pso_pathplanning\
?????文件?????????702??2009-01-10?17:46??pso_pathplanning\Conn.m
?????文件????????5757??2014-05-18?18:52??pso_pathplanning\PSO.m
?????文件?????????227??2009-01-05?15:42??pso_pathplanning\convertTopolar.m
?????文件?????????616??2009-01-08?21:27??pso_pathplanning\fitness.m
?????文件????????1330??2009-01-11?15:06??pso_pathplanning\initX.m
?????文件????????1762??2014-05-19?14:33??pso_pathplanning\initial.m
?????文件?????????521??2009-01-08?20:27??pso_pathplanning\initialmap.m
?????文件?????????462??2009-01-08?16:31??pso_pathplanning\line_cross.m
?????文件????????2486??2014-05-18?18:49??pso_pathplanning\main.m
?????文件?????????693??2009-01-10?21:29??pso_pathplanning\movedone.m
?????文件????????3430??2014-05-19?15:00??pso_pathplanning\pathplanning.m
?????文件?????????195??2009-01-06?10:09??pso_pathplanning\plorTozhijiao.m
?????文件?????????588??2009-01-08?16:38??pso_pathplanning\poly_cross.m
?????文件?????????202??2009-01-10?17:47??pso_pathplanning\straightLine.m
- 上一篇:非局部去噪算法,matlab實現
- 下一篇:EMD工具箱matlab
評論
共有 條評論