Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

修复了标志位复用造成的Node被删除问题 #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/FindRSPath_plus.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function path = FindRSPath_plus(x,y,phi,veh)
rmin = veh.MIN_CIRCLE; %minimum turning radius
x = x/rmin;
y = y/rmin;
reedsConnObj = reedsSheppConnection;
startPose = [0 0 0];
goalPose = [x y phi];
[pathSegObj,~] = connect(reedsConnObj,startPose,goalPose);
test = pathSegObj{1};
type = [];
value = zeros(5,1);
for i = 1:5
type = [type,test.MotionTypes{i}];
value(i) = test.MotionDirections(i)*test.MotionLengths(i);
end
path = RSPath(type,value(1),value(2),value(3),value(4),value(5));
end
15 changes: 9 additions & 6 deletions src/HybridAStar.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,21 +22,24 @@
while ~isempty(Open)
% pop the least cost node from open to close
[wknode,Open] = PopNode(Open,cfg);
[isok,idx] = inNodes(wknode,Close);
[isok1,idx] = inNodes(wknode,Close);

% �ж��Ƿ���Close������
if isok
if isok1
Close(idx) = wknode;
else
Close = [Close, wknode];
end

% ��wknodeΪ���ڵ�������������ʹ��Reeds-Shepp�������ڳ�������ģ�ͽ����˶�ѧ������չ�ӽ��
[isok,path] = AnalysticExpantion([wknode.x,wknode.y,wknode.theta],End,veh,cfg);
if isok
[isok2,path] = AnalysticExpantion([wknode.x,wknode.y,wknode.theta],End,veh,cfg);
if isok2
%��wknode��idx�Ƶ�Close���������
Close(end+1) = wknode;
Close(idx) = [];
if isok1
Close(end+1) = wknode;
Close(idx) = [];
else
end
[x,y,th,D,delta] = getFinalPath(path,Close,veh,cfg);
break % �����ֱ�ӵõ�RS���ߣ�������whileѭ��
end
Expand Down
Binary file added src/Parking.mp4
Binary file not shown.