Page 1 of 1

Extracting graph from OMPL planner

Posted: 15 May 2018, 20:30
by nightingale131
Hi V-REP support team,
Is there a way to extract the graph that the OMPL planner uses?

I would like to construct a graph using OMPL, and then run my own optimizer over it to find the shortest path because I want to use the same graph for multiple runs. I tried using the simOMPL.getData function, but I must be using it incorrectly because V-REP crashes when I run my simulation.

Edit: By graph I mean a list of vertices and edges.

Re: Extracting graph from OMPL planner

Posted: 16 May 2018, 12:49
by fferri
You can extract it with the simOMPL.getPath function.

By the way, OMPL has optimizing path planners, and also multi-query path planners, so you might probably want to check those out first.

Re: Extracting graph from OMPL planner

Posted: 16 May 2018, 15:29
by nightingale131
Thanks for your response.

Unfortunately I do not want the path from my start and goal point, I want all the vertices and edges that the planner searches through, and getPath only returns a solution. I would like a graph that overlays my entire map, and has at least one path to the goal.

On another note, is there a simple way to use the OMPL multi-query path planners in V-REP? Or will I need to customize the OMPL plugin to do so?

Re: Extracting graph from OMPL planner

Posted: 17 May 2018, 09:21
by fferri
From what I can see, the functions to access graph (e.g. roadmaps) are implemented in each planner class, and not in the ompl::base::Planner class.

Currently there is no API to access that from the OMPL plugin, unless you modify it.

On the other hand, multi-query planners use the same interface of all planners, so you just need to select the planning algorithm.