regular API constants

General object types

sim.appobj_object_type
sim.appobj_collision_type
sim.appobj_distance_type
sim.appobj_simulation_type
sim.appobj_collection_type
sim.appobj_script_type
sim.appobj_texture_type

See also the sim.isHandle function.

Scene object types

sim.object_shape_type
sim.object_joint_type
sim.object_graph_type
sim.object_camera_type
sim.object_light_type
sim.object_dummy_type
sim.object_proximitysensor_type
sim.object_octree_type
sim.object_pointcloud_type
sim.object_visionsensor_type
sim.object_forcesensor_type

See also the sim.getObjectType and sim.getObjectsInTree functions.

Scene object sub-types

sim.light_omnidirectional_subtype
sim.light_spot_subtype
sim.light_directional_subtype
sim.joint_revolute_subtype
sim.joint_prismatic_subtype
sim.joint_spherical_subtype
sim.shape_simpleshape_subtype
sim.shape_multishape_subtype
sim.proximitysensor_ray_subtype
sim.proximitysensor_pyramid_subtype
sim.proximitysensor_cylinder_subtype
sim.proximitysensor_disc_subtype
sim.proximitysensor_cone_subtype

Scene object properties

sim.objectproperty_ignoreviewfitting
sim.objectproperty_collapsed
sim.objectproperty_selectable
sim.objectproperty_selectinvisible
with this flag, an object will be ignored during the selection process
sim.objectproperty_depthinvisible
with this flag, an object will be ignored during the depth rendering pass
sim.objectproperty_selectmodelbaseinstead
sim.objectproperty_dontshowasinsidemodel
sim.objectproperty_cannotdelete
sim.objectproperty_cannotdeleteduringsim
sim.objectproperty_hiddenforsimulation

See also the sim.getObjectProperty and sim.setObjectProperty functions.

Scene object special properties (can be combined with the OR operator)

sim.objectspecialproperty_collidable
sim.objectspecialproperty_measurable
sim.objectspecialproperty_detectable

See also the sim.getObjectSpecialProperty and sim.setObjectSpecialProperty functions.

Model properties

sim.modelproperty_not_collidable
sim.modelproperty_not_measurable
sim.modelproperty_not_detectable
sim.modelproperty_not_dynamic
sim.modelproperty_not_respondable
sim.modelproperty_not_visible
model is not visible, independently from local visibility settings
sim.modelproperty_scripts_inactive
all child- and customization scripts will be disabled for the given model
sim.modelproperty_not_showasinsidemodel
model will be invisible to other model's bounding boxes
sim.modelproperty_not_model
specified object is not a model. Use with care when setting this value

See also the sim.getModelProperty and sim.setModelProperty functions.

Simulator messages

Following messages can be queried from a script, by calling the sim.getSimulatorMessage function:

sim.message_model_loaded
sim.message_scene_loaded
sim.message_keypress
auxData[0]=key, auxData[1]=ctrl and shift key state
sim.message_prox_sensor_select_down
a "geometric" click select (mouse down) was registered. Not generated if the ctrl or shift key is down. A geometric click is generated in a non-delayed manner. See also sim.message_pick_select_down hereafter. Enable with sim.intparam_prox_sensor_select_down.
auxData[0]=objectID
auxData2[0]-auxData2[2]=coordinates of clicked point
auxData2[3]-auxData2[5]=normal vector of clicked surface
sim.message_prox_sensor_select_up
a "geometric" click select (mouse up) was registered. Not generated if the ctrl or shift key is down. A geometric click is generated in a non-delayed manner. Enable with sim.intparam_prox_sensor_select_up.
auxData[0]=objectID
auxData2[0]-auxData2[2]=coordinates of clicked point
auxData2[3]-auxData2[5]=normal vector of clicked surface
sim.message_pick_select_down
a "pick" click select (mouse down) was registered. Not generated if the ctrl or shift key is down. A pick click is generated in a delayed manner. See also sim.message_prox_sensor_select_down here above.
auxData[0]=objectID or base object ID (if part of a model and select model base instead is checked)


Following messages can be queried from the CoppeliaSim client application (and only from the client application!), by calling the simGetSimulatorMessage function:

sim_message_simulation_start_resume_request
The user wishes to start/resume a simulation. See also the simStartSimulation function
sim_message_simulation_pause_request
The user wishes to pause a simulation. See also the simPauseSimulation function
sim_message_simulation_stop_request
The user wishes to stop a simulation. See also the simStopSimulation function


Following messages are dispatched to the plugins (refer to the plugin simMsg entry point):

