|

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.setInt32Parameter(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.setStringParameter(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)
-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 script specified via its filename (where XXX should contain the filename extension, e.g. myAddonScript.lua).
-GYYY=XXX: named parameter: YYY represents the key, XXX the value, that can be queried within CoppeliaSim with the simGetStringNamedParam.
-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.
-gREMOTEAPISERVERSERVICE_PORT_DEBUG_PREENABLESYNC: the argument can be used to request a continuous legacy remote API server service to be started at CoppeliaSim 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 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
Mac: ./coppeliaSim.app/Contents/MacOS/coppeliaSim -h -s5000 -q ../Resources/myScene.ttt
Linux: ./coppeliaSim.sh -h -s5000 -q myScene.ttt
|