Hello,
I have been developing an algorithm that would enable to define an area (for example with coordinate systems) and automatically do the pathing with spesific criteria to that area. Recently, I have been trying to create a path and add points to that path. Path creation was fine but I haven't been able to insert a single point to it. API script that I have been using is "sim.insertPathCtrlPoints" (Lua) and some argument is giving a type error and I do not know which. I have been trying a with most values at default values (which I got from https://www.coppeliarobotics.com/helpFi ... Export.htm) and just adding 1 point at the beginning.
Example:
sim.insertPathCtrlPoints(pathHandle, 2, 0, 1, 0.5, 0.250, 0.0, 0.0, 0.0, 90.0, 1.0, 1.0, 1, 0.5, 0.5, 0, 0.0, 0.0, 0.0, 0.0)
And it gives:
"One of the function's argument type is not correct. (in function 'sim.insertPathCtrlPoints')"
Can anyone figure out what parameter type I have set wrong or what could I try? There are a bit too many arguments to be just guessing the "wrong one"..
https://www.coppeliarobotics.com/helpFi ... Points.htm
Thank you in advance.
BR,
Janne
Use of API InsertPathCtrlPoints
Re: Use of API InsertPathCtrlPoints
Hello Janne,
please try with following:
i.e. the last argument is a table.
Cheers
please try with following:
Code: Select all
sim.insertPathCtrlPoints(pathHandle,2,0,1,{0.5, 0.250, 0.0, 0.0, 0.0, 90.0, 1.0, 1.0, 1, 0.5, 0.5, 0, 0.0, 0.0, 0.0, 0.0})
Cheers
Re: Use of API InsertPathCtrlPoints
Hello,
That worked and now that I think about, it makes total sense.
Thanks a lot.
BR,
Janne
That worked and now that I think about, it makes total sense.
Thanks a lot.
BR,
Janne