sim_message_eventcallback_instancepass
Called once every main client application loop pass. auxData[0] contains event flags of events that happened since last time. If you react to some of below event flags, make sure you do not react to their equivalent event callback message (e.g. sim_message_eventcallback_sceneloaded is similar to below's bit3 set)
bit0 set: object(s) erased
bit1 set: object(s) created
bit2 set: model loaded
bit3 set: scene loaded
bit4 set: undo called
bit5 set: redo called
bit6 set: scene switched (react to this message in a similar way as you would react to a full scene content change)
bit7 set: edit mode active. This is not an event flag, but a state flag
bit8 set: object(s) scaled
bit9 set: selection state changed. (different objects are selected now)
bit10 set: key pressed
bit11 set: simulation started
bit12 set: simulation ended
sim_message_eventcallback_instanceswitch
scene was switched (react to this message in a similar way as you would react to a full scene content change)
auxData[0]: do not use
auxData[1]=current scene unique ID
sim_message_eventcallback_instanceabouttoswitch
we are about to switch to a different scene
auxData[0]: do not use
auxData[1]=next scene unique ID
sim_message_eventcallback_scriptstatedestroyed
The specified script state is destroyed
auxData[0]: script handle
sim_message_eventcallback_scriptdestroyed
The specified script is destroyed
auxData[0]: script handle
sim_message_eventcallback_menuitemselected (called from the UI thread
auxData[0]=handle of the item
auxData[1]=state of the item
sim_message_eventcallback_scenesave
about to save a scene
sim_message_eventcallback_modelsave
about to save a model (current selection will be saved)
sim_message_eventcallback_abouttoundo
the undo button was hit and a previous state is about to be restored
sim_message_eventcallback_undoperformed
the undo button was hit and a previous state was restored
sim_message_eventcallback_abouttoredo
the redo button was hit and a future state is about to be restored
sim_message_eventcallback_redoperformed
the redo button was hit and a future state was restored
auxData[0]=object handle of the object associated with the script
replyData[0]: set to 1 if you do not want the double-click action to open the script editor
sim_message_eventcallback_simulationabouttostart
simulation will start
sim_message_eventcallback_simulationabouttoend
simulation will end
sim_message_eventcallback_simulationended
simulation has ended
sim_message_eventcallback_simulationinit
Called just before/after the main script's corresponding init section.
auxData[0]: 0 if called before, 1 if called after
sim_message_eventcallback_simulationactuation
Called just before/after the main script's corresponding actuation section.
auxData[0]: 0 if called before, 1 if called after
auxData[1]: simulation time in ms
sim_message_eventcallback_simulationsensing
Called just before/after the main script's corresponding sensing section.
auxData[0]: 0 if called before, 1 if called after
auxData[1]: simulation time in ms
sim_message_eventcallback_simulationcleanup
Called just before/after the main script's corresponding cleanup section.
auxData[0]: 0 if called before, 1 if called after
sim_message_eventcallback_keypress (called from the UI thread)
auxData[0]=key, auxData[1]=ctrl and shift key state
sim_message_eventcallback_refreshdialogs (called from the UI thread)
called just before dialogs are refreshed in CoppeliaSim.
auxData[0]=refresh degree (0=light, 1=medium, 2=full)
sim_message_eventcallback_sceneloaded
called after a scene was loaded
sim_message_eventcallback_modelloaded
called after a model was loaded
sim_message_eventcallback_mainscriptabouttobecalled
Called just before the main script is called. A plugin can write a value different from -1 into auxData[0] to temporarily halt simulation progress (e.g. stepping mode)
sim_message_eventcallback_moduleentry
Called when a custom menu item is selected. auxData[0]=item handle.
sim_message_eventcallback_events
Called to dispatch events. auxPointer is a const unsigned char*, holding the CBOR-coded events, auxData[0] indicates the number of events

Types of argument (input and output) for exchanging simple data between scripts and plugins

sim_script_arg_null
can be combined with sim_script_arg_table
sim_script_arg_bool
can be combined with sim_script_arg_table
sim_script_arg_int32
can be combined with sim_script_arg_table
sim_script_arg_float
can be combined with sim_script_arg_table
sim_script_arg_double
can be combined with sim_script_arg_table
sim_script_arg_string
can be combined with sim_script_arg_table
sim_script_arg_charbuff
CANNOT be combined with sim_script_arg_table
sim_script_arg_invalid
sim_script_arg_table

See also the simRegisterScriptCallbackFunction function.

Rendering attributes

sim.displayattribute_renderpass
sim.displayattribute_depthpass
sim.displayattribute_pickpass
sim.displayattribute_selected
sim.displayattribute_groupselection
sim.displayattribute_mainselection
sim.displayattribute_forcewireframe
sim.displayattribute_forbidwireframe
sim.displayattribute_forbidedges
sim.displayattribute_originalcolors
sim.displayattribute_ignorelayer
sim.displayattribute_forvisionsensor
sim.displayattribute_trianglewireframe
sim.displayattribute_simplifyasboundingbox
sim.displayattribute_thickedges
sim.displayattribute_dynamiccontentonly
sim.displayattribute_useauxcomponent
sim.displayattribute_ignorerenderableflag
sim.displayattribute_noopenglcallbacks
sim.displayattribute_nopointclouds
sim.displayattribute_nodrawingobjects
sim.displayattribute_noparticles
sim.displayattribute_colorcodedtriangles

Simulation status

sim.simulation_stopped
sim.simulation_paused
sim.simulation_advancing_firstafterstop
sim.simulation_advancing_running
sim.simulation_advancing_lastbeforepause
sim.simulation_advancing_firstafterpause
sim.simulation_advancing_abouttostop
sim.simulation_advancing_lastbeforestop

See also the sim.getSimulationState function.

Script types

sim.scripttype_mainscript (0)
sim.scripttype_childscript (1)
sim.scripttype_addonscript (2)
sim.scripttype_customizationscript (6)
sim.scripttype_sandboxscript (8)

See also sim.getScriptStringParam and sim.getScriptInt32Param.

Script parameters

sim.scriptintparam_execorder
Integer attribute, see the script execution priorities
sim.scriptintparam_execcount
Integer attribute, cannot be written
sim.scriptintparam_type
Integer attribute, cannot be written
sim.scriptintparam_handle
Integer attribute, cannot be written
sim.scriptintparam_enabled
Integer attribute
sim.scriptintparam_objecthandle
Integer attribute, cannot be written
sim.scriptintparam_lang
Integer attribute, cannot be written. 0 = lua, 1 = python
sim.scriptintparam_autorestartonerror
Integer attribute, can only be written and is auto-cleared
sim.scriptstringparam_description
String attribute, describes the script
sim.scriptstringparam_name
String attribute
sim.scriptstringparam_text
String attribute
sim.scriptstringparam_textext
String attribute

See also the functions related to script parameters.

Script execution priority

sim.scriptexecorder_first
sim.scriptexecorder_normal
sim.scriptexecorder_last

See also the script attributes.

Special argument values

sim.handle_absolute
sim.handle_all
sim.handle_all_except_explicit
sim.handle_self
sim.handle_main_script
sim.handle_tree
sim.handle_chain
sim.handle_single
sim.handle_default
sim.handle_all_except_self
sim.handle_parent
sim.handle_scene
sim.handle_app
sim.handle_inverse

Special handle flags

sim.handleflag_assembly
sim.handleflag_model
sim.handleflag_rawvalue
sim.handleflag_togglevisibility
sim.handleflag_greyscale
sim.handleflag_depthbuffermeters
sim.handleflag_depthbuffer
sim.handleflag_abscoords
sim.handleflag_codedstring
sim.handleflag_keeporiginal
sim.handleflag_camera
sim.handleflag_axis
sim.handleflag_silenterror
sim.handleflag_resetforce
sim.handleflag_resettorque
sim.handleflag_absolutecoords
sim.handleflag_relativecoords
sim.handleflag_wxyzquat
sim.handleflag_reljointbaseframe
sim.handleflag_addmultiple

Generic dialog styles

sim.dlgstyle_message
sim.dlgstyle_input
sim.dlgstyle_ok
sim.dlgstyle_ok_cancel
sim.dlgstyle_yes_no

Generic dialog return values

sim.dlgret_still_open
sim.dlgret_ok
sim.dlgret_cancel
sim.dlgret_yes
sim.dlgret_no

Path object properties (can be combined with the OR operator)

sim.pathproperty_show_line
sim.pathproperty_show_orientation
sim.pathproperty_closed_path
sim.pathproperty_automatic_orientation
sim.pathproperty_flat_path
sim.pathproperty_show_position
sim.pathproperty_keep_x_up

Custom drawing objects

Drawing object type (combine with drawing object attributes):

sim.drawing_points
items are pixel-sized points (3 values per item (x;y;z))
sim.drawing_lines
items are pixel-sized lines (6 values per item (x0;y0;z0;x1;y1;z1))
sim.drawing_linestrip
items are pixel-sized lines (3 values per line strip corner or end-point)
sim.drawing_triangles
items are triangles (9 values per item (x0;y0;z0;x1;y1;z1;x2;y2;z2))
sim.drawing_trianglepts
items are "triangle points" (7 values per item (x;y;z;Qx;Qy;Qz;Qw) (Q=quaternion)))
sim.drawing_quadpts
items are "rectangle points" (7 values per item (x;y;z;Qx;Qy;Qz;Qw) (Q=quaternion)))
sim.drawing_discpts
items are "disc points" (7 values per item (x;y;z;Qx;Qy;Qz;Qw) (Q=quaternion)))
sim.drawing_cubepts
items are "cube points" (7 values per item (x;y;z;Qx;Qy;Qz;Qw) (Q=quaternion)))
sim.drawing_spherepts
items are "sphere points" (3 values per item (x;y;z))

