From 3696770a1c2fd1bc5b4a69758d72fc338e530e82 Mon Sep 17 00:00:00 2001 From: Kjartan Halvorsen Date: Tue, 3 May 2022 19:59:29 -0500 Subject: [PATCH] Fixed bug in PRM --- PRM.m | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PRM.m b/PRM.m index b53b34e8..10698668 100644 --- a/PRM.m +++ b/PRM.m @@ -339,12 +339,12 @@ function create_roadmap(prm, opt) end new = [x; y]; - % add it to the graph - vnew = prm.graph.add_node(new); - % find the closest node already in the graph [d,v] = prm.graph.distances(new); + % add it to the graph + vnew = prm.graph.add_node(new); + % test neighbours in order of increasing distance and check for a clear % path for i=1:length(d)