Create goal state for OMPL

Typically: "How do I... ", "How can I... " questions
Post Reply
Aadhithya K
Posts: 9
Joined: 05 Apr 2021, 16:26

Create goal state for OMPL

Post 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

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

Re: Create goal state for OMPL

Post 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

Aadhithya K
Posts: 9
Joined: 05 Apr 2021, 16:26

Re: Create goal state for OMPL

Post 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)

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

Re: Create goal state for OMPL

Post by coppelia »

Yes, make sure to always use the latest version of CoppeliaSim (currently V4.2.0)

Cheers

Post Reply