Drawing object attributes:

sim.drawing_cyclic
if the drawing object is full, then the first items are overwritten
sim.drawing_local
coordnate data has to be specified locally, if the drawing object is attached to an object
sim.drawing_painttag
will be rendered by vision sensors too
sim.drawing_overlay
will be rendered on top of scene objects

See also the sim.addDrawingObject function.

Particle objects

Particle object type (combine with particle object attributes). Each item (particle) requires 6 values: pt1x, pt1y, pt1z, pt2x, pt2y, pt2z (Pt1 is start position, pt2-pt1 is the initial velocity vector)

sim.particle_points1
items are displayed as 1 pixel-sized points (internally handled as a perfect sphere)
sim.particle_points2
items are displayed as 2 pixel-sized points (internally handled as a perfect sphere)
sim.particle_points4
items are displayed as 4 pixel-sized points (internally handled as a perfect sphere)
sim.particle_roughspheres
items are displayed as rough spheres (internally handled as a perfect sphere)
sim.particle_spheres
items are displayed as spheres

Particle object attributes:

sim.particle_respondable1to4
the particles are respondable against shapes that have at least one bit 1-4 activated in the global respondable mask
sim.particle_respondable5to8
the particles are respondable against shapes that have at least one bit 5-8 activated in the global respondable mask
sim.particle_particlerespondable
the particles are respondable against each other
sim.particle_ignoresgravity
the particles ignore the effect of gravity
sim.particle_invisible
the particles are invisible
sim.particle_painttag
the particles are visible when seen from vision sensors. sim.particle_invisible must not be set
sim.particle_cyclic
if the max particle count was reached, then the first particles are overwritten
sim.particle_water
particles are water particles (no weight in the water (i.e. when z<0)). In addition to that, particles can have drag coefficients for the water and the air. Not compatible with sim.particle_ignoresgravity

See also the sim.addParticleObject function.

bool parameters

sim.boolparam_hierarchy_visible
sim.boolparam_hierarchy_toolbarbutton_enabled
sim.boolparam_browser_visible
sim.boolparam_browser_toolbarbutton_enabled
sim.boolparam_objproperties_toolbarbutton_enabled
sim.boolparam_calcmodules_toolbarbutton_enabled
sim.boolparam_objectshift_toolbarbutton_enabled
sim.boolparam_objectrotate_toolbarbutton_enabled
sim.boolparam_play_toolbarbutton_enabled
sim.boolparam_pause_toolbarbutton_enabled
sim.boolparam_stop_toolbarbutton_enabled
sim.boolparam_console_visible
sim.boolparam_dynamics_handling_enabled
sim.boolparam_scene_and_model_load_messages
displays warning/error messages when loading a scene/model/UI from the API
sim.boolparam_shape_textures_are_visible
sim.boolparam_display_enabled
setting this to false allows you to enter the fast simulation mode. This value can be set back to true at any time by the system
sim.boolparam_infotext_visible
sim.boolparam_statustext_open
sim.boolparam_fog_enabled
sim.boolparam_aux_clip_planes_enabled
sim.boolparam_use_glfinish_cmd
sim.boolparam_video_recording_triggered
sim.boolparam_fullscreen
can only be read/written during simulation.
sim.boolparam_headless
whether the simulator runs without GUI. Can only be read.
sim.boolparam_force_calcstruct_all_visible
Will trigger the calculation of all visible shapes' calculation structures (needed for collision detection, distance calculation or proximity sensor operation). Might take some time.
sim.boolparam_force_calcstruct_all
Will trigger the calculation of all shapes' calculation structures (needed for collision detection, distance calculation or proximity sensor operation). Might take some time.
sim.boolparam_exit_request
Posts the exit command. Can only be written, and has only an effect when simulation is not running and no edit mode is enabled. See also sim.quitSimulator.
sim.boolparam_realtime_simulation
sim.boolparam_scene_closing
Indicates that the current scene is closing. Can only be read.
sim.boolparam_rayvalid
Indicates that the ray data is valid. Can only be read.

See also the sim.getBoolParam and sim.setBoolParam functions.

Integer parameters

