From: Mark M. <mm...@ri...> - 2021-01-06 18:56:25
|
Hadar, What you want sounds very similar to using LazyPRM initialized with saved PlannerData. The idea is that you generate a roadmap/graph with any planner, extract the PlannerData (optional save and load to/from disk), and construct a LazyPRM instance with the PlannerData as argument. The mutex is used exactly so you *can* use multiple threads safely. You need to be careful to remove each vertex/edge only once and make sure that no vertex/edge is accessed by other threads as it is being removed. Best, Mark > On Jan 6, 2021, at 9:55 AM, hadar sinvani <had...@gm...> wrote: > > Hi Mark, > > Thank you for your quick reply. > > As you suggested, I will look through the boost graph library API for the relevant functions and write this method by myself. > > I intend to iterate through the vertices data structure and to check again every vertex with IsValid (Is Valid will be different, of course, from the IsValid I used during roadmap construction). > > According to the returned value, the method will keep/remove the examined vertex and its edges. > > I would appreciate your advice regarding the function I intend to write. > > In PRM implementation, I saw you use mutex every time you add a milestone or an edge. Does this mean that my function cannot run multiple threads so that each thread will iterate through different part of the vertices data structure? > > Best and a happy new year, > > Hadar > > > > > > On Wed, Jan 6, 2021, 01:16 Mark Moll <mm...@ri... <mailto:mm...@ri...>> wrote: > Hi Hadar, > > There is no method for this at the moment. You need to write your own method that will call Boost.Graph functions to remove specific vertices and any incident edges. > > Best, > > Mark > > > >> On Jan 5, 2021, at 7:25 AM, hadar sinvani <had...@gm... <mailto:had...@gm...>> wrote: >> >> Hello, >> >> I'm using the geometric prm planner. >> >> At first, the constructRoadmap function is being called once, following several calls to solve and clearQuery functions. >> >> I would also like to update my graph between calls and to remove specific vertices, therefore the clear function that clears ALL internal data structure is not a good option for me… >> >> Is there a function that iterates through the vertices data structure and removes specific vertices from the graph? >> >> Best, >> >> Hadar >> >> _______________________________________________ >> ompl-users mailing list >> omp...@li... <mailto:omp...@li...> >> https://lists.sourceforge.net/lists/listinfo/ompl-users <https://lists.sourceforge.net/lists/listinfo/ompl-users> > |