资源简介
移动机器人路径规划 几种A*算法改进matlab实现,可直接运行。适用于初学者基于A*算法进行改进,容易理解并上手,

代码片段和文件信息
classdef Astar < handle
properties (SetAccess=private GetAccess=private)
start
goal
occgrid % occupancy grid as provided by user
occgridnav % inflated occupancy grid
w2g % transform from world coordinates to grid coordinates
T
% info kept per cell (state)
b % backpointer (0 means not set)
t % tag: NEW OPEN CLOSED
g % distance map path cost
path
line
H0
heuristicmethod % defferent methods to enconding the distance of geven node to the goal
validplan % a plan has been computed for current costmap
openlist % list of open states: 2xN matrixeach open point is a column row 1 = index of cell row 2 = k
openlist_maxlen % keep track of maximum length
% tag state values
NEW = 0;
OPEN = 1;
CLOSED = 2;
end
properties (SetAccess=private GetAccess=public)
niter = 0;
costmap % world cost map: obstacle = Inf
end
methods (Access=public)
%% initialization and properties options
function as = Astar(world varargin)
% Create a Navigation object
% as = Astar(OCCGRID OPTIONS) is a Navigation object that holds an
% occupancy grid OCCGRID. A number of options can be be passed.
%
% Options::
% ‘inflate‘K Inflate all obstacles by K cells.
%
% Notes::
% - In the occupancy grid a value of zero means free space and non-zero means
% occupied (not driveable).
% - Obstacle inflation is performed with a round structuring element (kcircle)
% with radius given by the ‘inflate‘ option.
% - Inflation requires either MVTB or IPT installed.
if nargin >= 1
% first argument is the map
map = world;
if isnumeric(map) && ~isscalar(map)
as.occgrid = map;
as.w2g = SE2(0 0 0);
elseif isstruct(map)
as.occgrid = map.map;
as.w2g = as.T;
end
end
% default values of options
opt.inflate = 0;
opt.transform = SE2;
opt = tb_optparse(opt varargin);
% optionally inflate the obstacles
if opt.inflate > 0
if exist(‘idilate‘‘E:\RoboticsLab\vision-4.1\rvctools\vision‘) == 2
% use MVTB
as.occgridnav = idilate(as.occgrid kcircle(opt.inflate));
elseif exist(‘imdilate‘‘E:\RoboticsLab\vision-4.1\rvctools\vision‘) == 2
% use IPT
as.occgridnav = imdilate(as.occgrid strel(‘disk‘opt.inflate));
else
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 37235 2018-05-16 19:29 Astar\Astar.m
文件 35667 2018-05-08 00:32 Astar\DoubleAstar.m
文件 36812 2018-05-15 16:24 Astar\ImprovednAstar.m
文件 33510 2018-05-15 17:23 Astar\nAstar.m
目录 0 2019-12-05 15:31 Astar
----------- --------- ---------- ----- ----
143224 5
相关资源
- Dstar(动态路径规划)算法62845
- 非线性SVM算法-matlab实现
- Matlab实现基于相关的模板匹配程序
- 光纤传输中的分布傅立叶算法matlab实
- 引导图像滤波器 Matlab实现
- LU分解的MATLAB实现
- 用matlab实现的多站定位系统性能仿真
- k近邻算法matlab实现
- MATLAB实现的BPSK调制解调
- FNN MATLAB实现
- 工程优化问题的Matlab实现代码
- MATLAB实现混沌图像加密仿真程序
- matlab实现摄像机标定
- qam 用matlab实现qam仿真的程序
- MATLAB实现弹道仿真
- HDB3码、AMI码的MATLAB实现
- MIMO-OFDM无线通信技术及MATLAB实现_孙锴
- Matlab实现混沌系统的控制
- matlab实现电力系统潮流计算-PQ分解法
- 清洁机器人路径规划matlab仿真程序
- ROC曲线 matlab实现
- OFDM通信系统matlab实现
- matlab实现对两幅图像的叠加
- 织物密度测量MATLAB实现
- 基于遗传算法的机器人路径规划matl
- BP神经网络实现手写数字识别matlab实现
- 自动寻峰谷算法matlab实现
- AR模型算法的matlab实现和实验分析
- Dijkstra最短路径算法的Matlab实现
- 随机梯度下降算法的MATLAB实现
评论
共有 条评论