sim.intparam_program_version
e.g Version 2.1.4 becomes 20104. Can only be read. See also sim.intparam_program_revision and sim.intparam_program_full_version.
sim.intparam_program_revision
Can only be read. See also sim_intparam_program_version.
sim.intparam_program_full_version
e.g Version 2.1.4 rev5 becomes 2010405. Can only be read.
sim_intparam_custom_cmd_start_id
start of custom command IDs. Can only be read
sim.intparam_compilation_version
0=CoppeliaSim Edu version, 1=CoppeliaSim Pro version, 2=CoppeliaSim Player version. Can only be read
sim.intparam_current_page
Can only be read
sim.intparam_dynamic_step_divider
Represents the number of calculation passes of the dynamics module for each simulation pass. This might be not constant during a simulation. Can be 0 when sim.handleDynamics wasn't yet called. Can only be read
sim.intparam_dynamic_engine
0=Bullet, 1=ODE, 2=Vortex, 3=Newton, 4=MuJoCo.
sim.intparam_server_port_start
together with sim.intparam_server_port_next and sim.intparam_server_port_range, indicates which local ports can be used. Can only be read
sim.intparam_server_port_range
together with sim.intparam_server_port_next and sim.intparam_server_port_start, indicates which local ports can be used. Can only be read
sim.intparam_server_port_next
Indicates which local ports can be used next. Once that port was used, update this value according to the values stored in sim.intparam_server_port_start and sim.intparam_server_port_range
sim.intparam_visible_layers
sim.intparam_infotext_style
allowed values are 0-2
sim.intparam_settings
Use with care, and always reset to initial values at simulation end
bit1: edge antialiasing
bit2: world reference display
bit3: bounding box display
bit4: don't use Frame Buffer Objects for vision sensors
bit5: undo/redo enabled
sim.intparam_edit_mode_type
Can only be read:
0: no edit mode
1: triangle edit mode
2: vertex edit mode
3: edge edit mode
4: path edit mode
5: button edit mode
6: compound shapes edit mode
sim.intparam_qt_version
The Qt version. Can only be read
sim.intparam_event_flags_read
Some event flags. Can only be read:
bit0 set: object(s) erased
bit1 set: object(s) created
bit2 set: model loaded
bit3 set: scene loaded
bit4 set: undo called
bit5 set: redo called
bit6 set: scene switched (react to this message in a similar way as you would react to a full scene content change)
bit7 set: edit mode active. This is not an event flag, but a state flag
bit8 set: object(s) scaled
bit9 set: selection state changed. (different objects are selected now)
bit10 set: key pressed
bit11 set: simulation started
bit12 set: simulation ended
sim.intparam_event_flags_read_clear
Some event flags. Reads the flags and clears them right after
sim.intparam_platform
0=Windows, 1=Macintosh, 2=Linux. Can only be read
sim.intparam_scene_unique_id
A unique ID for the current scene. Different from one scene load to the next. Useful to identify scene switches. Can only be read. See also sim.stringparam_scene_unique_id
sim.intparam_mouse_x
sim.intparam_mouse_y
sim.intparam_mouse_buttons
Bit-coded: bit0 set=left button, bit1 set=middle wheel activity, bit2 set=right button, bit3 set=middle wheel down.
sim.intparam_core_count
The number of cores on this machine. Can only be read.
sim.intparam_idle_fps
sim.intparam_stop_request_counter
a counter that is incremented each time a stop simulation request arrives (e.g. via the toolbar button, menu, etc.)
sim.intparam_dynamic_warning_disabled_mask
a bit-coded mask that allows to temporarily disable warning messages from the physics engine:
bit 0 set (1): primitive spheroids are not supported
bit 1 set (2): primitive cones are not supported
bit 2 set (4): primitive hollow shapes are not supported
bit 3 set (8): physics engine is not supported supported
bit 4 set (16): scene contains non-primitive, non-convex shapes
bit 5 set (32): scene contains static shapes on dynamic construction
bit 6 set (64): non-default physics engine settings
bit 7 set (128): Vortex plugin is demo version
bit 8 set (256): dynamic non-convex meshes are not supported with the selected engine.
sim.intparam_simulation_warning_disabled_mask
a bit-coded mask that allows to temporarily disable warning messages related to simulation:
bit 0 set (1): non-default parameters used
sim.intparam_scene_index
when written, will be executed in a delayed fashion.
sim.intparam_motionplanning_seed
Specify a value that initializes the random number generator for the motion planning functionality. Can only be written.
sim.intparam_speedmodifier
Can only be read/written when simulation is not stopped.
sim.intparam_verbosity
the console verbosity level.
sim.intparam_statusbarverbosity
the status bar verbosity level.
sim.intparam_dlgverbosity
the verbosity level of simple dialogs.
sim.intparam_mouseclickcounterdown
a simple mouse down counter, for mouse clicks. Cannot be written
sim.intparam_mouseclickcounterup
a simple mouse up counter, for mouse clicks. Cannot be written
sim.intparam_objectcreationcounter
changes when an object is created. Cannot be written
sim.intparam_objectdestructioncounter
changes when an object is destroyed. Cannot be written
sim.intparam_hierarchychangecounter
changes when an object changes its parent. Cannot be written

See also the sim.getInt32Param and sim.setInt32Param functions.

uint64 parameters


See also the simGetUInt64Parameter function.

Floating point parameters

sim.floatparam_rand
Returns a random value in the range [0.0;1.0]. Useful when called from Lua since each script instance will initialize its random number generator in a same way, and thus, 'random' values generated in different scripts will be relatively 'similar'. This is not the case with this random value. Can only be read. See also sim.getRandom, math.random2 and math.randomseed2.
sim.floatparam_simulation_time_step
The simulation time step (i.e. dt). Can only be written when using a custom dt value (which can be set in the simulation settings dialog), and when simulation is stopped.
sim.floatparam_stereo_distance
The camera intra occular distance when in 3D OpenGl stereo mode.
sim.floatparam_physicstimestep
The step size of the physics engine.
sim.floatparam_maxtrisizeabs
The maximum triangle size (absolute), for mesh calculation structures
sim.floatparam_mintrisizerel
The minimum triangle size (relative), for mesh calculation structures

See also the sim.getFloatParam and sim.setFloatParam functions.

String parameters

