1 Star 0 Fork 0

gzl2012/rbpf-gmapping

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Occupancy_Grid_Mapping.m 1.10 KB
一键复制 编辑 原始数据 按行查看 历史
Adrian Llopart 提交于 2016-04-14 12:55 . Initial Update of all files
function [P_new, L_new] = Occupancy_Grid_Mapping(L_past, pose, scan, UsableArea, L0, gridsize, LRS)
%% Calculation of the occupancy grid map
% Probabilistic Robotics-Thrun, Burgard, Fox 3rd Edition pg 286
% Find area of interest
x=round(pose(1));
y=round(pose(2));
L_new=L_past;
for a=(x-UsableArea):(x+UsableArea)
if a>=1 && a<=gridsize(1)
for b=(y-UsableArea):(y+UsableArea)
if (b)>=1 && (b)<=gridsize(2)
L_new(gridsize(2)-b, a)=L_past(gridsize(2)-b, a)+Inverse_Range_Sensor_Model(a,b,pose,scan, L0, UsableArea, LRS)- L0;
end
end
end
end
% Calculate normalized probablity form log-odds
P_new=1-(1./(1+exp(L_new)));
%% Visulaize results: check if grid map is being built correctly (
% figure(85)
% set(gcf,'units','normalized','outerposition',[-1 0 1 1]);
% clf;
% hold on;
% axis([0 gridsize(1) 0 gridsize(2)]);
% imagesc(flipud(L_new))
% scan_c=Robot2World(pose, Polar2Cart(scan));
% plot(scan_c(1,:), scan_c(2,:), '.r');
% hold off;
end
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Matlab
1
https://gitee.com/gzl2012/rbpf-gmapping.git
git@gitee.com:gzl2012/rbpf-gmapping.git
gzl2012
rbpf-gmapping
rbpf-gmapping
master

搜索帮助