Matlab – VREP Link

Tutorial for linking Matlab and V-REP

  1. Download and install the educational version of V-REP for the own operating system from the following:
    www.coppeliarobotics.com.
  2. Copy the files present in
    /V-REP_installation_directory/programming/remoteAPIBinding/matlab
    inside the own work directory.
  3. Inside the same directory copy also the library present in
    /V-REP_installation_directory/programming/remoteAPIBinding/lib/lib
    (you find remoteApi.dll [Windows] , remoteApi.dylib [Mac] or remoteApi.so [Linux]).
  4. Run V-REP and open the file kuka_vrep.ttt (it is the default scene with the KUKA LBR iiwa 7 R800 robot model where the preexisting LUA script has been deleted).
  5. Run the simulation on V-REP. The program automatically switch in server mode listening on the port number 19997.
  6. Launch MATLAB, therefore open and run the file SimpleTest.m.