sim.stringparam_application_path
can only be read
sim.stringparam_scene_path_and_name
can only be read
sim.stringparam_scene_path
can only be read
sim.stringparam_scene_name
can only be read
sim.stringparam_video_filename
path + filename without extension
sim.stringparam_scene_unique_id
A unique ID for the current scene. The id will be same if the scene if opened several times. Can only be read. See also sim.intparam_scene_unique_id
sim.stringparam_app_arg1
the 1st argument specified via command line option -g
sim.stringparam_app_arg2
the 2nd argument specified via command line option -g
sim.stringparam_app_arg3
the 3rd argument specified via command line option -g
sim.stringparam_app_arg4
the 4th argument specified via command line option -g
sim.stringparam_app_arg5
the 5th argument specified via command line option -g
sim.stringparam_app_arg6
the 6th argument specified via command line option -g
sim.stringparam_app_arg7
the 7th argument specified via command line option -g
sim.stringparam_app_arg8
the 8th argument specified via command line option -g
sim.stringparam_app_arg9
the 9th argument specified via command line option -g
sim.stringparam_verbosity
Can only be written.
sim.stringparam_statusbarverbosity
Can only be written.
sim.stringparam_dlgverbosity
Can only be written.
sim.stringparam_consolelogfilter
Format as: txta1&txta2&...&txtaN|txtb1&txtb2&...&txtbN|...
sim.stringparam_tempdir
Can only be read.
sim.stringparam_tempscenedir
Can only be read.
sim.stringparam_datadir
Can only be read.
sim.stringparam_luadir
Can only be read.
sim.stringparam_pythondir
Can only be read.
sim.stringparam_addonpath
Can only be read. Path + name of the calling add-on. See also sim.stringparam_addondir
sim.stringparam_mujocodir
Can only be read.
sim.stringparam_usersettingsdir
Can only be read.
sim.stringparam_systemdir
Can only be read.
sim.stringparam_resourcesdir
Can only be read.
sim.stringparam_addondir
Can only be read.
sim.stringparam_sandboxlang

See also the sim.getStringParam function.

Verbosity

