Running parallel scripts using Matlab API

Typically: "How do I... ", "How can I... " questions
Post Reply
AhmadGazar
Posts: 8
Joined: 28 Oct 2016, 13:40

Running parallel scripts using Matlab API

Post by AhmadGazar »

Hello,
I am running Matlab API functions of VREP. I have a problem trying to make several objects or robots start executing separate scripts in parallel in the VREP scene and not sequentially . I know that this is can be easily done if the whole application is running in VREP since one can create multiple child scripts for any object, and they will all execute together when simulation starts. Is there a way to do so programmaically using Matlab APIs? Thanks in advance.

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

Re: Running parallel scripts using Matlab API

Post by coppelia »

Hello,

I am not sure I understand your problem correctly. Are you having difficulties generating several Matlab/V-REP connections via the remote API? What kind of API functions are you running on Matlab side? On the V-REP side?

Cheers

AhmadGazar
Posts: 8
Joined: 28 Oct 2016, 13:40

Re: Running parallel scripts using Matlab API

Post by AhmadGazar »

No, I am doing multiple path planning in matlab, and I am visualizing the result of the multiple routes in VREP. I want to execute the planned routes on multiple dummies in vrep at the start of the simulation at the same instant, and not one after the other.

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

Re: Running parallel scripts using Matlab API

Post by coppelia »

You will have to use several threaded child scripts. At some point in your threaded child script, you could have a waiting loop that check for a specific signal. If the signal is present, you could execute your specific routine.

Cheers

Post Reply