V-REP Headless compile
To run V-REP in true headless mode, you have to compile it your self. This tutorial will explain exactly how to do that. I am as always working in an Ubuntu 18.04 environment, so keep that in mind.
First you will have to install some packages required for compiling V-REP. These can be installed using the following command:
Now you need to make a new directory in which you will compile V-REP. I will use a directory called mybuild in my home directory:
Then you need to clone the V-REP repository to your install directory:
To compile V-REP, several additional repositories are also needed. These should be placed in a programming directory as follows:
Now you need to create the makefile specifying that V-REP should be compiled in headless mode. You can download mine here (which also fixes various bugs with the default one). Please place this makefile inside the ~/mybuild/v_rep directory.
You are now ready to compile V-REP:
It is unfortunately not possible to run the compiled V-REP directly. Instead, we have to download a pre-compiled version of V-REP from here and then move the libv_rep.so from the newly compiled V-REP to the pre-compiled one. In the following, I have downloaded V-REP and placed it in a directory called V-REP_PRO_EDU_V3_6_1_Ubuntu18_04_headless in my home directory. Using the following command, the libv_rep.so is copied from the compiled to the pre-compiled V-REP directory:
You should now be able to launch V-REP in headless mode:
You can follow this tutorial to see what commands can be used for V-REP in headless mode. Also see this tutorial on how to have multiple instances of V-REP simulationsly.
Plase contact me if you find any mistakes or bugs in this tutorial