sim.verbosity_useglobal
Use global verbosity (can be used to reset a plugin's verbosity to the global verbosity again)
sim.verbosity_none
No verbosity
sim.verbosity_errors
System and plugin error messages
sim.verbosity_warnings
System and plugin warning messages
sim.verbosity_loadinfos
Messages related to CoppeliaSim start-up and shut-down. Default console verbosity.
sim.verbosity_questions
Messages related to question dialogs.
sim.verbosity_scripterrors
Script error messages
sim.verbosity_scriptwarnings
Script warning messages
sim.verbosity_scriptinfos
Information messages mainly related to scripts. Default status bar verbosity.
sim.verbosity_infos
General information messages
sim.verbosity_debug
Debug messages
sim.verbosity_trace
Plugin trace messages
sim.verbosity_tracelua
Script calls to API functions
sim.verbosity_traceall
Full verbosity
sim.verbosity_default
Default verbosity (normally sim.verbosity_loadinfos)

See also sim.getInt32Param(sim.intparam_verbosity), sim.setInt32Param(sim.intparam_verbosity,verbosity) and sim.setPluginInfo(pluginName,sim.plugininfo_verbosity,verbosity). For statusbar verbosity, use sim.intparam_statusbarverbosity or sim.plugininfo_statusbarverbosity.

Plugin infos

sim.plugininfo_extversionstr
Extended version string
sim.plugininfo_builddatestr
Build date string
sim.plugininfo_extversionint
Extended version integer
sim.plugininfo_verbosity
Console verbosity. see the various verbosity levels
sim.plugininfo_statusbarverbosity
Status bar verbosity. see the various verbosity levels

See also sim.getPluginInfo and sim.setPluginInfo.

Array parameters

sim.arrayparam_gravity
3 floats
sim.arrayparam_fog
3 floats: fog start, fog end, fog density
sim.arrayparam_fog_color
3 floats
sim.arrayparam_background_color1
3 floats
sim.arrayparam_background_color2
3 floats
sim.arrayparam_ambient_light
3 floats
sim.arrayparam_random_euler
3 floats. Can only be read.
sim.arrayparam_rayorigin
3 floats indicating the origin of the current camera-mouse ray. Can only be read
sim.arrayparam_raydirection
3 floats indicating the direction of the current camera-mouse ray. Can only be read

See also the sim.getArrayParam and sim.setArrayParam functions.

Mouse navigation and selection modes

sim.navigation_passive
sim.navigation_camerashift
sim.navigation_camerarotate
sim.navigation_camerazoom
sim.navigation_cameratilt
sim.navigation_cameraangle
sim.navigation_objectshift
sim.navigation_objectrotate

Bit-combine following values and add them to one of above's values for a valid navigation mode:

sim.navigation_clickselection
sim.navigation_ctrlselection
sim.navigation_shiftselection
sim.navigation_camerazoomwheel
sim.navigation_camerarotatemiddlebutton

See also the sim.getNavigationMode and sim.setNavigationMode functions.

Bit-coded start-up options

sim_gui_menubar (1)
sim_gui_popups (2)
sim_gui_toolbar1 (4)
sim_gui_toolbar2 (8)
sim_gui_hierarchy (16)
sim_gui_infobar (32)
sim_gui_statusbar (64)
sim_gui_scripteditor (128)
sim_gui_scriptsimulationparameters (256)
sim_gui_dialogs (512)
sim_gui_browser (1024)
sim_gui_all (0x0ffff)
sim_gui_headless (will override all other GUI flags) (65536)


Joint modes

sim.jointmode_kinematic
sim.jointmode_dependent
sim.jointmode_dynamic

See also the sim.setJointMode function.

Dynamic joint control modes

sim.jointdynctrl_free
sim.jointdynctrl_force
sim.jointdynctrl_velocity
sim.jointdynctrl_position
sim.jointdynctrl_spring
sim.jointdynctrl_callback

See also the sim.setObjectInt32Param function.

Ruckig Online Trajectory Generator constants

select exactly one of following:
sim.ruckig_phasesync (default)
sim.ruckig_timesync
sim.ruckig_nosync
and optionally combine with any of following:
sim.ruckig_minvel: for situation where minVel!=-maxVel, i.e. for an asymmetric behaviour
sim.ruckig_minaccel: for situation where minAccel!=-maxAccel, i.e. for an asymmetric behaviour

Primitive shape types

sim.primitiveshape_none
sim.primitiveshape_plane
sim.primitiveshape_disc
sim.primitiveshape_cuboid
sim.primitiveshape_spheroid
sim.primitiveshape_cylinder
sim.primitiveshape_cone
sim.primitiveshape_capsule
sim.primitiveshape_heightfield

See also the sim.getShapeGeomInfo and sim.createPrimitiveShape functions

Dummy types

sim.dummytype_default
sim.dummytype_assembly
sim.dummytype_dynloopclosure
sim.dummytype_dyntendon

Texture mapping modes

sim.texturemap_plane
sim.texturemap_cylinder
sim.texturemap_sphere
sim.texturemap_cube

See also the sim.setShapeTexture function.

Color components

sim.colorcomponent_ambient_diffuse (only for objects)
sim.colorcomponent_diffuse (only for lights)
sim.colorcomponent_specular
sim.colorcomponent_emission (only for objects)
sim.colorcomponent_transparency (only for objects)
sim.colorcomponent_auxiliary (only for objects)

See also the sim.setShapeColor function.

Proximity sensor volume types

sim.volume_pyramid
sim.volume_cylinder
sim.volume_disc
sim.volume_cone
sim.volume_ray
sim.volume_randomizedray

Buffer types with allowed transformations

sim.buffer_uint8
with sim.buffer_uint8,sim.buffer_uint8rgb,sim.buffer_base64 (multiplier and offset are ignored),sim.buffer_split (multiplier is ignored, offset is the split size)
sim.buffer_uint8rgb
with sim.buffer_uint8rgb,sim.buffer_uint8bgr,sim.buffer_uint8
sim.buffer_uint8bgr
with sim.buffer_uint8bgr,sim.buffer_uint8rgb,sim.buffer_uint8
sim.buffer_uint8rgba
with sim.buffer_uint8rgba,sim.buffer_uint8rgb
sim.buffer_uint8argb
with sim.buffer_uint8argb,sim.buffer_uint8rgb
sim.buffer_float
with sim.buffer_uint8, sim.buffer_int8, sim.buffer_uint16, sim.buffer_int16, sim.buffer_uint32,
sim.buffer_int32,sim.buffer_float,sim.buffer_double,sim.buffer_uint8rgb
sim.buffer_double
with sim.buffer_uint8, sim.buffer_int8, sim.buffer_uint16, sim.buffer_int16, sim.buffer_uint32,
sim.buffer_int32,sim.buffer_float,sim.buffer_double,sim.buffer_uint8rgb
sim.buffer_base64 (multiplier and offset are ignored)
with sim.buffer_uint8

See also the sim.transformBuffer function.

Image combination operations

sim.imgcomb_vertical: vertical concatenation
sim.imgcomb_horizontal: horizontal concatenation

See also the sim.combineRgbImages function.

Graph stream transformations

sim.stream_transf_raw
sim.stream_transf_derivative
sim.stream_transf_integral
sim.stream_transf_cumulative

See also the sim.setGraphStreamTransformation function.

Stack item types

sim_stackitem_null
sim_stackitem_double
sim_stackitem_bool
sim_stackitem_string
sim_stackitem_table
sim_stackitem_func
sim_stackitem_userdat
sim_stackitem_thread
sim_stackitem_lightuserdat
sim_stackitem_integer

Stack table info

sim_stack_table_circular_ref
sim_stack_table_not_table
sim_stack_table_map
sim_stack_table_empty

Predefined dynamic material types

sim.dynmat_default
sim.dynmat_highfriction
sim.dynmat_lowfriction
sim.dynmat_nofriction
sim.dynmat_reststackgrasp
sim.dynmat_foot
sim.dynmat_wheel
sim.dynmat_gripper
sim.dynmat_floor

Physics engine properties

sim.bullet_global_internalscalingfactor (float parameter)
sim.bullet_global_collisionmarginfactor (float parameter)
sim.bullet_global_constraintsolvingiterations (int parameter)
sim.bullet_global_constraintsolvertype (int parameter)
sim.bullet_global_fullinternalscaling (bool parameter)
sim.bullet_global_computeinertias (bool parameter)

sim.bullet_joint_stoperp (float parameter)
sim.bullet_joint_stopcfm (float parameter)
sim.bullet_joint_normalcfm (float parameter)

sim.bullet_body_restitution (float parameter)
sim.bullet_body_oldfriction (float parameter)
sim.bullet_body_friction (float parameter)
sim.bullet_body_lineardamping (float parameter)
sim.bullet_body_angulardamping (float parameter)
sim.bullet_body_nondefaultcollisionmargingfactor (float parameter)
sim.bullet_body_nondefaultcollisionmargingfactorconvex (float parameter)
sim.bullet_body_sticky (bool parameter)
sim.bullet_body_usenondefaultcollisionmargin (bool parameter)
sim.bullet_body_usenondefaultcollisionmarginconvex (bool parameter)
sim.bullet_body_autoshrinkconvex (bool parameter)


sim.ode_global_internalscalingfactor (float parameter)
sim.ode_global_cfm (float parameter)
sim.ode_global_erp (float parameter)
sim.ode_global_constraintsolvingiterations (int parameter)
sim.ode_global_randomseed (int parameter)
sim.ode_global_fullinternalscaling (bool parameter)
sim.ode_global_quickstep (bool parameter)
sim.ode_global_computeinertias (bool parameter)

sim.ode_joint_stoperp (float parameter)
sim.ode_joint_stopcfm (float parameter)
sim.ode_joint_bounce (float parameter)
sim.ode_joint_fudgefactor (float parameter)
sim.ode_joint_normalcfm (float parameter)

sim.ode_body_friction (float parameter)
sim.ode_body_softerp (float parameter)
sim.ode_body_softcfm (float parameter)
sim.ode_body_lineardamping (float parameter)
sim.ode_body_angulardamping (float parameter)
sim.ode_body_maxcontacts (int parameter)


sim.vortex_global_internalscalingfactor (float parameter)
sim.vortex_global_contacttolerance (float parameter)
sim.vortex_global_constraintlinearcompliance (float parameter)
sim.vortex_global_constraintlineardamping (float parameter)
sim.vortex_global_constraintlinearkineticloss (float parameter)
sim.vortex_global_constraintangularcompliance (float parameter)
sim.vortex_global_constraintangulardamping (float parameter)
sim.vortex_global_constraintangularkineticloss (float parameter)
sim.vortex_global_autosleep (bool parameter)
sim.vortex_global_multithreading (bool parameter)
sim.vortex_global_computeinertias (bool parameter)

sim.vortex_joint_lowerlimitdamping (float parameter)
sim.vortex_joint_upperlimitdamping (float parameter)
sim.vortex_joint_lowerlimitstiffness (float parameter)
sim.vortex_joint_upperlimitstiffness (float parameter)
sim.vortex_joint_lowerlimitrestitution (float parameter)
sim.vortex_joint_upperlimitrestitution (float parameter)
sim.vortex_joint_lowerlimitmaxforce (float parameter)
sim.vortex_joint_upperlimitmaxforce (float parameter)
sim.vortex_joint_motorconstraintfrictioncoeff (float parameter)
sim.vortex_joint_motorconstraintfrictionmaxforce (float parameter)
sim.vortex_joint_motorconstraintfrictionloss (float parameter)
sim.vortex_joint_p0loss (float parameter)
sim.vortex_joint_p0stiffness (float parameter)
sim.vortex_joint_p0damping (float parameter)
sim.vortex_joint_p0frictioncoeff (float parameter)
sim.vortex_joint_p0frictionmaxforce (float parameter)
sim.vortex_joint_p0frictionloss (float parameter)
sim.vortex_joint_p1loss (float parameter)
sim.vortex_joint_p1stiffness (float parameter)
sim.vortex_joint_p1damping (float parameter)
sim.vortex_joint_p1frictioncoeff (float parameter)
sim.vortex_joint_p1frictionmaxforce (float parameter)
sim.vortex_joint_p1frictionloss (float parameter)
sim.vortex_joint_p2loss (float parameter)
sim.vortex_joint_p2stiffness (float parameter)
sim.vortex_joint_p2damping (float parameter)
sim.vortex_joint_p2frictioncoeff (float parameter)
sim.vortex_joint_p2frictionmaxforce (float parameter)
sim.vortex_joint_p2frictionloss (float parameter)
sim.vortex_joint_a0loss (float parameter)
sim.vortex_joint_a0stiffness (float parameter)
sim.vortex_joint_a0damping (float parameter)
sim.vortex_joint_a0frictioncoeff (float parameter)
sim.vortex_joint_a0frictionmaxforce (float parameter)
sim.vortex_joint_a0frictionloss (float parameter)
sim.vortex_joint_a1loss (float parameter)
sim.vortex_joint_a1stiffness (float parameter)
sim.vortex_joint_a1damping (float parameter)
sim.vortex_joint_a1frictioncoeff (float parameter)
sim.vortex_joint_a1frictionmaxforce (float parameter)
sim.vortex_joint_a1frictionloss (float parameter)
sim.vortex_joint_a2loss (float parameter)
sim.vortex_joint_a2stiffness (float parameter)
sim.vortex_joint_a2damping (float parameter)
sim.vortex_joint_a2frictioncoeff (float parameter)
sim.vortex_joint_a2frictionmaxforce (float parameter)
sim.vortex_joint_a2frictionloss (float parameter)
sim.vortex_joint_relaxationenabledbc (int parameter)
Bit-coded, 3 bits for the linear x/y/z, 3 bits for the angular x/y/z.
sim.vortex_joint_frictionenabledbc (int parameter)
Bit-coded, 3 bits for the linear x/y/z, 3 bits for the angular x/y/z.
sim.vortex_joint_frictionproportionalbc (int parameter)
Bit-coded, 3 bits for the linear x/y/z, 3 bits for the angular x/y/z.
sim.vortex_joint_motorfrictionenabled (bool parameter)
sim.vortex_joint_proportionalmotorfriction (bool parameter)

sim.vortex_body_primlinearaxisfriction (float parameter)
sim.vortex_body_seclinearaxisfriction (float parameter)
sim.vortex_body_primangularaxisfriction (float parameter)
sim.vortex_body_secangularaxisfriction (float parameter)
sim.vortex_body_normalangularaxisfriction (float parameter)
sim.vortex_body_primlinearaxisstaticfrictionscale (float parameter)
sim.vortex_body_seclinearaxisstaticfrictionscale (float parameter)
sim.vortex_body_primangularaxisstaticfrictionscale (float parameter)
sim.vortex_body_secangularaxisstaticfrictionscale (float parameter)
sim.vortex_body_normalangularaxisstaticfrictionscale (float parameter)
sim.vortex_body_compliance (float parameter)
sim.vortex_body_damping (float parameter)
sim.vortex_body_restitution (float parameter)
sim.vortex_body_restitutionthreshold (float parameter)
sim.vortex_body_adhesiveforce (float parameter)
sim.vortex_body_linearvelocitydamping (float parameter)
sim.vortex_body_angularvelocitydamping (float parameter)
sim.vortex_body_primlinearaxisslide (float parameter)
sim.vortex_body_seclinearaxisslide (float parameter)
sim.vortex_body_primangularaxisslide (float parameter)
sim.vortex_body_secangularaxisslide (float parameter)
sim.vortex_body_normalangularaxisslide (float parameter)
sim.vortex_body_primlinearaxisslip (float parameter)
sim.vortex_body_seclinearaxisslip (float parameter)
sim.vortex_body_primangularaxisslip (float parameter)
sim.vortex_body_secangularaxisslip (float parameter)
sim.vortex_body_normalangularaxisslip (float parameter)
sim.vortex_body_autosleeplinearspeedthreshold (float parameter)
sim.vortex_body_autosleeplinearaccelthreshold (float parameter)
sim.vortex_body_autosleepangularspeedthreshold (float parameter)
sim.vortex_body_autosleepangularaccelthreshold (float parameter)
sim.vortex_body_skinthickness (float parameter)
sim.vortex_body_autoangulardampingtensionratio (float parameter)
sim.vortex_body_primaxisvectorx (float parameter)
sim.vortex_body_primaxisvectory (float parameter)
sim.vortex_body_primaxisvectorz (float parameter)
sim.vortex_body_primlinearaxisfrictionmodel (int parameter)
sim.vortex_body_seclinearaxisfrictionmodel (int parameter)
sim.vortex_body_primangulararaxisfrictionmodel (int parameter)
sim.vortex_body_secangularaxisfrictionmodel (int parameter)
sim.vortex_body_normalangularaxisfrictionmodel (int parameter)
sim.vortex_body_autosleepsteplivethreshold (int parameter)
sim.vortex_body_materialuniqueid (int parameter)
sim.vortex_body_pureshapesasconvex (bool parameter)
sim.vortex_body_convexshapesasrandom (bool parameter)
sim.vortex_body_randomshapesasterrain (bool parameter)
sim.vortex_body_fastmoving (bool parameter)
sim.vortex_body_autoslip (bool parameter)
sim.vortex_body_seclinaxissameasprimlinaxis (bool parameter)
sim.vortex_body_secangaxissameasprimangaxis (bool parameter)
sim.vortex_body_normangaxissameasprimangaxis (bool parameter)
sim.vortex_body_autoangulardamping (bool parameter)


sim.newton_global_contactmergetolerance (float parameter)
sim.newton_global_constraintsolvingiterations (int parameter)
sim.newton_global_multithreading (bool parameter)
sim.newton_global_exactsolver (bool parameter)
sim.newton_global_highjointaccuracy (bool parameter)
sim.newton_global_computeinertias (bool parameter)

sim.newton_body_staticfriction (float parameter)
sim.newton_body_kineticfriction (float parameter)
sim.newton_body_restitution (float parameter)
sim.newton_body_lineardrag (float parameter)
sim.newton_body_angulardrag (float parameter)
sim.newton_body_fastmoving (bool parameter)


sim.mujoco_global_impratio (float parameter)
sim.mujoco_global_wind1 (float parameter)
sim.mujoco_global_wind2 (float parameter)
sim.mujoco_global_wind3 (float parameter)
sim.mujoco_global_density (float parameter)
sim.mujoco_global_viscosity (float parameter)
sim.mujoco_global_boundmass (float parameter)
sim.mujoco_global_boundinertia (float parameter)
sim.mujoco_global_overridemargin (float parameter)
sim.mujoco_global_overridesolref1 (float parameter)
sim.mujoco_global_overridesolref2 (float parameter)
sim.mujoco_global_overridesolimp1 (float parameter)
sim.mujoco_global_overridesolimp2 (float parameter)
sim.mujoco_global_overridesolimp3 (float parameter)
sim.mujoco_global_overridesolimp4 (float parameter)
sim.mujoco_global_overridesolimp5 (float parameter)
sim.mujoco_global_kinmass (float parameter)
sim.mujoco_global_kininertia (float parameter)
sim.mujoco_global_bitcoded (int parameter)
sim.mujoco_global_iterations (int parameter)
sim.mujoco_global_integrator (int parameter)
sim.mujoco_global_solver (int parameter)
sim.mujoco_global_njmax (int parameter)
sim.mujoco_global_nstack (int parameter)
sim.mujoco_global_nconmax (int parameter)
sim.mujoco_global_cone (int parameter)
sim.mujoco_global_overridekin (int parameter)
sim.mujoco_global_rebuildcondition (int parameter)
sim.mujoco_global_computeinertias (bool parameter)
sim.mujoco_global_multithreaded (bool parameter)
sim.mujoco_global_multiccd (bool parameter)
sim.mujoco_global_balanceinertias (bool parameter)
sim.mujoco_global_overridecontacts (bool parameter)

sim.mujoco_joint_solreflimit1 (float parameter)
sim.mujoco_joint_solreflimit2 (float parameter)
sim.mujoco_joint_solimplimit1 (float parameter)
sim.mujoco_joint_solimplimit2 (float parameter)
sim.mujoco_joint_solimplimit3 (float parameter)
sim.mujoco_joint_solimplimit4 (float parameter)
sim.mujoco_joint_solimplimit5 (float parameter)
sim.mujoco_joint_frictionloss (float parameter)
sim.mujoco_joint_solreffriction1 (float parameter)
sim.mujoco_joint_solreffriction2 (float parameter)
sim.mujoco_joint_solimpfriction1 (float parameter)
sim.mujoco_joint_solimpfriction2 (float parameter)
sim.mujoco_joint_solimpfriction3 (float parameter)
sim.mujoco_joint_solimpfriction4 (float parameter)
sim.mujoco_joint_solimpfriction5 (float parameter)
sim.mujoco_joint_stiffness (float parameter)
sim.mujoco_joint_damping (float parameter)
sim.mujoco_joint_springref (float parameter)
sim.mujoco_joint_springdamper1 (float parameter)
sim.mujoco_joint_springdamper2 (float parameter)
sim.mujoco_joint_armature (float parameter)
sim.mujoco_joint_margin (float parameter)
sim.mujoco_joint_polycoef1 (float parameter)
sim.mujoco_joint_polycoef2 (float parameter)
sim.mujoco_joint_polycoef3 (float parameter)
sim.mujoco_joint_polycoef4 (float parameter)
sim.mujoco_joint_polycoef5 (float parameter)

sim.mujoco_body_friction1 (float parameter)
sim.mujoco_body_friction2 (float parameter)
sim.mujoco_body_friction3 (float parameter)
sim.mujoco_body_solref1 (float parameter)
sim.mujoco_body_solref2 (float parameter)
sim.mujoco_body_solimp1 (float parameter)
sim.mujoco_body_solimp2 (float parameter)
sim.mujoco_body_solimp3 (float parameter)
sim.mujoco_body_solimp4 (float parameter)
sim.mujoco_body_solimp5 (float parameter)
sim.mujoco_body_solmix (float parameter)
sim.mujoco_body_condim (int parameter)

sim.mujoco_dummy_range1 (float parameter)
sim.mujoco_dummy_range2 (float parameter)
sim.mujoco_dummy_solreflimit1 (float parameter)
sim.mujoco_dummy_solreflimit2 (float parameter)
sim.mujoco_dummy_solimplimit1 (float parameter)
sim.mujoco_dummy_solimplimit2 (float parameter)
sim.mujoco_dummy_solimplimit3 (float parameter)
sim.mujoco_dummy_solimplimit4 (float parameter)
sim.mujoco_dummy_solimplimit5 (float parameter)
sim.mujoco_dummy_margin (float parameter)
sim.mujoco_dummy_springlength (float parameter)
sim.mujoco_dummy_stiffness (float parameter)
sim.mujoco_dummy_damping (float parameter)
sim.mujoco_dummy_bitcoded (int parameter)
sim.mujoco_dummy_limited (bool parameter)


See also the related setter and getter API functions.

Bullet solver types

sim.bullet_constraintsolvertype_sequentialimpulse
sim.bullet_constraintsolvertype_nncg
sim.bullet_constraintsolvertype_dantzig
sim.bullet_constraintsolvertype_projectedgaussseidel

See also the physics engine properties.

Vortex friction models

sim.vortex_bodyfrictionmodel_box
sim.vortex_bodyfrictionmodel_scaledbox
sim.vortex_bodyfrictionmodel_proplow
sim.vortex_bodyfrictionmodel_prophigh
sim.vortex_bodyfrictionmodel_scaledboxfast
sim.vortex_bodyfrictionmodel_neutral
sim.vortex_bodyfrictionmodel_none

See also the physics engine properties.