资源简介
移动机器人路径规划 几种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
相关资源
- 路径规划算法matlab仿真
- Matlab实现图像低通滤波
- 基于A*算法的机器人路径规划的MATLA
- 基于蚁群算法的移动机器人三维路径
- A*算法 matlab版
- Ncut图像分割算法MATLAB实现
- RRT* RRT star RRT 星路径规划算法的matl
- DFS优先算法matlab实现
- 蚁群算法实现机器人避障和路径规划
- 毕业设计 一种改进的自适应滤波LMS算
- 元胞自动机-Matlab实现.zip
- 学会用MATLAB实现傅里叶变换的时移,
- matlab实现图像模板匹配
- Delaunay三角划分的Matlab实现
- aodv和dsr的matlab实现
- Matlab实现文本文件读取并存储成矩阵
- 史密斯圆图 matlab实现
- Kohonen神经网络算法的matlab实现
- 蚁群聚类算法matlab实现
- 清扫机器人路径规划算法仿真
- 基于改进遗传算法的路径规划MATLAB实
- matlab实现meanshift图像分割
- 多种插值算法Matlab实现--数学建模
- 用matlab实现模拟退火kmeans聚类
- Matlab实现读取二进制数据绘制波形,
- matlab实现JPEG
- 复杂网络中GN,FN网络的matlab实现
- MATLAB实现图像的Arnold置乱
- matlab实现的维特比译码
- 最小二乘估计MATLAB实现
评论
共有 条评论