0
点赞
收藏
分享

微信扫一扫

【二维路径规划】基于HybridAStar算法实现停车场停车路径规划问题

就是耍帅 2022-01-08 阅读 53
算法p2pcss

1 简介

2 部分代码

clear;
load parkingLotCostVal.mat     % costVal
width = 2;
height = 4;




plot(map,'Inflation','off');
hold on
for i = 1:refpath.NumStates
   h = draw(refpath.States(i,:),width,height);
   drawnow();
   pause(0.1);
   if i <refpath.NumStates
       delete(h);
   end
end

function h = draw(pos,width,height)
   x = pos(1);
   y = pos(2);
   cosT = cos(pos(3));
   sinT = sin(pos(3));
   V = [ cosT, sinT];
   T = [-sinT, cosT];
   plot(x,y,'.');
   height1 = height;
   height2 = height;
   p1 = [x,y]+width*T+height1*V;
   p2 = [x,y]-width*T+height1*V;
   p3 = [x,y]+width*T-height2*V;
   p4 = [x,y]-width*T-height2*V;
   h = plot([p1(1),p2(1),p4(1),p3(1),p1(1)],[p1(2),p2(2),p4(2),p3(2),p1(2)],'k');
end

3 仿真结果

4 参考文献

[1]张猛. 自动泊车路径规划算法研究[D]. 太原科技大学.

[2]刘勇等. "基于NDT算法和Hybrid A*算法的无人船路径规划方法.". ​

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,有科研问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。

举报

相关推荐

0 条评论