Remote API Functions (C/C++)
simxAddStatusbarMessage
|
Description | Adds a message to the status bar. |
C synopsis | simxInt simxAddStatusbarMessage(simxInt clientID,const simxChar* message,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
message: the message to display
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Appends a string to a string signal. If that signal is not yet present, it is added. See also simxSetStringSignal. |
C synopsis | simxInt simxAppendStringSignal(simxInt clientID,const simxChar* signalName,const simxChar* signalValueToAppend,simxInt signalLength,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValueToAppend: value to append to the signal. That value may contain any value, including embedded zeros.
signalLength: size of the signalValueToAppend string.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Closes an auxiliary console window. See also simxAuxiliaryConsoleOpen. |
C synopsis | simxInt simxAuxiliaryConsoleClose(simxInt clientID,simxInt consoleHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
consoleHandle: the handle of the console window, previously returned by the simxAuxiliaryConsoleOpen command
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Opens an auxiliary console window for text display. This console window is different from the application main console window. Console window handles are shared across all simulator scenes. See also simxAuxiliaryConsolePrint, simxAuxiliaryConsoleShow and simxAuxiliaryConsoleClose. |
C synopsis | simxInt simxAuxiliaryConsoleOpen(simxInt clientID,const simxChar* title,simxInt maxLines,simxInt mode,simxInt* position,simxInt* size,simxFloat* textColor,simxFloat* backgroundColor,simxInt* consoleHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
title: the title of the console window
maxLines: the number of text lines that can be displayed and buffered
mode: bit-coded value. Bit0 set indicates that the console window will automatically close at simulation end, bit1 set indicates that lines will be wrapped, bit2 set indicates that the user can close the console window, bit3 set indicates that the console will automatically be hidden during simulation pause, bit4 set indicates that the console will not automatically hide when the user switches to another scene.
position: the initial position of the console window (x and y value). Can be NULL
size: the initial size of the console window (x and y value). Can be NULL
textColor: the color of the text (rgb values, 0-1). Can be NULL
backgroundColor: the background color of the console window (rgb values, 0-1). Can be NULL
consoleHandle: pointer to a location receiving the handle of the created console
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Prints to an auxiliary console window. See also simxAuxiliaryConsoleOpen. |
C synopsis | simxInt simxAuxiliaryConsolePrint(simxInt clientID,simxInt consoleHandle,const simxChar* txt,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
consoleHandle: the handle of the console window, previously returned by the simxAuxiliaryConsoleOpen command
txt: the text to append, or NULL to clear the console window
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Shows or hides an auxiliary console window. See also simxAuxiliaryConsoleOpen and simxAuxiliaryConsoleClose. |
C synopsis | simxInt simxAuxiliaryConsoleShow(simxInt clientID,simxInt consoleHandle,simxChar showState,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
consoleHandle: the handle of the console window, previously returned by the simxAuxiliaryConsoleOpen command
showState: indicates whether the console should be hidden (0) or shown (!=0)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Allows breaking a force sensor during simulation. A broken force sensor will lose its positional and orientational constraints. See also simxReadForceSensor. |
C synopsis | simxInt simxBreakForceSensor(simxInt clientID,simxInt forceSensorHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
forceSensorHandle: handle of the force sensor
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Clears a float signal (removes it). See also simxSetFloatSignal, simxClearIntegerSignal and simxClearStringSignal. |
C synopsis | simxInt simxClearFloatSignal(simxInt clientID,const simxChar* signalName,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal or an empty string to clear all float signals
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Clears an integer signal (removes it). See also simxSetIntegerSignal, simxClearFloatSignal and simxClearStringSignal. |
C synopsis | simxInt simxClearIntegerSignal(simxInt clientID,const simxChar* signalName,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal or an empty string to clear all integer signals
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Clears a string signal (removes it). See also simxSetStringSignal, simxClearIntegerSignal and simxClearFloatSignal. |
C synopsis | simxInt simxClearStringSignal(simxInt clientID,const simxChar* signalName,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal or an empty string to clear all string signals
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Closes current scene, and switches to another open scene. If there is no other open scene, a new scene is then created. Should only be called when simulation is not running and is only executed by continuous remote API server services. See also simxLoadScene. |
C synopsis | simxInt simxCloseScene(simxInt clientID,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Copies and pastes objects, together with all their associated calculation objects and child scripts. To copy and paste whole models, you can simply copy and paste the model base object. |
C synopsis | simxInt simxCopyPasteObjects(simxInt clientID,const simxInt* objectHandles,simxInt objectCount,simxInt** newObjectHandles,simxInt* newObjectCount,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandles: an array containing the handles of the objects to copy
objectCount: the number of handles the above array contains
newObjectHandles: a pointer to a value receiving an array of handles of newly created objects. Individual objects of a new model are not returned, but only the model base. The array remains valid until next remote API function is called.
newObjectCount: a pointer to a value receiving the number of handles the above array contains
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Creates a buffer. The buffer needs to be released with simxReleaseBuffer except otherwise explicitly specified. This is a remote API helper function. |
C synopsis | simxChar* simxCreateBuffer(simxInt bufferSize) |
C parameters |
bufferSize: size of the buffer in bytes
|
C return value | |
Other languages | Python, Matlab |
Description | Creates a dummy in the scene. |
C synopsis | simxInt simxCreateDummy(simxInt clientID,simxFloat size,const simxChar* colors,simxInt* dummyHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
size: the size of the dummy.
colors: 4*3 bytes (0-255) for (ambient/diffuse/specular/emissive)*(rgb). Can be NULL for default colors.
dummyHandle: pointer to a value that will receive the dummy handle.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Displays a generic dialog box during simulation (and only during simulation!). Use in conjunction with simxGetDialogResult, simxGetDialogInput and simxEndDialog.Use custom user interfaces instead if a higher customization level is required. |
C synopsis | simxInt simxDisplayDialog(simxInt clientID,const simxChar* titleText,const simxChar* mainText,simxInt dialogType,const simxChar* initialText,simxFloat* titleColors,simxFloat* dialogColors,simxInt* dialogHandle,simxInt* uiHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
titleText: Title bar text
mainText: Information text
dialogType: a generic dialog style
initialText: Initial text in the edit box if the dialog is of type sim_dlgstyle_input. Cannot be NULL!
titleColors: Title bar color (6 simxFloat values for RGB for background and foreground), can be NULL for default colors
dialogColors: Dialog color (6 simxFloat values for RGB for background and foreground), can be NULL for default colors
dialogHandle: handle of the generic dialog (different from custom user interface handle!! (see hereafter)). This handle should be used with the following functions: simxGetDialogResult, simxGetDialogInput and simxEndDialog.
uiHandle: a pointer to a value accepting the handle of the corresponding custom user interface. Can be NULL
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Closes and releases resource from a previous call to simxDisplayDialog. Even if the dialog is not visible anymore, you should release resources by using this function (however at the end of a simulation, all dialog resources are automatically released). |
C synopsis | simxInt simxEndDialog(simxInt clientID,simxInt dialogHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
dialogHandle: handle of generic dialog (return value of simxDisplayDialog)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Erases a file on the server side. This function is used by several other functions internally (e.g. simxLoadModel). See also simxTransferFile. This is a remote API helper function. |
C synopsis | simxInt simxEraseFile(simxInt clientID,const simxChar* fileName_serverSide,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
fileName_serverSide: the file to erase on the server side. For now, do not specify a path (the file will be erased in the remote API plugin directory)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Ends the communication thread. This should be the very last remote API function called on the client side. simxFinish should only be called after a successfull call to simxStart. This is a remote API helper function. |
C synopsis | simxVoid simxFinish(simxInt clientID) |
C parameters |
clientID: the client ID. refer to simxStart.
|
C return value |
none
|
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the value of a string signal, then clears it. Useful to retrieve continuous data from the server. See also simxGetStringSignal. |
C synopsis | simxInt simxGetAndClearStringSignal(simxInt clientID,const simxChar* signalName,simxChar** signalValue,simxInt* signalLength,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: pointer to a pointer receiving the value of the signal. The signal value will remain valid until next remote API call
signalLength: pointer to a location receiving the value of the signal length, since it may contain any data (also embedded zeros).
operationMode: a remote API function operation mode. Since this function will clear a read signal, and we cannot afford to wait for a reply (well, we could, but that would mean a blocking operation), the function operates in a special mode and should be used as in following example:
// Initialization phase: simxChar* signal; simxInt sLength; simxGetAndClearStringSignal(cid,"sig",&signal,&sLength,simx_opmode_streaming); // while we are connected: while (simxGetConnectionId(cid)!=-1) { if (simxGetAndClearStringSignal(cid,"sig",&signal,&sLength,simx_opmode_buffer)== simx_error_noerror) { // A signal was retrieved! // Enable streaming again (was automatically disabled with the positive event): simxGetAndClearStringSignal(cid,"sig",&signal,&sLength,simx_opmode_streaming); } .. } |
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves 3 values from an array. See the array parameter identifiers. See also simxSetArrayParameter, simxGetBooleanParameter, simxGetIntegerParameter, simxGetFloatingParameter and simxGetStringParameter. |
C synopsis | simxInt simxGetArrayParameter(simxInt clientID,simxInt paramIdentifier,simxFloat* paramValues,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: an array parameter identifier
paramValues: a pointer to 3 values that will receive the parameters
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait (if not called on a regular basis)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a boolean value. See the Boolean parameter identifiers. See also simxSetBooleanParameter, simxGetIntegerParameter, simxGetFloatingParameter, simxGetArrayParameter and simxGetStringParameter. |
C synopsis | simxInt simxGetBooleanParameter(simxInt clientID,simxInt paramIdentifier,simxChar* paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: a Boolean parameter identifier
paramValue: a pointer that will receive the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait (if not called on a regular basis)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a collision object handle based on its name. If the client application is launched from a child script, then you could also let the child script figure out what handle correspond to what collision object, and send the handles as additional arguments to the client application during its launch. See also simxGetObjectGroupData. |
C synopsis | simxInt simxGetCollisionHandle(simxInt clientID,const simxChar* collisionObjectName,simxInt* handle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
collisionObjectName: name of the collision object. If possibe, don't rely on the automatic name adjustment mechanism, and always specify the full collision object name, including the #: if the collision object is "myCollision", specify "myCollision#", if the collision object is "myCollision#0", specify "myCollision#0", etc.
handle: pointer to a value that will receive the handle
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Returns the ID of the current connection. Use this function to track the connection state to the server. See also simxStart. This is a remote API helper function. |
C synopsis | simxInt simxGetConnectionId(simxInt clientID) |
C parameters |
clientID: the client ID. refer to simxStart.
|
C return value |
a connection ID, or -1 if the client is not connected to the server. Different connection IDs indicate temporary disconections in-between.
|
Other languages | Python, Java, Matlab, Urbi |
Description | Queries the text the user entered into a generic dialog box of style sim_dlgstyle_input. To be used after simxDisplayDialog was called and after simxGetDialogResult returned sim_dlgret_ok. |
C synopsis | simxInt simxGetDialogInput(simxInt clientID,simxInt dialogHandle,simxChar** inputText,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
dialogHandle: handle of generic dialog (return value of simxDisplayDialog)
inputText: pointer to a pointer receiving the string the user entered. The pointer is valid until another remote API function is called.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Queries the result of a dialog box. To be used after simxDisplayDialog was called. |
C synopsis | simxInt simxGetDialogResult(simxInt clientID,simxInt dialogHandle,simxInt* result,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
dialogHandle: handle of generic dialog (return value of simxDisplayDialog)
result: pointer receiving the result value.
Note. If the return value is sim_dlgret_still_open, the dialog was not closed and no button was pressed. Otherwise, you should free resources with simxEndDialog (the dialog might not be visible anymore, but is still present)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a distance object handle based on its name. If the client application is launched from a child script, then you could also let the child script figure out what handle correspond to what distance object, and send the handles as additional arguments to the client application during its launch. See also simxGetObjectGroupData. |
C synopsis | simxInt simxGetDistanceHandle(simxInt clientID,const simxChar* distanceObjectName,simxInt* handle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
distanceObjectName: name of the distance object. If possibe, don't rely on the automatic name adjustment mechanism, and always specify the full distance object name, including the #: if the distance object is "myDistance", specify "myDistance#", if the distance object is "myDistance#0", specify "myDistance#0", etc.
handle: pointer to a value that will receive the handle
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a floating point value. See the floating-point parameter identifiers. See also simxSetFloatingParameter, simxGetBooleanParameter, simxGetIntegerParameter, simxGetArrayParameter and simxGetStringParameter. |
C synopsis | simxInt simxGetFloatingParameter(simxInt clientID,simxInt paramIdentifier,simxFloat* paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: a floating parameter identifier
paramValue: a pointer that will receive the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait (if not called on a regular basis)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the value of a float signal. Signals are cleared at simulation start. See also simxSetFloatSignal, simxClearFloatSignal, simxGetIntegerSignal and simxGetStringSignal. |
C synopsis | simxInt simxGetFloatSignal(simxInt clientID,const simxChar* signalName,simxFloat* signalValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: pointer to a location receiving the value of the signal
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves information about the last received message from the server. This is a remote API helper function. See also simxGetOutMessageInfo. |
C synopsis | simxInt simxGetInMessageInfo(simxInt clientID,simxInt infoType,simxInt* info) |
C parameters |
clientID: the client ID. refer to simxStart.
infoType: an inbox message info type
info: pointer to a simxInt value receiving the requested information
|
C return value |
-1 in case of an error
|
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves an integer value. See the integer parameter identifiers. See also simxSetIntegerParameter, simxGetBooleanParameter, simxGetFloatingParameter, simxGetArrayParameter and simxGetStringParameter. |
C synopsis | simxInt simxGetIntegerParameter(simxInt clientID,simxInt paramIdentifier,simxInt* paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: an integer parameter identifier
paramValue: a pointer that will receive the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait (if not called on a regular basis)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the value of an integer signal. Signals are cleared at simulation start. See also simxSetIntegerSignal, simxClearIntegerSignal, simxGetFloatSignal and simxGetStringSignal. |
C synopsis | simxInt simxGetIntegerSignal(simxInt clientID,const simxChar* signalName,simxInt* signalValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: pointer to a location receiving the value of the signal
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the intrinsic transformation matrix of a joint (the transformation caused by the joint movement). See also simxSetSphericalJointMatrix. |
C synopsis | simxInt simxGetJointMatrix(simxInt clientID,simxInt jointHandle,simxFloat* matrix,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
matrix: pointer to 12 simxFloat values. See the regular API equivalent function for details
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the intrinsic position of a joint. This function cannot be used with spherical joints (use simxGetJointMatrix instead). See also simxSetJointPosition and simxGetObjectGroupData. |
C synopsis | simxInt simxGetJointPosition(simxInt clientID,simxInt jointHandle,simxFloat* position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
position: intrinsic position of the joint. This is a one-dimensional value: if the joint is revolute, the rotation angle is returned, if the joint is prismatic, the translation amount is returned, etc.
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the simulation time of the last fetched command (i.e. when the last fetched command was processed on the server side). The function can be used to verify how "fresh" a command reply is, or whether a command reply was recently updated. For example:
if (simxGetVisionSensorImage(cid,handle,res,&img,0,sim_opmode_buffer)==simx_error_noerror) imageAcquisitionTime=simxGetLastCmdTime(cid); This is a remote API helper function. |
C synopsis | simxInt simxGetLastCmdTime(simxInt clientID) |
C parameters |
clientID: the client ID. refer to simxStart.
|
C return value |
The simulation time in milliseconds when the command reply was generated, or 0 if simulation was not running.
|
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the last 50 errors that occured on the server side, and clears the error buffer there. Only errors that occured because of this client will be reported. |
C synopsis | simxInt simxGetLastErrors(simxInt clientID,simxInt* errorCnt,simxChar** errorStrings,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
errorCnt: pointer receiving the number of error strings returned
errorStrings: pointer to a string pointer receiving the address of an error string (individual strings are separated by a zero character). The address is valid until next remote API function is called
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls) when not debugging. For debugging purposes, use simx_opmode_oneshot_wait.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the properties of a model. See also simxSetModelProperty. |
C synopsis | simxInt simxGetModelProperty(simxInt clientID,simxInt objectHandle,simxInt* prop,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
prop: pointer to a location receiving the model property value
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls), or simx_opmode_oneshot_wait (depending on the intended usage)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the handle of an object's child object. See also simxGetObjectParent. |
C synopsis | simxInt simxGetObjectChild(simxInt clientID,simxInt parentObjectHandle,simxInt childIndex,simxInt* childObjectHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
parentObjectHandle: handle of the object
childIndex: zero-based index of the child's position. To retrieve all children of an object, call the function by increasing the index until the child handle is -1
childObjectHandle: pointer to a value receiving the handle of the child object. If the value is -1, there is no child at the given index
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a floating-point parameter of a object. See also simxSetObjectFloatParameter and simxGetObjectIntParameter. |
C synopsis | simxInt simxGetObjectFloatParameter(simxInt clientID,simxInt objectHandle,simxInt parameterID,simxFloat* parameterValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
parameterID: identifier of the parameter to retrieve. See the list of all possible object parameter identifiers
parameterValue: pointer to a location that will receive the value of the parameter
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls), or simx_opmode_oneshot_wait (depending on the intended usage)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Simultaneously retrieves data of various objects in a V-REP scene. |
C synopsis | simxInt simxGetObjectGroupData(simxInt clientID,simxInt objectType,simxInt dataType,simxInt* handlesCount,simxInt** handles,simxInt* intDataCount,simxInt** intData,simxInt* floatDataCount,simxFloat** floatData,simxInt* stringDataCount,simxChar** stringData,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectType: a scene object type, or sim_appobj_object_type for all scene objects.
dataType: the type of data that is desired:
0: retrieves the object names (in stringData.)
1: retrieves the object types (in intData)
2: retrieves the parent object handles (in intData)
3: retrieves the absolute object positions (in floatData. There are 3 values for each object (x,y,z))
4: retrieves the local object positions (in floatData. There are 3 values for each object (x,y,z))
5: retrieves the absolute object orientations as Euler angles (in floatData. There are 3 values for each object (alpha,beta,gamma))
6: retrieves the local object orientations as Euler angles (in floatData. There are 3 values for each object (alpha,beta,gamma))
7: retrieves the absolute object orientations as quaternions (in floatData. There are 4 values for each object (qx,qy,qz,qw))
8: retrieves the local object orientations as quaternions (in floatData. There are 4 values for each object (qx,qy,qz,qw))
9: retrieves the absolute object positions and orientations (as Euler angles) (in floatData. There are 6 values for each object (x,y,z,alpha,beta,gamma))
10: retrieves the local object positions and orientations (as Euler angles) (in floatData. There are 6 values for each object (x,y,z,alpha,beta,gamma))
11: retrieves the absolute object positions and orientations (as quaternions) (in floatData. There are 7 values for each object (x,y,z,qx,qy,qz,qw))
12: retrieves the local object positions and orientations (as quaternions) (in floatData. There are 7 values for each object (x,y,z,qx,qy,qz,qw))
13: retrieves proximity sensor data (in intData (2 values): detection state, detected object handle. In floatData (6 values): detected point (x,y,z) and detected surface normal (nx,ny,nz))
14: retrieves force sensor data (in intData (1 values): force sensor state. In floatData (6 values): force (fx,fy,fz) and torque (tx,ty,tz))
15: retrieves joint data (in floatData (2 values): position, force/torque)
handlesCount (output): the number of returned object handles. Can be NULL.
handles (output): the object handles. The pointer remains valid until the next remote API call. Can be NULL.
intDataCount (output): the number of returned integer values. Can be NULL.
intData (output): the integer values. The pointer remains valid until the next remote API call. Can be NULL.
floatDataCount (output): the number of returned float values. Can be NULL.
floatData (output): the float values. The pointer remains valid until the next remote API call. Can be NULL.
stringDataCount (output): the number of returned strings. Can be NULL.
stringData (output): the strings. Each string is separated by the zero char ('\0'). The pointer remains valid until the next remote API call. Can be NULL.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait or simx_opmode_streaming.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves an object handle based on its name. If the client application is launched from a child script, then you could also let the child script figure out what handle correspond to what objects, and send the handles as additional arguments to the client application during its launch. See also simxGetObjectGroupData. |
C synopsis | simxInt simxGetObjectHandle(simxInt clientID,const simxChar* objectName,simxInt* handle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectName: name of the object. If possibe, don't rely on the automatic name adjustment mechanism, and always specify the full object name, including the #: if the object is "myJoint", specify "myJoint#", if the object is "myJoint#0", specify "myJoint#0", etc.
handle: pointer to a value that will receive the handle
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves an integer parameter of a object. See also simxSetObjectIntParameter and simxGetObjectFloatParameter. |
C synopsis | simxInt simxGetObjectIntParameter(simxInt clientID,simxInt objectHandle,simxInt parameterID,simxInt* parameterValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
parameterID: identifier of the parameter to retrieve. See the list of all possible object parameter identifiers
parameterValue: pointer to a location that will receive the value of the parameter
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls), or simx_opmode_oneshot_wait (depending on the intended usage)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the orientation (Euler angles) of an object. See also simxSetObjectOrientation, simxGetObjectPosition and simxGetObjectGroupData. |
C synopsis | simxInt simxGetObjectOrientation(simxInt clientID,simxInt objectHandle,simxInt relativeToObjectHandle,simxFloat* eulerAngles,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame we want the orientation. Specify -1 to retrieve the absolute orientation, sim_handle_parent to retrieve the orientation relative to the object's parent, or an object handle relative to whose reference frame you want the orientation
eulerAngles: pointer to 3 values receiving the Euler angles (alpha, beta and gamma)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the handle of an object's parent object. See also simxGetObjectChild and simxGetObjectGroupData. |
C synopsis | simxInt simxGetObjectParent(simxInt clientID,simxInt objectHandle,simxInt* parentObjectHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
parentObjectHandle: pointer to a value receiving the handle of the parent object. If the value is -1, the object has no parent
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the position of an object. See also simxSetObjectPosition, simxGetObjectOrientation and simxGetObjectGroupData. |
C synopsis | simxInt simxGetObjectPosition(simxInt clientID,simxInt objectHandle,simxInt relativeToObjectHandle,simxFloat* position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame we want the position. Specify -1 to retrieve the absolute position, sim_handle_parent to retrieve the position relative to the object's parent, or an object handle relative to whose reference frame you want the position
position: pointer to 3 values receiving the position
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves object handles of a given type, or of all types (i.e. all object handles). See also simxGetObjectGroupData. |
C synopsis | simxInt simxGetObjects(simxInt clientID,simxInt objectType,simxInt* objectCount,simxInt** objectHandles,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectType: object type (sim_object_shape_type, sim_object_joint_type, etc., or sim_handle_all for any type of object
objectCount: pointer to a value that will receive the number of retrieved handles
objectHandles: pointer to a pointer that will receive an object handle array. The array remains valid until next remote API function is called.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves all selected object's handles. See also simxSetObjectSelection. |
C synopsis | simxInt simxGetObjectSelection(simxInt clientID,simxInt** objectHandles,simxInt* objectCount,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandles: pointer to a pointer that will receive an object handle array. The array remains valid until next remote API function is called.
objectCount: pointer to a value that will receive the number of elements in above's array.
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls), or simx_opmode_oneshot_wait depending on the intent.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves information about the next message to send to the server. This is a remote API helper function. See also simxGetInMessageInfo. |
C synopsis | simxInt simxGetOutMessageInfo(simxInt clientID,simxInt infoType,simxInt* info) |
C parameters |
clientID: the client ID. refer to simxStart.
infoType: an outbox message info type
info: pointer to a simxInt value receiving the requested information
|
C return value |
-1 in case of an error
|
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the time needed for a command to be sent to the server, executed, and sent back. That time depends on various factors like the client settings, the network load, whether a simulation is running, whether the simulation is real-time, the simulation time step, etc. The function is blocking. This is a remote API helper function. |
C synopsis | simxInt simxGetPingTime(simxInt clientID,simxInt* pingTime) |
C parameters |
clientID: the client ID. refer to simxStart.
pingTime: a pointer to a simxInt value accepting the ping time in milliseconds.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves a string value. See the string parameter identifiers. See also simxGetBooleanParameter, simxGetIntegerParameter, simxGetArrayParameter and simxGetFloatingParameter. |
C synopsis | simxInt simxGetStringParameter(simxInt clientID,simxInt paramIdentifier,simxChar** paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: a string parameter identifier
paramValue: a pointer to a pointer that will receive the string. The string pointer is valid until next remote API function is called.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait (if not called on a regular basis)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the value of a string signal. Signals are cleared at simulation start. See also simxSetStringSignal, simxGetAndClearStringSignal, simxClearStringSignal, simxGetIntegerSignal and simxGetFloatSignal. |
C synopsis | simxInt simxGetStringSignal(simxInt clientID,const simxChar* signalName,simxChar** signalValue,simxInt* signalLength,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: pointer to a pointer receiving the value of the signal. The signal value will remain valid until next remote API call
signalLength: pointer to a location receiving the value of the signal length, since it may contain any data (also embedded zeros).
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the properties of a custom user interface button. See also simxSetUIButtonProperty. |
C synopsis | simxInt simxGetUIButtonProperty(simxInt clientID,simxInt uiHandle,simxInt uiButtonID,simxInt* prop,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiButtonID: handle (or id) of the custom user interface button
prop: pointer to an integer accepting a button property value.
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the button handle (i.e. ID) and some auxiliary values of the last occurred event in that custom user interface. The function will then clear the event. When a custom user interface button is pressed, a slider is moved or an edit box is changed, an event is registered and stored in the custom user interface. |
C synopsis | simxInt simxGetUIEventButton(simxInt clientID,simxInt uiHandle,simxInt* uiEventButtonID,simxInt* auxValues,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiEventButtonID: id of the UI button where an event occured, or -1 if no event occured
auxValues: 2 values (can be NULL).
value1: the button property
value2: for sliders: slider state (0-1000), for stay down buttons: down state (0 or 1), for up/down event buttons: up/down events (0 or 1)
operationMode: a remote API function operation mode. Since this function will clear a read event, and we cannot afford to wait for a reply (well, we could, but that would mean a blocking operation), the function operates in a special mode and should be used as in following example:
// Initialization phase: int uiHandle=-1; simxGetUIHandle(cid,"UI",&UiHandle,simx_opmode_oneshot_wait); int buttonEventID=-1; simxGetUIEventButton(cid,uiHandle,&buttonEventID,NULL,simx_opmode_streaming); // while we are connected: while (simxGetConnectionId(cid)!=-1) { if ((simxGetUIEventButton(cid,uiHandle,&buttonEventID,NULL,simx_opmode_buffer)== simx_error_noerror)&&(buttonEventID!=-1) ) { // A button was pressed/edited/changed. React to it here! // Enable streaming again (was automatically disabled with the positive event): simxGetUIEventButton(cid,uiHandle,&buttonEventID,NULL,simx_opmode_streaming); } .. } |
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the handle of a custom user interface. If the client application is launched from a child script, then you could also let the child script figure out what handle correspond to what UIs, and send the handles as additional arguments to the client application during its launch. See also simxGetObjectGroupData. |
C synopsis | simxInt simxGetUIHandle(simxInt clientID,const simxChar* uiName,simxInt* handle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiName: name of the UI. If possibe, don't rely on the automatic name adjustment mechanism, and always specify the full object name, including the #: if the UI is "myUI", specify "myUI#", if the UI is "myUI#0", specify "myUI#0", etc.
handle: pointer to a value that will receive the handle
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Gets the slider position of a custom user interface button (must be slider-type button). See also simxSetUISlider. |
C synopsis | simxInt simxGetUISlider(simxInt clientID,simxInt uiHandle,simxInt uiButtonID,simxInt* position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiButtonID: handle of a button inside the specified custom user interface
position: pointer to an integer receiving the slider position (value between 0 and 1000)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the depth buffer of a vision sensor. The returned data doesn't make sense if simHandleVisionSensor wasn't called previously (simHandleVisionSensor is called by default in the main script if the vision sensor is not tagged as explicit handling). Use the simxGetLastCmdTime function to verify the "freshness" of the retrieved data. See also simxGetVisionSensorImage. |
C synopsis | simxInt simxGetVisionSensorDepthBuffer(simxInt clientID,simxInt sensorHandle,simxInt* resolution,simxFloat** buffer,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
sensorHandle: handle of the vision sensor
resolution: pointer to 2 simxInt values receiving the resolution of the image
buffer: pointer to a pointer to the depth buffer data. The data remains valid until next remote API function is called (i.e. the data is automatically released). Values are in the range of 0-1 (0=closest to sensor, 1=farthest from sensor).
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming_split+4000 (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the image of a vision sensor. The returned data doesn't make sense if simHandleVisionSensor wasn't called previously (simHandleVisionSensor is called by default in the main script if the vision sensor is not tagged as explicit handling). Use the simxGetLastCmdTime function to verify the "freshness" of the retrieved data. See also simxSetVisionSensorImage, simxGetVisionSensorDepthBuffer and simxReadVisionSensor. |
C synopsis | simxInt simxGetVisionSensorImage(simxInt clientID,simxInt sensorHandle,simxInt* resolution,simxChar** image,simxChar options,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
sensorHandle: handle of the vision sensor
resolution: pointer to 2 simxInt values receiving the resolution of the image
image: pointer to a pointer to the image data. The data remains valid until next remote API function is called (i.e. the data is automatically released)
options: image options, bit-coded:
bit0 set: each image pixel is a byte (greyscale image), otherwise each image pixel is a rgb byte-triplet
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming_split+4000 (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Retrieves the force or torque a joint exerts along/about its active axis. This function retrieves meaningful information only if the joint is prismatic or revolute, and is dynamically enabled. With the Bullet engine, this function returns the force or torque the joint motor exerts (forces/torques from joint limits are not taken into account). With the ODE engine, this function returns the total force or torque a joint exerts along/about its z-axis. See also simxSetJointForce, simxReadForceSensor and simxGetObjectGroupData. |
C synopsis | simxInt simxJointGetForce(simxInt clientID,simxInt jointHandle,simxFloat* force,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
force: the force or the torque the joint exerts along/about its z-axis
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Loads a previously saved model. See also simxLoadUI, simxLoadScene and simxTransferFile. |
C synopsis | simxInt simxLoadModel(simxInt clientID,const simxChar* modelPathAndName,simxChar options,simxInt* baseHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
modelPathAndName: the model filename, including the path and extension ("ttm"). The file is relative to the client or server system depending on the options value (see next argument)
options: options, bit-coded:
bit0 set: the specified file is located on the client side (in that case the function will be blocking since the model first has to be transferred to the server). Otherwise it is located on the server side
baseHandle: the loaded model base. Can be NULL.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Loads a previously saved scene. Should only be called when simulation is not running and is only executed by continuous remote API server services. See also simxCloseScene, simxLoadModel, simxLoadUI and simxTransferFile. |
C synopsis | simxInt simxLoadScene(simxInt clientID,const simxChar* scenePathAndName,simxChar options,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
scenePathAndName: the scene filename, including the path and extension ("ttt"). The file is relative to the client or server system depending on the options value (see next argument)
options: options, bit-coded:
bit0 set: the specified file is located on the client side (in that case the function will be blocking since the scene first has to be transferred to the server). Otherwise it is located on the server side
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Loads previously saved custom user interfaces. See also simxLoadModel, simxLoadScene and simxTransferFile. |
C synopsis | simxInt simxLoadUI(simxInt clientID,const simxChar* uiPathAndName,simxChar options,simxInt* count,simxInt** uiHandles,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiPathAndName: the ui filename, including the path and extension ("ttb"). The file is relative to the client or server system depending on the options value (see next argument)
options: options, bit-coded:
bit0 set: the specified file is located on the client side (in that case the function will be blocking since the UI file first has to be transferred to the server). Otherwise it is located on the server side
count: a pointer to a value receiving the number of loaded custom user interfaces (one UI file might contain several custom user interfaces).
uiHandles: a pointer to a pointer receiving the loaded UI handles. The user is in charge of releasing the buffer with simxReleaseBuffer(*uiHandles)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Allows to temporarily halt the communication thread from sending data. This can be useful if you need to send several values to V-REP that should be received and evaluated at the same time. This is a remote API helper function. |
C synopsis | simxInt simxPauseCommunication(simxInt clientID,simxChar pause) |
C parameters |
clientID: the client ID. refer to simxStart.
pause: whether the communication thread should pause or run normally.
Usage example:
simxPauseCommunication(clientID,1); simxSetJointPosition(clientID,joint1Handle,joint1Value,simx_opmode_oneshot); simxSetJointPosition(clientID,joint2Handle,joint2Value,simx_opmode_oneshot); simxSetJointPosition(clientID,joint3Handle,joint3Value,simx_opmode_oneshot); simxPauseCommunication(clientID,0); // Above's 3 joints will be received and set on the V-REP side at the same time |
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Requests a pause of a simulation. See also simxStartSimulation and simxStopSimulation. |
C synopsis | simxInt simxPauseSimulation(simxInt clientID,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
operationMode: a remote API function operation mode. Recommended operation modes for this function is simx_opmode_oneshot.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sends a query string to V-REP, and waits for a reply string. Query and reply strings can be accessed via string signals. This function allows for instance to have a child script, another remote API client or a ROS node handle special requests coming from this remote API client, then send a reply back.
Usage example where a child script handles a request:
// Following is the remote API client side: simxChar* replyData; simxInt replySize; if (simxQuery(clientID,"request","send me a 42",12,"reply",&replyData,&replySize,5000)==0) printf("The reply is: %s\n",replyData -- This is the child script side. The child script is non-threaded and -- following part executed at each simulation pass: req=simGetStringSignal("request") if (req) then simClearStringSignal("request") if (req=="send me a 42") then simSetStringSignal("reply","42\0") -- will be automatically cleared by the client end end |
C synopsis | simxInt simxQuery(simxInt clientID,const simxChar* signalName,const simxChar* signalValue,simxInt signalLength,const simxChar* retSignalName,simxChar** retSignalValue,simxInt* retSignalLength,simxInt timeOutInMs) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal that contains the request string
signalValue: pointer to the request string.
signalLength: the size of the request string, since it may contain any data (also embedded zeros).
retSignalName: name of the signal that contains the reply string
retSignalValue: pointer to a pointer receiving the value of the reply string. The string pointer will remain valid until next remote API call
retSignalLength: pointer to a location receiving the value of the reply string length, since it may contain any data (also embedded zeros).
timeOutInMs: the maximum time in milliseconds that the function will wait for a reply.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Reads the collision state of a registered collision object. This function doesn't perform collision detection, it merely reads the result from a previous call to simHandleCollision (simHandleCollision is called in the default main script). See also simxGetObjectGroupData. |
C synopsis | simxInt simxReadCollision(simxInt clientID,simxInt collisionObjectHandle,simxChar* collisionState,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
collisionObjectHandle: handle of the collision object
collisionState: a pointer to a value receiving the collision state (0: not colliding)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Reads the distance that a registered distance object measured. This function doesn't perform minimum distance calculation, it merely reads the result from a previous call to simHandleDistance (simHandleDistance is called in the default main script). See also simxGetObjectGroupData. |
C synopsis | simxInt simxReadDistance(simxInt clientID,simxInt distanceObjectHandle,simxFloat* minimumDistance,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
distanceObjectHandle: handle of the distance object
minimumDistance: a pointer to a value receiving the minimum distance
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Reads the force and torque applied to a force sensor (filtered values are read), and its current state ('unbroken' or 'broken'). See also simxBreakForceSensor, simxJointGetForce and simxGetObjectGroupData. |
C synopsis | simxInt simxReadForceSensor(simxInt clientID,simxInt forceSensorHandle,simxChar* state,simxFloat* forceVector,simxFloat* torqueVector,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
forceSensorHandle: handle of the force sensor
state: pointer to a byte value receiving the state of the force sensor. Can be NULL
bit 0 set: force and torque data is available, otherwise it is not (yet) available (e.g. when not enough values are present for the filter)
bit 1 set: force sensor is broken, otherwise it is still intact ('unbroken')
forceVector: pointer to 3 float values receiving the force vector. Can be NULL
torqueVector: pointer to 3 float values receiving the torque vector. Can be NULL
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Reads the state of a proximity sensor. This function doesn't perform detection, it merely reads the result from a previous call to simHandleProximitySensor (simHandleProximitySensor is called in the default main script). See also simxGetObjectGroupData. |
C synopsis | simxInt simxReadProximitySensor(simxInt clientID,simxInt sensorHandle,simxChar* detectionState,simxFloat* detectedPoint,simxInt* detectedObjectHandle,simxFloat* detectedSurfaceNormalVector,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
sensorHandle: handle of the proximity sensor
detectionState: pointer to a value receiving the detection state (0=no detection). Can be NULL.
detectedPoint: pointer to 3 values receiving the detected point coordinates (relative to the sensor reference frame). Can be NULL.
detectedObjectHandle: pointer to a value receiving the handle of the detected object. Can be NULL.
detectedSurfaceNormalVector: pointer to 3 values receiving the normal vector (normalized) of the detected surface. Relative to the sensor reference frame. Can be NULL
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Reads the state of a vision sensor. This function doesn't perform detection, it merely reads the result from a previous call to simHandleVisionSensor (simHandleVisionSensor is called in the default main script). See also simxGetVisionSensorImage and simxGetObjectGroupData. |
C synopsis | simxInt simxReadVisionSensor(simxInt clientID,simxInt sensorHandle,simxChar* detectionState,simxFloat** auxValues,simxInt** auxValuesCount,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
sensorHandle: handle of the vision sensor
detectionState: pointer to a byte that receives the detection state (i.e. the trigger state). Can be NULL
auxValues: auxiliary values returned from the applied filters. By default V-REP returns one packet of 15 auxiliary values:the minimum of {intensity, red, green, blue, depth value}, the maximum of {intensity, red, green, blue, depth value}, and the average of {intensity, red, green, blue, depth value}. If additional filter components return values, then they will be appended as packets to the first packet. AuxValues can be NULL if auxValuesCount is also NULL. The user is in charge of releasing the auxValues buffer with simxReleaseBuffer(*auxValues).
auxValuesCount: contains information about the number of auxiliary value packets and packet sizes returned in auxValues. The first value is the number of packets, the second is the size of packet1, the third is the size of packet2, etc. Can be NULL if auxValues is also NULL. The user is in charge of releasing the auxValuesCount buffer with simxReleaseBuffer(*auxValuesCount).
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_streaming (the first call) and simx_opmode_buffer (the following calls)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Releases a buffer previously created with simxCreateBuffer or a buffer returned by a remote API function. This is a remote API helper function. |
C synopsis | simxVoid simxReleaseBuffer(simxChar* buffer) |
C parameters |
buffer: buffer to be released
|
C return value | |
Other languages | Python, Matlab |
Description | Removes a scene object. |
C synopsis | simxInt simxRemoveObject(simxInt clientID,simxInt objectHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object to remove
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot (or simx_opmode_oneshot_wait)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Removes a custom user interface. |
C synopsis | simxInt simxRemoveUI(simxInt clientID,simxInt uiHandle,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot (or simx_opmode_oneshot_wait)
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Executes a call to the Reflexxes Motion Library type IV. The Reflexxes Motion Library type IV provides instantaneous trajectory generation capabilities for motion control systems. This function executes the position-based trajectory generation algorithm (RMLPosition). This function is often used with the remote API synchronous mode enabled. See also simxRMLVelocity. |
C synopsis | simxInt simxRMLPosition(simxInt clientID,simxInt dofs,simxDouble timeStep,simxInt flags,const simxDouble* currentPosVelAccel,const simxDouble* maxVelAccelJerk,const simxChar* selection,const simxDouble* targetPosVel,simxInt* rmlState,simxDouble* newPosVelAccel,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
dofs: the number of degrees of freedom
timeStep: the cycle time
flags: RML flags. -1 for default flags.
currentPosVelAccel: the current position, velocity and acceleration. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
maxVelAccelJerk: the maximum allowed velocity, acceleration and jerk. Arrange values as {vel1,vel2,..,velN,accel1,accel2,..,accelN,jerk1,jerk2,..,jerkN}
selection: the selection vector (one value for each DoF)
targetPosVel: the target position and velocity. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN}
newPosVelAccl: the new position, velocity and acceleration (output values). Values are arranged as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | TODO |
Description | Executes a call to the Reflexxes Motion Library type IV. The Reflexxes Motion Library type IV provides instantaneous trajectory generation capabilities for motion control systems. This function executes the velocity-based trajectory generation algorithm (RMLVelocity). This function is often used with the remote API synchronous mode enabled. See also simxRMLPosition. |
C synopsis | simxInt simxRMLVelocity(simxInt clientID,simxInt dofs,simxDouble timeStep,simxInt flags,const simxDouble* currentPosVelAccel,const simxDouble* maxAccelJerk,const simxChar* selection,const simxDouble* targetVel,simxInt* rmlState,simxDouble* newPosVelAccel,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
dofs: the number of degrees of freedom
timeStep: the cycle time
flags: RML flags. -1 for default flags.
currentPosVelAccel: the current position, velocity and acceleration. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
maxAccelJerk: the maximum allowed acceleration and jerk. Arrange values as {accel1,accel2,..,accelN,jerk1,jerk2,..,jerkN}
selection: the selection vector (one value for each DoF)
targetVel: the target velocity (one value for each DoF)
newPosVelAccl: the new position, velocity and acceleration (output values). Values are arranged as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | TODO |
Description | Sets 3 values of an array parameter. See also simxGetArrayParameter, simxSetBooleanParameter, simxSetIntegerParameter and simxSetFloatingParameter. |
C synopsis | simxInt simxSetArrayParameter(simxInt clientID,simxInt paramIdentifier,const simxFloat* paramValues,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: an array parameter identifier
paramValues: the array containing the 3 values to set
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets a boolean parameter. See also simxGetBooleanParameter, simxSetIntegerParameter, simxSetArrayParameter and simxSetFloatingParameter. |
C synopsis | simxInt simxSetBooleanParameter(simxInt clientID,simxInt paramIdentifier,simxChar paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: a Boolean parameter identifier
paramValue: the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets a floating point parameter. See also simxGetFloatingParameter, simxSetBooleanParameter, simxSetArrayParameter and simxSetIntegerParameter. |
C synopsis | simxInt simxSetFloatingParameter(simxInt clientID,simxInt paramIdentifier,simxFloat paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: a floating parameter identifier
paramValue: the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the value of a float signal. If that signal is not yet present, it is added. See also simxGetFloatSignal, simxClearFloatSignal, simxSetIntegerSignal and simxSetStringSignal. |
C synopsis | simxInt simxSetFloatSignal(simxInt clientID,const simxChar* signalName,simxFloat signalValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: value of the signal
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets an integer parameter. See also simxGetIntegerParameter, simxSetBooleanParameter, simxSetArrayParameter and simxSetFloatingParameter. |
C synopsis | simxInt simxSetIntegerParameter(simxInt clientID,simxInt paramIdentifier,simxInt paramValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
paramIdentifier: an integer parameter identifier
paramValue: the parameter value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the value of an integer signal. If that signal is not yet present, it is added. See also simxGetIntegerSignal, simxClearIntegerSignal, simxSetFloatSignal and simxSetStringSignal. |
C synopsis | simxInt simxSetIntegerSignal(simxInt clientID,const simxChar* signalName,simxInt signalValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: value of the signal
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the maximum force or torque that a joint can exert. This function has no effect when the joint is not dynamically enabled, or when it is a spherical joint. See also simxJointGetForce. |
C synopsis | simxInt simxSetJointForce(simxInt clientID,simxInt jointHandle,simxFloat force,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
force: the maximum force or torque that the joint can exert
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the intrinsic position of a joint. May have no effect depending on the joint mode. This function cannot be used with spherical joints (use simxSetSphericalJointMatrix instead). If you want to set several joints that should be applied at the exact same time on the V-REP side, then use simxPauseCommunication. See also simxGetJointPosition and simxSetJointTargetPosition. |
C synopsis | simxInt simxSetJointPosition(simxInt clientID,simxInt jointHandle,simxFloat position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
position: position of the joint (angular or linear value depending on the joint type)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_oneshot or
simx_opmode_streaming
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the target position of a joint if the joint is in torque/force mode (also make sure that the joint's motor and position control are enabled). See also simxSetJointPosition. |
C synopsis | simxInt simxSetJointTargetPosition(simxInt clientID,simxInt jointHandle,simxFloat targetPosition,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
targetPosition: target position of the joint (angular or linear value depending on the joint type)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_oneshot or
simx_opmode_streaming
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the intrinsic target velocity of a non-spherical joint. This command makes only sense when the joint mode is: (a) motion mode: the joint's motion handling feature must be enabled (simHandleJoint must be called (is called by default in the main script), and the joint motion properties must be set in the joint settings dialog), (b) torque/force mode: the dynamics functionality and the joint motor have to be enabled (position control should however be disabled) |
C synopsis | simxInt simxSetJointTargetVelocity(simxInt clientID,simxInt jointHandle,simxFloat targetVelocity,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
targetVelocity: target velocity of the joint (linear or angular velocity depending on the joint-type)
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_oneshot or
simx_opmode_streaming
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the properties of a model. See also simxGetModelProperty. |
C synopsis | simxInt simxSetModelProperty(simxInt clientID,simxInt objectHandle,simxInt prop,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
prop: a model property value
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets a floating-point parameter of a object. See also simxGetObjectFloatParameter and simxSetObjectIntParameter. |
C synopsis | simxInt simxSetObjectFloatParameter(simxInt clientID,simxInt objectHandle,simxInt parameterID,simxFloat parameterValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
parameterID: identifier of the parameter to set. See the list of all possible object parameter identifiers
parameterValue: the desired value of the parameter
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets an integer parameter of a object. See also simxGetObjectIntParameter and simxSetObjectFloatParameter. |
C synopsis | simxInt simxSetObjectIntParameter(simxInt clientID,simxInt objectHandle,simxInt parameterID,simxInt parameterValue,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
parameterID: identifier of the parameter to set. See the list of all possible object parameter identifiers
parameterValue: the desired value of the parameter
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the orientation (Euler angles) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling simResetDynamicObject just before). See also simxGetObjectOrientation and simxSetObjectPosition. |
C synopsis | simxInt simxSetObjectOrientation(simxInt clientID,simxInt objectHandle,simxInt relativeToObjectHandle,const simxFloat* eulerAngles,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame the orientation is specified. Specify -1 to set the absolute orientation, sim_handle_parent to set the orientation relative to the object's parent, or an object handle relative to whose reference frame the orientation is specified.
eulerAngles: Euler angles (alpha, beta and gamma)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets an object's parent object. See also simxGetObjectParent. |
C synopsis | simxInt simxSetObjectParent(simxInt clientID,simxInt objectHandle,simxInt parentObject,simxChar keepInPlace,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object that will become child of the parent object
parentObject: handle of the object that will become parent, or -1 if the object should become parentless
keepInPlace: indicates whether the object's absolute position and orientation should stay same
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot or simx_opmode_oneshot_wait depending on the intent
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the position of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling simResetDynamicObject just before). See also simxGetObjectPosition and simxSetObjectOrientation. |
C synopsis | simxInt simxSetObjectPosition(simxInt clientID,simxInt objectHandle,simxInt relativeToObjectHandle,const simxFloat* position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandle: handle of the object
relativeToObjectHandle: indicates relative to which reference frame the position is specified. Specify -1 to set the absolute position, sim_handle_parent to set the position relative to the object's parent, or an object handle relative to whose reference frame the position is specified.
position: the position values (x, y and z)
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the selection state for objects. See also simxGetObjectSelection. |
C synopsis | simxInt simxSetObjectSelection(simxInt clientID,const simxInt* objectHandles,simxInt objectCount,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
objectHandles: an array of object handles
objectCount: the number of elements in the array
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot or simx_opmode_oneshot_wait depending on the intent.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the intrinsic orientation matrix of a spherical joint object. This function cannot be used with non-spherical joints (use simxSetJointPosition instead). See also simxGetJointMatrix.. |
C synopsis | simxInt simxSetSphericalJointMatrix(simxInt clientID,simxInt jointHandle,simxFloat* matrix,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
jointHandle: handle of the joint
matrix: pointer to 12 simxFloat values. See the regular API equivalent function for details
operationMode: a remote API function operation mode. Recommended operation modes for this function are simx_opmode_oneshot or
simx_opmode_streaming
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the value of a string signal. If that signal is not yet present, it is added. See also simxAppendStringSignal, simxGetStringSignal, simxClearStringSignal, simxSetIntegerSignal and simxSetFloatSignal. |
C synopsis | simxInt simxSetStringSignal(simxInt clientID,const simxChar* signalName,const simxChar* signalValue,simxInt signalLength,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
signalName: name of the signal
signalValue: value of the signal (which may contain any value, including embedded zeros)
signalLength: size of the signalValue string.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the up-state and down-state labels of a custom user interface button. |
C synopsis | simxInt simxSetUIButtonLabel(simxInt clientID,simxInt uiHandle,simxInt uiButtonID,const simxChar* upStateLabel,const simxChar* downStateLabel,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiButtonID: handle (or ID) of the custom user interface button
upStateLabel: pointer to a string containing the label of the button when it is up. Cannot be NULL.
downStateLabel: pointer to a string containing the label of the button when it is down. Cannot be NULL.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the properties of a custom user interface button. See also simxGetUIButtonProperty. |
C synopsis | simxInt simxSetUIButtonProperty(simxInt clientID,simxInt uiHandle,simxInt uiButtonID,simxInt prop,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiButtonID: handle (or ID) of the custom user interface button
prop: a button property value.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the slider position of a custom user interface button (must be a slider-type button). See also simxGetUISlider. |
C synopsis | simxInt simxSetUISlider(simxInt clientID,simxInt uiHandle,simxInt uiButtonID,simxInt position,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
uiHandle: handle of the custom user interface
uiButtonID: id of the button (slider) in the custom user interface
position: slider position. valid values are between 0 and 1000
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sets the image of a vision sensor (and applies any image processing filter if specified in the vision sensor dialog). Make sure the vision sensor is flagged as use external image. The "regular" use of this function is to first read the data from a vision sensor with simxGetVisionSensorImage, do some custom filtering, then write the modified image to a passive vision sensor. The alternate use of this function is to display textures, video images, etc. by using a vision sensor object (without however making use of the vision sensor functionality), since a vision sensor can be "looked through" like camera objects. |
C synopsis | simxInt simxSetVisionSensorImage(simxInt clientID,simxInt sensorHandle,simxChar* image,simxInt bufferSize,simxChar options,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
sensorHandle: handle of the vision sensor
image: pointer tothe image data
bufferSize: size of the image data
options: image options, bit-coded:
bit0 set: each image pixel is a byte (greyscale image), otherwise each image pixel is a rgb byte-triplet
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_split+4000
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Starts a communication thread with the server (i.e. V-REP). A same client may start several communication threads. This should be the very first remote API function called on the client side. Make sure to start an appropriate remote API server service on the server side, that will wait for a connection. See also simxFinish. This is a remote API helper function. |
C synopsis | simxInt simxStart(const simxChar* connectionAddress,simxInt connectionPort,simxChar waitUntilConnected,simxChar doNotReconnectOnceDisconnected,simxInt timeOutInMs,simxInt commThreadCycleInMs) |
C parameters |
connectionAddress: the ip address where the server is located (i.e. V-REP)
connectionPort: the port number where to connect
waitUntilConnected: if different from zero, then the function blocks until connected (or timed out).
doNotReconnectOnceDisconnected: if different from zero, then the communication thread will not attempt a second connection if a connection was lost.
timeOutInMs: connection time-out in milliseconds (for the first connection).
commThreadCycleInMs: indicates how often data packets are sent back and forth. Reducing this number improves responsiveness, and a default value of 5 is recommended.
|
C return value |
the client ID, or -1 if the connection to the server was not possible (i.e. a timeout was reached). A call to simxStart should always be followed at the end with a call to simxFinish if simxStart didn't return -1
|
Other languages | Python, Java, Matlab, Urbi |
Description | Requests a start of a simulation (or a resume of a paused simulation). This function is only executed by continuous remote API server services. See also simxPauseSimulation and simxStopSimulation. |
C synopsis | simxInt simxStartSimulation(simxInt clientID,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Requests a stop of the running simulation. See also simxStartSimulation and simxPauseSimulation. |
C synopsis | simxInt simxStopSimulation(simxInt clientID,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
operationMode: a remote API function operation mode. Recommended operation modes for this function is simx_opmode_oneshot.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Enables or disables the synchronous operation mode for the remote API server service that the client is connected to. The function is blocking. While in synchronous operation mode, the client application is in charge of triggering the next simulation step. Only pre-enabled remote API server services will successfully execute this function, and only one server service at a time can have the synchronous operation enabled. This function should only be called when simulation is not running and is only executed by continuous remote API server services. See also simxSynchronousTrigger and the remote API overview . This is a remote API helper function. |
C synopsis | simxInt simxSynchronous(simxInt clientID,simxChar enable) |
C parameters |
clientID: the client ID. refer to simxStart.
enable: the enable state of the synchronous operation
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Sends a synchronization trigger signal to the server. The function is blocking. The server needs to be previously enabled for synchronous operation via the simxSynchronous function. The trigger signal will inform V-REP to execute the next simulation step (i.e. to call simHandleMainScript). While in synchronous operation mode, the client application is in charge of triggering the next simulation step, otherwise simulation will stall. See also the remote API overview. This function is only executed by continuous remote API server services. This is a remote API helper function. |
C synopsis | simxInt simxSynchronousTrigger(simxInt clientID) |
C parameters |
clientID: the client ID. refer to simxStart.
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |
Description | Allows transferring a file from the client to the server. This function is used by several other functions internally (e.g. simxLoadModel). See also simxEraseFile. This is a remote API helper function. |
C synopsis | simxInt simxTransferFile(simxInt clientID,const simxChar* filePathAndName,const simxChar* fileName_serverSide,simxInt timeOut,simxInt operationMode) |
C parameters |
clientID: the client ID. refer to simxStart.
filePathAndName: the local file name and path (i.e. on the client side)
fileName_serverSide: a file name under which the transferred file will be saved on the server side. For now, do not specify a path (the file will be saved in the remote API plugin directory)
timeOut: a timeout value in milliseconds
operationMode: a remote API function operation mode. Recommended operation mode for this function is simx_opmode_oneshot_wait
|
C return value | |
Other languages | Python, Java, Matlab, Urbi |