Get the informations from VREP RRT algorithm

Typically: "How do I... ", "How can I... " questions
Post Reply
scut_whg
Posts: 11
Joined: 21 Oct 2019, 08:24

Get the informations from VREP RRT algorithm

Post by scut_whg »

Hello there! I am using vrep for path planning and using the RRT algorithm that comes with the software. Now I want to know how many nodes the RRT algorithm generates, how many collision detection functions are called, and the length of the final path when I use vrep for path planning. Is there any way to get the informations I want?

coppelia
Site Admin
Posts: 10396
Joined: 14 Dec 2012, 00:25

Re: Get the informations from VREP RRT algorithm

Post by coppelia »

Hello,

just to make sure we are talking about the same thing... you are basically referencing the OMPL plugin for CoppeliaSim, and not the old path planning implementation that was also using the RRT algorithm?
In case you are using the OMPL plugin, you can intercept all node testing calls (and basically decide if a given node is in a colliding or non-colliding state, count the nodes, etc.) with simOMPL.setStateValidationCallback: it allows you to set-up a callback function where you can handle all of this. Have a look at this simple example using such a state validation callback (in that example the state validation callback validates only nodes that relate to the robot being within a specific distance (with tolerance) from obstacles, i.e. walls.)

Cheers

Post Reply