Command line

When you start V-REP via the command line, you have following command line options that are supported:

  • -h: runs V-REP in headless mode (i.e. without any GUI)
  • -sXXX: automatically start the simulation. XXX represents an optional simulation time in milliseconds after which simulation should stop again.
  • -q: automatically quits V-REP after the first simulation run ended.
  • -aXXX: loads and runs an additional add-on script specified via its filename (XXX). The add-on will be loaded and run only for the first scene.
  • -bXXX: loads and runs an additional add-on script specified via its filename (XXX). The add-on will be loaded and run for all the scenes that will be opened.
  • -gXXX: XXX represents an optional argument that can be queried within V-REP with the sim_stringparam_app_arg parameter. The argument can be used for various custom purposes.
  • -gREMOTEAPISERVERSERVICE_PORT_DEBUG_PREENABLESYNC: the argument can be used to request a continuous remote API server service to be started at V-REP start-up. For that to happen, replace in above string following:
  • PORT is the port number
  • DEBUG is the debug mode (set to TRUE or FALSE)
  • PREENABLESYNC allows to preenable the synchronous mode (set to TRUE or FALSE)
  • -gGUIITEMS_XXX: the argument can be used to disable specific GUI items. For that to happen, replace in above string XXX with a decimal bit-coded value taken from the start-up options.
  • XXX.ttt: loads a V-REP scene.
  • XXX.ttm: loads a V-REP model.
  • XXX.brs: loads a BlueReality scene.
  • XXX.brm: loads a BlueReality model.
  • For example, to start V-REP in headless mode, load the scene myScene.ttt, run the simulation for 5 seconds, then stop the simulation and automatically leave V-REP again, type from within the V-REP main folder:

    Windows: vrep.exe -h -s5000 -q myScene.ttt
    Mac: ./vrep.app/Contents/MacOS/vrep -h -s5000 -q ../../../myScene.ttt
    Linux: ./vrep.sh -h -s5000 -q myScene.ttt