Page 1 of 1

Create goal state for OMPL

Posted: 24 Apr 2021, 13:17
by Aadhithya K
Hello again,

I have seen that we can create a path using the OMPL plugin.
The question that I have is that I need to know the steps to be followed to create the program to generate a path and I need to create a goal state after detecting the object using object detection method which is detected from the python script.
Is there any tutorial on how to use the OMPL plugin to generate paths?
Is it possible to create a goal state through Lua or python at a particular coordinate (x,y,z) through program and not by fixing it before the simulation?

Thanks in advance
Aadhithya K

Re: Create goal state for OMPL

Posted: 28 Apr 2021, 13:57
by coppelia
Hello,

you can follow the instructions about how to do path planning with OMPL. Make sure to also study the various examples in folder scenes/pathPlanning/.

You cannot directly call path planning functions outside of CoppeliaSim (well, you can, but then it is another story), but you should instead prepare your path planning tasks inside of a script function, and possibly trigger that script function to execute if a certain event occured (e.g. a new position was submitted, etc.). E.g. something like:

Code: Select all

function computeNewPath(targetPosition)
    -- your path planning calculations here
end

function sysCall_actuation()
    if newPosition then
        computeNewPath(newPosition)
        newPosition=false
    end
end

function triggerNewPathPlanning(inInts,inFloats,inStrings,inBuffer)
    newPosition=inFloats -- data from your external application, e.g. a position in space
	return {},{},{},''
end
Cheers

Re: Create goal state for OMPL

Posted: 29 Apr 2021, 04:25
by Aadhithya K
Thanks for the reply

I do not have the path planning folder in scenes. Is it added recently in any new update?
My current version of the software is 4.1.0 (rev. 1)

Re: Create goal state for OMPL

Posted: 29 Apr 2021, 09:25
by coppelia
Yes, make sure to always use the latest version of CoppeliaSim (currently V4.2.0)

Cheers