Enabling the Remote API - client side

All units going to, or coming from the API are in meters, kilograms, seconds and radians or a combination of those (unless otherwise explicitly indicated).



C/C++ client

To use the remote API functionality in your C/C++ application, just include following C-language files in your project:

  • extApi.h
  • extApi.c
  • extApiPlatform.h (contains platform specific code)
  • extApiPlatform.c (contains platform specific code)
  • Above files are located in V-REP's installation directory, under programming/remoteApi. Make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 as a preprocessor definition. To enable the remote API on the client side (i.e. your application), call simxStart. See the bubbleRobClient project in the programming directory for an example. This page lists and describes all supported C/C++ remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.



    Python client

    To use the remote API functionality in your Python script, you will need following 3 items:

  • vrep.py
  • vrepConst.py
  • remoteApi.dll, remoteApi.dylib or remoteApi.so (depending on your target platform)
  • Above files are located in V-REP's installation directory, under programming/remoteApiBindings/python. You might have to build the remoteApi shared library yourself (using remoteApiSharedLib.vcproj or makefile) if not already built. In that case, make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 as a preprocessor definition.

    Once you have above elements in a directory known to Python, call import vrep to load the library. To enable the remote API on the client side (i.e. your application), call vrep.simxStart. See the simpleTest.py script in the programming/remoteApiBindings/python directory for an example. This page lists and describes all supported Python remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.



    Java client

    To use the remote API functionality in your Java application, you will need following 2 items:

  • package coppelia (containing 12 Java classes)
  • remoteApiJava.dll, libremoteApiJava.dylib or libremoteApiJava.so (depending on your target platform)
  • Above files are located in V-REP's installation directory, under programming/remoteApiBindings/java. You might have to build the remoteApiJava shared library yourself (using remoteApiSharedLibJava.vcproj or remoteApiSharedLibJava_Makefile) if not already built. In that case, make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 as a preprocessor definition.

    Once you have above elements in a directory known to Java, compile your application with myAppName.java with javac myAppName.java. In your application, make sure to import the classes that you use with import coppelia.className, then call remoteApi vrep = new remoteApi() to load the library. To enable the remote API on the client side (i.e. your application), call vrep.simxStart. See the simpleTest.java program in the programming/remoteApiBindings/java directory for an example.This page lists and describes all supported Java remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.

    You might also have to add the folder to the system path. In Linux for instance, you could call: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:`pwd` before executing your Java application.



    Matlab client

    To use the remote API functionality in your Matlab program, you will need following 3 items:

  • remoteApiProto.m
  • remApi.m
  • remoteApi.dll, remoteApi.dylib or remoteApi.so (depending on your target platform)
  • Above files are located in V-REP's installation directory, under programming/remoteApiBindings/matlab. You might have to build the remoteApi shared library yourself (using remoteApiSharedLib.vcproj or remoteApiSharedLib_Makefile) if not already built.

    Once you have above elements in Matlab's current folder, call vrep=remApi('remoteApi') to build the object and load the library. To enable the remote API on the client side (i.e. your application), call vrep.simxStart. See the simpleTest.m program in the programming/remoteApiBindings/matlab directory for an example.This page lists and describes all supported Matlab remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.

    Make sure your Matlab uses the same bit-architecture as the remoteApi library: 64bit Matlab with 32bit remoteApi library will not work, and vice-versa!

    If you had to rebuild the remoteApi library, you might have to regenerate the prototype file (remoteApiProto.m): first, make sure you have a compiler that Matlab recognizes. You might have to call mex -setup. Then, type loadlibrary('remoteApi','extApi.h','mfilename','remoteApiProto').



    Octave client

    To use the remote API functionality in your Octave program, you will need following 4 items:

  • remApiSetup.m
  • remApi.oct
  • Above files are located in V-REP's installation directory, under programming/remoteApiBindings/octave. You might have to build the remApi.oct shared library yourself, if not already build. In that case, make sure to place all the content of programming/remoteApi and programming/include into that directory before calling buildWin, buildLin or buildMac from the Octave command line.

    Once you have above elements in Octave's current folder, call vrep=remApiSetup() to load the library and bind the functions. To enable the remote API on the client side (i.e. your application), call simxStart. See the simpleTest.m program in the programming/RemoteApiBindings/octave directory for an example.This page lists and describes all supported Octave remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.

    Make sure your Octave uses the same bit-architecture as the remoteApi library: 64bit Octave with 32bit remoteApi library will not work, and vice-versa!



    Lua client

    To use the remote API functionality in your external Lua script (i.e. not inside of V-REP), you will need following item:

  • remoteApiLua.dll, remoteApiLua.dylib or remoteApiLua.so (depending on your target platform)
  • Above file is located in V-REP's installation directory, under programming/remoteApiBindings/lua. You might have to build the remoteApi shared library yourself (using remoteApiLua.vcproj or makefile) if not already built. In that case, make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 as a preprocessor definition.

    Once you have above element in a directory known to Lua, call require 'remoteApiLua' to load the library. To enable the remote API on the client side (i.e. your application), call simxStart. See the simpleTest.lua script in the programming/remoteApiBindings/lua directory for an example. This page lists and describes all supported Lua remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.



    Urbi client

    To use the remote API functionality in your Urbi script, you will need following 2 items:

  • remoteApiConst.urbi
  • remoteApiUrbi.dll or remoteApiUrbi.so (depending on your target platform)
  • Above files are located in V-REP's installation directory, under programming/remoteApiBindings/urbi. You might have to build the remoteApiUrbi shared library yourself if not already built. In that case, make sure you have defined NON_MATLAB_PARSING and MAX_EXT_API_CONNECTIONS=255 as a preprocessor definition. Under Windows, use remoteApiSharedLibUrbi.vcproj. Under Linux/Mac, do following steps:

  • Create an extApiUrbi.uob folder in the Urbi root
  • Copy following elements into that new folder: extApi.c, extApi.h, extApiInternal.h, extApiPlatform.c, extApiPlatform.h, v_repConst.h and extApiUrbi.cpp
  • From within above folder, type:
  • ../bin/umake -q --shared-library -o remoteApiUrbi.so EXTRA_CPPFLAGS=-DNON_MATLAB_PARSING -DMAX_EXT_API_CONNECTIONS=255

    To load the remote Api functionality from a script, call loadFile("remoteApiConst.urbi") and loadModule("remoteApiUrbi"). To enable the remote API on the client side (i.e. your application), call vrep.simxStart. See the simpleTest.urbi script in the programming/remoteApiBindings/urbi directory for an example. This page lists and describes all supported Urbi remote API functions. V-REP remote API functions can easily be recognized from their "simx"-prefix.


    Recommended topics

  • Enabling the Remote API - server side
  • Remote API overview
  • Remote API modus operandi
  • Alphabetical remote API function list
  • Remote API function list by category
  • Remote API constants