sim_message_model_loaded
sim_message_scene_loaded
sim_message_keypress
auxiliaryData[0]=key, auxiliaryData[1]=ctrl and shift key state
sim_message_bannerclicked
auxiliaryData[0]=banner ID
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.
auxiliaryData[0]=objectID
auxiliaryData2[0]-auxiliaryData2[2]=coordinates of clicked point
auxiliaryData2[3]-auxiliaryData2[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.
auxiliaryData[0]=objectID
auxiliaryData2[0]-auxiliaryData2[2]=coordinates of clicked point
auxiliaryData2[3]-auxiliaryData2[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.
auxiliaryData[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 V-REP client application (and only from the client application!), by calling the simGetSimulatorMessage function:
sim_message_simulation_start_resume_request
sim_message_simulation_pause_request
sim_message_simulation_stop_request
sim_message_eventcallback_instancepass
Called once every main client application loop pass. auxiliaryData[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)
auxiliaryData[0]: do not use
auxiliaryData[1]=current scene unique ID
sim_message_eventcallback_instanceabouttoswitch
we are about to switch to a different scene
auxiliaryData[0]: do not use
auxiliaryData[1]=next scene unique ID
sim_message_eventcallback_menuitemselected (called from the UI thread)
auxiliaryData[0]=handle of the item
auxiliaryData[1]=state of the item
sim_message_eventcallback_broadcast
auxiliaryData[0]=header (e.g. a large, random identifier, or your V-REP serial number)
auxiliaryData[1]=message ID
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_moduleopen
called when simOpenModule in Lua is called
customData=name of the plugin to execute the command, or NULL if all should execute the command
sim_message_eventcallback_modulehandle
called when simHandleModule in Lua is called with second argument false
customData=name of the plugin to execute the command, or NULL if all should execute the command
sim_message_eventcallback_modulehandleinsensingpart
called when simHandleModule in Lua is called with second arg. true
customData=name of the plugin to execute the command, or NULL if all should execute the command
sim_message_eventcallback_moduleclose
called when simCloseModule in Lua is called
customData=name of the plugin to execute the command, or NULL if all should execute the command
sim_message_eventcallback_renderingpass (called from the UI thread)
sim_message_eventcallback_beforerendering
called just before the scene is rendered, but still from the main simulation thread. Only called when in non-threaded rendering mode.
sim_message_eventcallback_broadcast
called when simBroadcastMessage is called
sim_message_eventcallback_imagefilter_enumreset
"reset enumeration" message for filter plugins
sim_message_eventcallback_imagefilter_enumerate
"enumerate" message for filter plugins
replyData[0]=header ID
replyData[1]=filterID. A positive ID (including 0) represents a filter whose parameters can be edited. A filter with a negative ID cannot be edited.
Return the filter's name as the callback return value (allocate the buffer with the simCreateBuffer function)
sim_message_eventcallback_imagefilter_adjustparams (called from the UI thread)
"edit filter parameters" message for filter plugins
auxiliaryData[0]=header ID
auxiliaryData[1]=filter ID
auxiliaryData[2]=size in bytes of the filter parameter buffer to be edited
customData=filter parameter buffer. Can be NULL (is NULL when filter parameters were never edited)
replyData[0]=size in bytes of the edited filter parameter buffer returned as the callback return buffer. That buffer has to be allocated with the simCreateBuffer command and is automatically released by V-REP upon callback return.
sim_message_eventcallback_imagefilter_process (called from the UI thread)
"do image processing" message for filter plugins
auxiliaryData[0]=header ID
auxiliaryData[1]=filter ID
auxiliaryData[2]=resolution X
auxiliaryData[3]=resolution Y
auxiliaryData[4]=vision sensor handle (available from V-REP 3.1.0 only)
customData[0]=input image (size: x*y*3 floats)
customData[1]=input depth image (size: x*y floats)
customData[2]=work image (size: x*y*3 floats)
customData[3]=buffer image 1 (size: x*y*3 floats)
customData[4]=buffer image 2 (size: x*y*3 floats)
customData[5]=output image (size: x*y*3 floats)
customData[6]=filter parameter buffer (size: custom), can be NULL (is NULL when filter parameters were never edited)
replyData[0]=1 if the sensor should trigger a detection, 0 otherwise
replyData[1]=number of float values returned, representing auxiliary information (that can be retrieved with simHandleVisionSensor). The auxiliary information can represent a vector, a direction, any result from an image processing algorithm. Allocate the return float buffer with simCreateBuffer
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
sim_message_eventcallback_scripticondblclick (called from the UI thread)
a script icon in the hierarchy view was double-clicked
auxiliaryData[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_keypress (called from the UI thread)
auxiliaryData[0]=key, auxiliaryData[1]=ctrl and shift key state
sim_message_eventcallback_bannerclicked (called from the UI thread)
called when a banner was clicked (auxiliaryData[0]=banner ID)
sim_message_eventcallback_refreshdialogs (called from the UI thread)
called just before disloags are refreshed in V-REP.
auxiliaryData[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_guipass (called from the UI thread)
Called on a regular basis from the GUI thread.
sim_message_eventcallback_mainscriptabouttobecalled
Called just before the main script is called. If a plugin intercepts this message and writes a value different from -1 into replyData[0], the main script will not be called.
sim_message_eventcallback_rmlpos
the command simRMLPos was called. The appropriate plugin should handle the call
sim_message_eventcallback_rmlvel
the command simRMLVel was called. The appropriate plugin should handle the call
sim_message_eventcallback_rmlstep
the command simRMLStep was called. The appropriate plugin should handle the call
sim_message_eventcallback_rmlremove
the command simRMLRemove was called. The appropriate plugin should handle the call
sim_message_eventcallback_pathplanningplugin
a path planning function was called. The appropriate plugin (i.e. 'PathPlanning') should handle the call
sim_message_eventcallback_colladaplugin
a collada plugin function was called. The appropriate plugin (i.e. 'Collada') should handle the call
the user can perform openGl calls from the plugin, in order to draw custom graphics into the V-REP scene. This has a different functionality from the simAddDrawingObject API function. Following data is sent to the plugins:
auxiliaryData[0]=index of the program location where the call occured (e.g. 0=before first V-REP rendering, 5=after last V-REP rendering). Refer to the source code for details.
auxiliaryData[2]=handle of the camera
auxiliaryData[3]=index of the view, or -1 if view is unassociated
a callback with the full rendered opengl frame data (that can be modified, then returned):
customData (unsigned char*): RGB data of the image.
auxiliaryData[0]=picture size X
auxiliaryData[1]=picture size Y
auxiliaryData[2]=0
auxiliaryData[3]=0. If you want V-REP to take into account any modification on the buffer, write 1 in here.
a callback with the rendered opengl camera view (that can be modified, then returned):
customData (unsigned char*): RGB data of the image.
auxiliaryData[0]=picture size X
auxiliaryData[1]=picture size Y
auxiliaryData[2]=view index
auxiliaryData[3]=0. If you want V-REP to take into account any modification on the buffer, write 1 in here.
sim_message_eventcallback_proxsensorselectdown
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_eventcallback_pickselectdown hereafter. Enable with sim_intparam_prox_sensor_select_down.
auxiliaryData[0]=objectID
customData[0]-customData[2]=coordinates of clicked point
customData[3]-customData[5]=normal vector of clicked surface
sim_message_eventcallback_proxsensorselectup
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.
auxiliaryData[0]=objectID
customData[0]-customData[2]=coordinates of clicked point
customData[3]-customData[5]=normal vector of clicked surface
sim_message_eventcallback_pickselectdown (called from the UI thread)
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_eventcallback_proxsensorselectdown here above.
auxiliaryData[0]=objectID or base object ID (if part of a model and select model base instead is checked)
|