forked from LazyFalcon/D_star_PathPlanning
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlotPath.m
More file actions
32 lines (28 loc) · 725 Bytes
/
PlotPath.m
File metadata and controls
32 lines (28 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
function out = PlotPath(state, scalling, mapName)
% uses B-spline interpolation
path = state.path';
path(:,3) = 1;
path(:,4) = 1;
if nargin <3
scalling = 1;
imag = state.map;
else
tmp = LoadMap( strcat(mapName, '.png'), 1);
imag = tmp.map;
end
if scalling ~= 1
path(:,1) = path(:,1)-2.5;
path(:,2) = path(:,2)-2.5;
pathInterpolated = BSpline(path*scalling);
else
pathInterpolated = path;
end
%%5
for it = pathInterpolated'
a = round(it);
imag(a(1), a(2)) = 0.6;
end
figure(100)
out.handle = imshow(imag);
out.path = pathInterpolated;
end