Commands/settings

You can adjust the way CoppeliaSim operates via a plugin or an add-on, but you can also modify its behaviour via:

  • command line arguments
  • the overall settings file
  • Additionally, you can also interact with CoppeliaSim via script functions and the Lua commander.



    Command line

    When you start CoppeliaSim via the command line, you have following command line options that are supported:

  • -vXXX: sets the verbosity level, in the console. Default is loadinfos. Other accepted values for XXX are none, errors, warnings, loadinfos, scripterrors, scriptwarnings, scriptinfos, infos, debug , trace, tracelua and traceall. Plugins should output messages via simAddLog , scripts via sim.addLog. Verbosity can change during runtime: from within CoppeliaSim, global verbosity can be adjusted with sim.setInt32Param(sim.intparam_globalverbosity,verbosity), and plugin verbosity with sim.setModuleInfo(pluginName,sim.moduleinfo_verbosity,verbosity). By default, plugin verbosity follows global verbosity. Command line verbosity setting can be overridden via the verbosity value in system/usrset.txt. Additionally, console log messages can be filtered via the consoleLogFilter value in system/usrset.txt., or via sim.setStringParam(sim.stringparam_consolelogfilter,filter).
  • -wXXX: similar to the -v setting above, but for the verbosity level in the status bar. Default is scriptinfos. Status bar verbosity setting can be overridden via the statusbarVerbosity value in system/usrset.txt.
  • -xXXX: similar to the -v or -w setting above, but for the verbosity level for simple dialogs. Default is infos. Other accepted values for XXX are none, errors, warnings and questions. Dialog verbosity setting can be overridden via the dialogVerbosity value in system/usrset.txt.
  • -c"XXX": executes the script string XXX as soon as the sandbox script is initialized.
  • -h: runs CoppeliaSim in headless mode (i.e. without any GUI). This option simply suppresses all GUI elements, but otherwise runs normally. For a true headless operation, use the headless library (i.e. rename coppeliaSimLibHeadless.dll (or similar) to coppeliaSimLib.dll). In that case keep in mind that vision sensors won't operate, unless they use the Pov-Ray rendering mode (and the Pov-Ray plugin is installed, binaries available here), and that their rendering will be drastically slower.
  • -sXXX: automatically start the simulation. XXX represents an optional simulation time in milliseconds after which simulation should stop again.
  • -q: automatically quits CoppeliaSim after the first simulation run ended.
  • -aXXX and/or -bXXX: loads and runs an additional add-on specified via its filename (where XXX should contain the filename extension, e.g. myAddon.lua).
  • -GYYY=XXX: named parameter: YYY represents the key, XXX the value, that can be queried within CoppeliaSim with the sim.getNamedStringParam.
  • -gXXX: XXX represents an optional argument that can be queried within CoppeliaSim with the sim.stringparam_app_arg1... sim.stringparam_app_arg9 parameters. The argument can be used for various custom purposes.
  • -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 or XXX.simscene.xml: loads a CoppeliaSim scene.
  • XXX.ttm or XXX.simmodel.xml: loads a CoppeliaSim model.
  • XXX.brs: loads an XReality scene.
  • XXX.brm: loads an XReality model.
  • For example, to start CoppeliaSim in headless mode, load the scene myScene.ttt, run the simulation for 5 seconds, then stop the simulation and automatically leave CoppeliaSim again, type from within the CoppeliaSim main folder:

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

    Overall settings file

    When CoppeliaSim starts, the file system/usrset.txt is read and values applied. Settings apply to various areas, such as:

  • debugging
  • rendering/display
  • directories
  • serialization
  • messaging
  • compatibility
  • floating licence
  • etc.


  • Lua commander

    The Lua commander, implemented via the simExtLuaCmd plugin, is a read-eval-print loop, that adds a text input to the CoppeliaSim status bar, which allows entering and executing Lua code on the fly, like in a terminal. The code can be run in theĀ sandbox script, or any other active script in CoppeliaSim. The behavior of the plugin can be controlled via [Menu bar --> Modules --> Lua commander]. It also offers its own API functions. Additionally, help() will display usage tips.

    [Lua commander]