Path Planning 2

Path Planning 2

 

 

Path Planning 2

Contents

Input data

The boundaries definition

x_min=-40;x_max=40;y_min=-40;y_max=40;
% The environment discretization
dl=1;
% Obstacles definition
Pct1=[-40,-20,-20,-30,-30,-40,-10,-10,-30,-20,-20,0,0,0,-10,-10,-30,-30,-30,-30,-20,-20,-10,0,0;...
     -30,-30,-20,-20,-10,-10,-10,0,0,0,10,10,0,30,10,20,20,10,30,40,40,30,30,-30,-10];
Pct2=[0,10,10,10,10,10,20,20,30,20,30,30,10,30,40,0,20,20,10,10,20,20,30,-10,-10;...
      -20,-20,-40,-30,0,-10,-10,-20,-20,-30,-30,10,10,-10,-10,20,20,10,30,40,30,40,30,-40,-20];
Pct=[Pct1,Pct2];% Points used in obstacles definition
M=zeros(50,50);
M(1,2)=1;M(2,3)=1;M(4,5)=1;M(6,7)=1;M(7,8)=1;M(9,10)=1;M(10,11)=1;M(11,12)=1;
M(15,16)=1;M(16,17)=1;M(17,18)=1;M(19,20)=1;M(21,22)=1;M(22,23)=1;M(13,14)=1;
M(41,42)=1;M(44,45)=1;M(46,47)=1;M(42,43)=1;M(38,37)=1;M(36,48)=1;M(39,40)=1;
M(49,50)=1;M(24,25)=1;M(26,27)=1;M(28,29)=1;M(35,36)=1;M(33,34)=1;M(30,31)=1;
M(31,32)=1;M(32,33)=1;% The incident matrix
% Task definition
S=[-35,35;...
    -15,-5]; %The start and the target point

PP object constructio

my_mediu=mediu(x_min,x_max,y_min,y_max,dl); % the constructer
my_mediu=my_mediu.obstacole(Pct,M,S); % adding the obstacles

The map ilustration

desen3(my_mediu);
Current plot held
Current plot released

Path_planning2_01

The map(environment)discretization

figure
my_mediu=my_mediu.matricea;

Path_planning2_02

Using A* for the nodes selection

figure
my_mediu=my_mediu.a_stelat;
Current plot held
Current plot released

Path_planning2_03

Transposing the nodes in the map

figure
my_mediu=my_mediu.traiectoria;

Path_planning2_04

Smoothing the trajectory

my_mediu=my_mediu.neted;
Current plot held
Current plot released

Path_planning2_05