Page 1 of 1

How to connect/use Remote API C++ with V-REP

Posted: 21 Mar 2016, 15:37
by andreiman
Hello,

Can anyone tell me what are the all steps to connect remote API C++ with VREP?
I looked in BubbleRob example but I didn't understand how can I do this.

All help is appreciated.

Thanks a lot!
Andrei

Re: How to connect/use Remote API C++ with V-REP

Posted: 21 Mar 2016, 16:12
by coppelia
Hello Andrei,

you will have to use the remote API, using the C/C++ binding. There are several examples. Take for instance the remote API client that controlls the purple robot in the demo scene controlTypeExamples.ttt: the source code is located in programming/bubbleRobClient.

The only thing you need to take care of on the server side (i.e. V-REP side) is to launch a remote API server service on a specific port. You do this with simExtRemoteApiStart. You do not need that step if you connect to the default remote API server service that runs on port 19997, from the time V-REP is launched. Remember that for one remote API client, you need exactly one remote API server service, meaning that you can't have two clients connect at the same time to a server service on the same port.

Once you have prepared a server service (and that server service is running), then on the client side you can connect to it via simxStart, then use all the available remote API functions. Once you are done with the connection, call simxFinish. Not all regular API functions are directly supported from a remote API client. In those cases, use simxCallScriptFunction, which is a generic function that you can entirely customize on the V-REP side, via scripting.

Cheers

Re: How to connect/use Remote API C++ with V-REP

Posted: 25 Mar 2016, 20:25
by andreiman
Thank you!

Re: How to connect/use Remote API C++ with V-REP

Posted: 06 Dec 2018, 10:01
by cmayer777
After installing the free EDU version on windows, I do not see the programming/bubbleRobClient example for connection using an external C++ program. Is this not supported in the free EDU version?

Re: How to connect/use Remote API C++ with V-REP

Posted: 06 Dec 2018, 11:23
by coppelia
Hello,

you can find that project in this repository, other projects are in the Coppelia Robotics repository.

Cheers

Re: How to connect/use Remote API C++ with V-REP

Posted: 06 Dec 2018, 14:36
by cmayer777
Thank you!
Such a fast response - you people are awesome!