How can I get the coordinates of a path object through the remote API?

Typically: "How do I... ", "How can I... " questions
Post Reply
nuquist
Posts: 2
Joined: 16 Jan 2018, 14:43

How can I get the coordinates of a path object through the remote API?

Post by nuquist » 18 Jan 2018, 14:08

Question in the title. Using the remote python API of v-rep, I am able to get images and control motor properties of robots, but I cannot find any way to get the coordinates of a path object that was made with the path planning functionality in v-rep. I would like to get them as an array in my external python script.

I have found that there is no remote API functions dedicated to path objects, but there might be a more generic function that could be used for this. I have been able to export the path coordinates as an CSV file to be read by the python script, but I am hoping there is a more direct way of doing this.
Last edited by nuquist on 24 Jan 2018, 11:03, edited 1 time in total.

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

Re: How can I get the coordinates of a through the remote API?

Post by coppelia » 22 Jan 2018, 08:40

Hello,

I would sample the path coordinates with simGetPathPosition, inside of a script function. And simply have that script function called by your python remote Api client, via simxCallScriptFunction.

Cheers

nuquist
Posts: 2
Joined: 16 Jan 2018, 14:43

Re: How can I get the coordinates of a through the remote API?

Post by nuquist » 22 Jan 2018, 13:07

Thanks for the reply, I will try that.

Post Reply