
simxAddStatusbarMessage (regular API equivalent: simAddStatusbarMessage)
Description
|
Adds a message to the status bar. |
Python synopsis
|
number errorCode=simxAddStatusbarMessage(number clientID,string message,number operationMode) |
Python parameters |
message: the message to display
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxAppendStringSignal
Description
|
Appends a string to a string signal. If that signal is not yet present, it is added. To pack/unpack integers/floats into/from a string, refer to simxPackInts, simxPackFloats, simxUnpackInts and simxUnpackFloats. See also simxSetStringSignal. |
Python synopsis
|
number errorCode=simxAppendStringSignal(number clientID,string signalName,string signalValueToAppend,number operationMode) |
Python parameters |
signalName: name of the signal
signalValueToAppend: value to append to the signal. That value may contain any value, including embedded zeros.
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxAuxiliaryConsoleClose (regular API equivalent: simAuxiliaryConsoleClose)
Description
|
Closes an auxiliary console window. See also simxAuxiliaryConsoleOpen. |
Python synopsis
|
number errorCode=simxAuxiliaryConsoleClose(number clientID,number consoleHandle,number operationMode) |
Python parameters |
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxAuxiliaryConsoleOpen (regular API equivalent: simAuxiliaryConsoleOpen)
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. |
Python synopsis
|
number errorCode,number consoleHandle=simxAuxiliaryConsoleOpen(number clientID,string title,number maxLines,number mode,array position,array size,array textColor,array backgroundColor,number operationMode) |
Python parameters |
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 None for default values.
size: the initial size of the console window (x and y value). Can be None for default values.
textColor: the color of the text (rgb values, 0-1). Can be None for default values.
backgroundColor: the background color of the console window (rgb values, 0-1). Can be None for default values.
|
Python return values
|
consoleHandle: the handle of the created console
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxAuxiliaryConsolePrint (regular API equivalent: simAuxiliaryConsolePrint)
Description
|
Prints to an auxiliary console window. See also simxAuxiliaryConsoleOpen. |
Python synopsis
|
number errorCode=simxAuxiliaryConsolePrint(number clientID,number consoleHandle,string txt,number operationMode) |
Python parameters |
txt: the text to append, or "None" to clear the console window
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxAuxiliaryConsoleShow (regular API equivalent: simAuxiliaryConsoleShow)
Description
|
Shows or hides an auxiliary console window. See also simxAuxiliaryConsoleOpen and simxAuxiliaryConsoleClose. |
Python synopsis
|
number errorCode=simxAuxiliaryConsoleShow(number clientID,number consoleHandle,number showState,number operationMode) |
Python parameters |
showState: indicates whether the console should be hidden (0) or shown (!=0)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxBreakForceSensor (regular API equivalent: simBreakForceSensor)
Description
|
Allows breaking a force sensor during simulation. A broken force sensor will lose its positional and orientational constraints. See also simxReadForceSensor. |
Python synopsis
|
number errorCode=simxBreakForceSensor(number clientID,number forceSensorHandle,number operationMode) |
Python parameters |
forceSensorHandle: handle of the force sensor
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxClearFloatSignal (regular API equivalent: simClearFloatSignal)
simxClearIntegerSignal (regular API equivalent: simClearIntegerSignal)
Description
|
Clears an integer signal (removes it). See also simxSetIntegerSignal, simxClearFloatSignal and simxClearStringSignal. |
Python synopsis
|
number errorCode=simxClearIntegerSignal(number clientID,string signalName,number operationMode) |
Python parameters |
signalName: name of the signal or an empty string to clear all integer signals
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxClearStringSignal (regular API equivalent: simClearStringSignal)
simxCloseScene (regular API equivalent: simCloseScene)
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. |
Python synopsis
|
number errorCode=simxCloseScene(number clientID,number operationMode) |
Python parameters |
|
Python return values
|
|
Other languages
|
C/C++, 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. |
Python synopsis
|
number errorCode,array newObjectHandles=simxCopyPasteObjects(number clientID,array objectHandles,number operationMode) |
Python parameters |
objectHandles: an array containing the handles of the objects to copy
|
Python return values
|
newObjectHandles: an array containing the handles of newly created objects. Individual objects of a new model are not returned, but only the model base.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxCreateBuffer (regular API equivalent: simCreateBuffer)
Description
|
Creates a buffer. The buffer needs to be released with simxReleaseBuffer except otherwise explicitly specified. This is a remote API helper function. |
Python synopsis
|
charPointer buffer=simxCreateBuffer(number bufferSize) |
Python parameters |
bufferSize: size of the buffer in bytes
|
Python return values
|
buffer: the created buffer
|
Other languages
|
C/C++, Matlab |
simxCreateDummy (regular API equivalent: simCreateDummy)
Description
|
Creates a dummy in the scene. |
C synopsis
|
number errorCode,number dummyHandle=simxCreateDummy(number clientID,number size,array colors,number operationMode) |
C parameters |
size: the size of the dummy.
colors: 4*3 values (0-255) for (ambient/diffuse/specular/emissive)*(rgb). Can be None for default colors.
|
C return value
|
dummyHandle: handle of the created dummy.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxDisplayDialog (regular API equivalent: simDisplayDialog)
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. |
Python synopsis
|
number errorCode,number dialogHandle,number uiHandle=simxDisplayDialog(number clientID,string titleText,string mainText,number dialogType,string initialText,array titleColors,array dialogColors,number operationMode) |
Python parameters |
titleText: Title bar text
mainText: Information text
initialText: Initial text in the edit box if the dialog is of type sim_dlgstyle_input. Cannot be None.
titleColors: Title bar color (6 values for RGB for background and foreground). Can be None for default values.
dialogColors: Dialog color (6 values for RGB for background and foreground). Can be None for default Values.
|
Python return values
|
uiHandle: the handle of the corresponding custom user interface
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxEndDialog (regular API equivalent: simEndDialog)
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). |
Python synopsis
|
number errorCode=simxEndDialog(number clientID,number dialogHandle,number operationMode) |
Python parameters |
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxEraseFile
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. |
Python synopsis
|
number errorCode=simxEraseFile(number clientID,string fileName_serverSide,number operationMode) |
Python parameters |
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)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxFinish
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. |
Python synopsis
|
simxFinish(number clientID) |
Python parameters |
|
Python return values
|
none
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetAndClearStringSignal
Description
|
Gets the value of a string signal, then clears it. Useful to retrieve continuous data from the server. To pack/unpack integers/floats into/from a string, refer to simxPackInts, simxPackFloats, simxUnpackInts and simxUnpackFloats. See also simxGetStringSignal. |
Python synopsis
|
number errorCode,string signalValue=simxGetAndClearStringSignal(number clientID,string signalName,number operationMode) |
Python parameters |
signalName: name of the signal
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:'''
err,signal=vrep.simxGetAndClearStringSignal(
clientID,"sig",uiHandle,vrep.simx_opmode_streaming)
'''while we are connected:'''
while vrep.simxGetConnectionId(clientID) != -1:
err,signal=vrep.simxGetAndClearStringSignal(
clientID,"sig",uiHandle,vrep.simx_opmode_buffer)
if (err==vrep.simx_error_noerror):
'''A signal was retrieved.'''
'''Enable streaming again (was automatically disabled with the positive event):'''
err,signal=vrep.simxGetAndClearStringSignal(
clientID,"sig",vrep.simx_opmode_streaming)
..
|
Python return values
|
signalValue: the value of the signal.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetArrayParameter (regular API equivalent: simGetArrayParameter)
simxGetBooleanParameter (regular API equivalent: simGetBooleanParameter)
simxGetCollisionHandle (regular API equivalent: simGetCollisionHandle)
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. |
Python synopsis
|
number errorCode,number handle=simxGetCollisionHandle(number clientID,string collisionObjectName,number operationMode) |
Python parameters |
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.
|
Python return values
|
handle: the collision handle
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetConnectionId
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. |
Python synopsis
|
number connectionId=simxGetConnectionId(number clientID) |
Python parameters |
|
Python return values
|
connectionId: a connection ID, or -1 if the client is not connected to the server. Different connection IDs indicate temporary disconections in-between.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetDialogInput (regular API equivalent: simGetDialogInput)
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. |
Python synopsis
|
number errorCode,string inputText=simxGetDialogInput(number clientID,number dialogHandle,number operationMode) |
Python parameters |
|
Python return values
|
inputText: the string the user entered.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetDialogResult (regular API equivalent: simGetDialogResult)
Description
|
Queries the result of a dialog box. To be used after simxDisplayDialog was called. |
Python synopsis
|
number errorCode,number result=simxGetDialogResult(number clientID,number dialogHandle,number operationMode) |
Python parameters |
|
Python return values
|
Note. If the result 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)
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetDistanceHandle (regular API equivalent: simGetDistanceHandle)
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. |
Python synopsis
|
number errorCode,number handle=simxGetDistanceHandle(number clientID,string distanceObjectName,number operationMode) |
Python parameters |
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.
|
Python return values
|
handle: handle of the distance object
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetFloatingParameter (regular API equivalent: simGetFloatingParameter)
simxGetFloatSignal (regular API equivalent: simGetFloatSignal)
simxGetInMessageInfo
Description
|
Retrieves information about the last received message from the server. This is a remote API helper function. See also simxGetOutMessageInfo. |
Python synopsis
|
number result,number info=simxGetInMessageInfo(number clientID,number infoType) |
Python parameters |
|
Python return values
|
result: -1 in case of an error
info: the requested information
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetIntegerParameter (regular API equivalent: simGetIntegerParameter)
simxGetIntegerSignal (regular API equivalent: simGetIntegerSignal)
simxGetJointMatrix (regular API equivalent: simGetJointMatrix)
Description
|
Retrieves the intrinsic transformation matrix of a joint (the transformation caused by the joint movement). See also simxSetSphericalJointMatrix. |
Python synopsis
|
number errorCode,array matrix=simxGetJointMatrix(number clientID,number jointHandle,number operationMode)
|
Python parameters |
jointHandle: handle of the joint
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)
|
Python return values
|
matrix: array containing 12 values. See the regular API equivalent function for details
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetJointPosition (regular API equivalent: simGetJointPosition)
Description
|
Retrieves the intrinsic position of a joint. This function cannot be used with spherical joints (use simxGetJointMatrix instead). See also simxSetJointPosition and simxGetObjectGroupData. |
Python synopsis
|
number errorCode,number position=simxGetJointPosition(number clientID,number jointHandle,number operationMode)
|
Python parameters |
jointHandle: handle of the joint
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)
|
Python return values
|
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.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetLastCmdTime
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:
data=vrep.simxGetVisionSensorImage(clientID,handle,0,vrep.simx_opmode_buffer)
if data[0] == vrep.simx_error_noerror :
imageAcquisitionTime=vrep.simxGetLastCmdTime(clientID)
This is a remote API helper function. |
Python synopsis
|
number cmdTime=simxGetLastCmdTime(number clientID) |
Python parameters |
|
Python return values
|
cmdTime: the simulation time in milliseconds when the command reply was generated, or 0 if simulation was not running.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetLastErrors (regular API equivalent: simGetLastError)
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. |
Python synopsis
|
number errorCode,array errorStrings=simxGetLastErrors(number clientID,number operationMode) |
Python parameters |
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.
|
Python return values
|
errorStrings: the error strings
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetModelProperty (regular API equivalent: simGetModelProperty)
Description
|
Retrieves the properties of a model. See also simxSetModelProperty. |
Python synopsis
|
number errorCode,number prop=simxGetModelProperty(number clientID,number objectHandle,number operationMode) |
Python parameters |
objectHandle: handle of the object
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)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectChild (regular API equivalent: simGetObjectChild)
Description
|
Retrieves the handle of an object's child object. See also simxGetObjectParent. |
Python synopsis
|
number errorCode,number childObjectHandle=simxGetObjectChild(number clientID,number parentObjectHandle,number childIndex,number operationMode) |
Python parameters |
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
|
Python return values
|
childObjectHandle: the handle of the child object. If the value is -1, there is no child at the given index
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectFloatParameter (regular API equivalent: simGetObjectFloatParameter)
Description
|
Retrieves a floating-point parameter of a object. See also simxSetObjectFloatParameter and simxGetObjectIntParameter. |
Python synopsis
|
number errorCode,number parameterValue=simxGetObjectFloatParameter(number clientID,number objectHandle,number parameterID,number operationMode) |
Python parameters |
objectHandle: handle of the object
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)
|
Python return values
|
parameterValue: the value of the parameter
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectGroupData
Description
|
Simultaneously retrieves data of various objects in a V-REP scene. |
Python synopsis
|
number errorCode,array handles,array intData,array floatData,array stringData=simxGetObjectGroupData(number clientID,number objectType,number dataType,number operationMode) |
Python parameters |
dataType: the type of data that is desired:
0: retrieves the object names (in stringData.)
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)
|
Python return values
|
handles: the object handles.
intData: the integer values.
floatData: the float values.
stringData: the string values.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectHandle (regular API equivalent: simGetObjectHandle)
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. |
Python synopsis
|
number errorCode,number handle=simxGetObjectHandle(number clientID,string objectName,number operationMode) |
Python parameters |
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.
|
Python return values
|
handle: the handle
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectIntParameter (regular API equivalent: simGetObjectIntParameter)
Description
|
Retrieves an integer parameter of a object. See also simxSetObjectIntParameter and simxGetObjectFloatParameter. |
Python synopsis
|
number errorCode,number parameterValue=simxGetObjectIntParameter(number clientID,number objectHandle,number parameterID,number operationMode) |
Python parameters |
objectHandle: handle of the object
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)
|
Python return values
|
parameterValue: the value of the parameter
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectOrientation (regular API equivalent: simGetObjectOrientation)
Description
|
Retrieves the orientation (Euler angles) of an object. See also simxSetObjectOrientation, simxGetObjectPosition and simxGetObjectGroupData. |
Python synopsis
|
number errorCode,array eulerAngles=simxGetObjectOrientation(number clientID,number objectHandle,number relativeToObjectHandle,number operationMode) |
Python parameters |
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
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)
|
Python return values
|
eulerAngles: the Euler angles (alpha, beta and gamma)
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectParent (regular API equivalent: simGetObjectParent)
Description
|
Retrieves the handle of an object's parent object. See also simxGetObjectChild and simxGetObjectGroupData. |
Python synopsis
|
number errorCode,number parentObjectHandle=simxGetObjectParent(number clientID,number objectHandle,number operationMode) |
Python parameters |
objectHandle: handle of the object
|
Python return values
|
parentObjectHandle: the handle of the parent object. If the value is -1, the object has no parent
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectPosition (regular API equivalent: simGetObjectPosition)
Description
|
Retrieves the position of an object. See also simxSetObjectPosition, simxGetObjectOrientation and simxGetObjectGroupData. |
Python synopsis
|
number errorCode,array position=simxGetObjectPosition(number clientID,number objectHandle,number relativeToObjectHandle,number operationMode) |
Python parameters |
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
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)
|
Python return values
|
position: the position (x,y,z)
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjects (regular API equivalent: simGetObjects)
Description
|
Retrieves object handles of a given type, or of all types (i.e. all object handles). See also simxGetObjectGroupData. |
Python synopsis
|
number errorCode,array objectHandles=simxGetObjects(number clientID,number objectType,number operationMode) |
Python parameters |
objectType: object type (sim_object_shape_type, sim_object_joint_type, etc., or sim_handle_all for any type of object
|
Python return values
|
objectHandles: an object handle array.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetObjectSelection (regular API equivalent: simGetObjectSelection)
Description
|
Retrieves all selected object's handles. See also simxSetObjectSelection. |
Python synopsis
|
number errorCode,array objectHandles=simxGetObjectSelection(number clientID,number operationMode) |
Python parameters |
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.
|
Python return values
|
objectHandles: an object handle array.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetOutMessageInfo
Description
|
Retrieves information about the next message to send to the server. This is a remote API helper function. See also simxGetInMessageInfo. |
Python synopsis
|
number result,number info=simxGetOutMessageInfo(number clientID,number infoType) |
Python parameters |
|
Python return values
|
result:-1 in case of an error
info: the requested information
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetPingTime
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. |
Python synopsis
|
number errorCode,number pingTime=simxGetPingTime(number clientID) |
Python parameters |
|
Python return values
|
pingTime: a pointer to a simxInt value accepting the ping time in milliseconds.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetStringParameter (regular API equivalent: simGetStringParameter)
simxGetStringSignal (regular API equivalent: simGetStringSignal)
Description
|
Gets the value of a string signal. Signals are cleared at simulation start. To pack/unpack integers/floats into/from a string, refer to simxPackInts, simxPackFloats, simxUnpackInts and simxUnpackFloats. See also simxSetStringSignal, simxGetAndClearStringSignal, simxClearStringSignal, simxGetIntegerSignal and simxGetFloatSignal. |
Python synopsis
|
number errorCode,string signalValue=simxGetStringSignal(number clientID,string signalName,number operationMode) |
Python parameters |
signalName: name 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)
|
Python return values
|
signalValue: the value of the signal.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetUIButtonProperty (regular API equivalent: simGetUIButtonProperty)
Description
|
Retrieves the properties of a custom user interface button. See also simxSetUIButtonProperty. |
Python synopsis
|
number errorCode,number prop=simxGetUIButtonProperty(number clientID,number uiHandle,number uiButtonID,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
uiButtonID: handle (or id) of the custom user interface button
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)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetUIEventButton (regular API equivalent: simGetUIEventButton)
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. |
Python synopsis
|
number errorCode,number uiEventButtonID,array auxValues=simxGetUIEventButton(number clientID,number uiHandle,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
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:'''
uiHandle = -1
err,uiHandle=vrep.simxGetUIHandle(clientID,"UI",vrep.simx_opmode_oneshot_wait)
buttonEventID = -1
err,buttonEventID,aux=vrep.simxGetUIEventButton(
clientID,uiHandle,vrep.simx_opmode_streaming)
'''while we are connected:'''
while vrep.simxGetConnectionId(clientID) != -1:
err,buttonEventID,aux=vrep.simxGetUIEventButton(
clientID,uiHandle,vrep.simx_opmode_buffer)
if ((err==vrep.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):'''
err,buttonEventID,aux=vrep.simxGetUIEventButton(
clientID,uiHandle,vrep.simx_opmode_streaming)
..
|
Python return values
|
uiEventButtonID: id of the UI button where an event occured, or -1 if no event occured
auxValues: 2 values:
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)
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetUIHandle (regular API equivalent: simGetUIHandle)
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. |
Python synopsis
|
number errorCode,number handle=simxGetUIHandle(number clientID,string uiName,number operationMode) |
Python parameters |
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.
|
Python return values
|
handle: the handle
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetUISlider (regular API equivalent: simGetUISlider)
Description
|
Gets the slider position of a custom user interface button (must be slider-type button). See also simxSetUISlider. |
Python synopsis
|
number errorCode,number position=simxGetUISlider(number clientID,number uiHandle,number uiButtonID,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
uiButtonID: handle of a button inside the specified custom user interface
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)
|
Python return values
|
position: the slider position (value between 0 and 1000)
|
Other languages
|
C/C++, 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. |
Python synopsis
|
number errorCode,array resolution,array buffer=simxGetVisionSensorDepthBuffer(number clientID,number sensorHandle,number operationMode) |
Python parameters |
sensorHandle: handle of the vision 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)
|
Python return values
|
resolution: the resolution of the image (x, y)
buffer: the depth buffer data. Values are in the range of 0-1 (0=closest to sensor, 1=farthest from sensor).
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxGetVisionSensorImage (regular API equivalent: simGetVisionSensorImage)
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. |
Python synopsis
|
number errorCode,array resolution,array image=simxGetVisionSensorImage(number clientID,number sensorHandle,number options,number operationMode) |
Python parameters |
sensorHandle: handle of the vision sensor
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)
|
Python return values
|
resolution: the resolution of the image (x,y)
image: the image data.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxJointGetForce (regular API equivalent: simJointGetForce)
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. |
Python synopsis
|
number errorCode,number force=simxJointGetForce(number clientID,number jointHandle,number operationMode)
|
Python parameters |
jointHandle: handle of the joint
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)
|
Python return values
|
force: the force or the torque the joint exerts along/about its z-axis
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxLoadModel (regular API equivalent: simLoadModel)
Description
|
Loads a previously saved model. See also simxLoadUI, simxLoadScene and simxTransferFile. |
Python synopsis
|
number errorCode,number baseHandle=simxLoadModel(number clientID,string modelPathAndName,number options,number operationMode) |
Python parameters |
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
|
Python return values
|
baseHandle: the loaded model base.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxLoadScene (regular API equivalent: simLoadScene)
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. |
Python synopsis
|
number errorCode=simxLoadScene(number clientID,string scenePathAndName,number options,number operationMode) |
Python parameters |
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
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxLoadUI (regular API equivalent: simLoadUI)
Description
|
Loads previously saved custom user interfaces. See also simxLoadModel, simxLoadScene and simxTransferFile. |
Python synopsis
|
number errorCode,array uiHandles=simxLoadUI(number clientID,string uiPathAndName,number options,number operationMode) |
Python parameters |
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
|
Python return values
|
uiHandles: the loaded UI handles.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxPackFloats
Description
|
Packs an array of floats into a string. This is a remote API helper function. See also simxUnpackFloats and simxPackInts. |
Python synopsis
|
string packedData=simxPackFloats(array floatValues) |
Python parameters |
floatValues: an array of numbers we wish to pack as floats
|
Python return values
|
packedData: a string that contains the packed values. Each values takes exactly 4 bytes in the string.
|
Other languages
|
Java, Matlab, Urbi |
simxPackInts
Description
|
Packs an array of integers into a string. This is a remote API helper function. See also simxUnpackInts and simxPackFloats. |
Python synopsis
|
string packedData=simxPackInts(array intValues) |
Python parameters |
intValues: an array of numbers we wish to pack as integers
|
Python return values
|
packedData: a string that contains the packed values. Each values takes exactly 4 bytes in the string.
|
Other languages
|
Java, Matlab, Urbi |
simxPauseCommunication
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. |
Python synopsis
|
number errorCode=simxPauseCommunication(number clientID,boolean pause) |
Python parameters |
pause: whether the communication thread should pause or run normally.
Usage example:
vrep.simxPauseCommunication(clientID,True)
vrep.simxSetJointPosition(clientID,joint1Handle,joint1Value,vrep.simx_opmode_oneshot)
vrep.simxSetJointPosition(clientID,joint2Handle,joint2Value,vrep.simx_opmode_oneshot)
vrep.simxSetJointPosition(clientID,joint3Handle,joint3Value,vrep.simx_opmode_oneshot)
vrep.simxPauseCommunication(clientID,False)
'''Above's 3 joints will be received and set on the V-REP side at the same time'''
|
Python return values
|
errorCode: 0 in case of operation success.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxPauseSimulation (regular API equivalent: simPauseSimulation)
simxQuery
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. To pack/unpack integers/floats into/from a string, refer to simxPackInts, simxPackFloats, simxUnpackInts and simxUnpackFloats.
Usage example where a child script handles a request:
# Following is the remote API client side:
res,replyData=vrep.simxQuery(clientID,'request','send me a 42','reply',5000)
if res==vrep.simx_error_noerror:
print "The reply is: %s" % 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
|
number errorCode,string retSignalValue=simxQuery(number clientID,string signalName,string signalValue,string retSignalName,number timeOutInMs) |
C parameters |
signalName: name of the signal that contains the request string
signalValue: the request string.
retSignalName: name of the signal that contains the reply string
timeOutInMs: the maximum time in milliseconds that the function will wait for a reply.
|
C return value
|
retSignalValue: the reply string
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReadCollision (regular API equivalent: simReadCollision)
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. |
Python synopsis
|
number errorCode,boolean collisionState=simxReadCollision(number clientID,number collisionObjectHandle,number operationMode) |
Python parameters |
collisionObjectHandle: handle of the collision object
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)
|
Python return values
|
collisionState: the collision state
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReadDistance (regular API equivalent: simReadDistance)
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. |
Python synopsis
|
number errorCode,number minimumDistance=simxReadDistance(number clientID,number distanceObjectHandle, number operationMode) |
Python parameters |
distanceObjectHandle: handle of the distance object
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)
|
Python return values
|
minimumDistance: the minimum distance
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReadForceSensor (regular API equivalent: simReadForceSensor)
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. |
Python synopsis
|
number errorCode,number state,array forceVector,array torqueVector=simxReadForceSensor(number clientID,number forceSensorHandle,number operationMode) |
Python parameters |
forceSensorHandle: handle of the force sensor
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)
|
Python return values
|
state: the state of the force sensor
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: the force vector (x,y,z)
torqueVector: the torque vector (x,y,z)
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReadProximitySensor (regular API equivalent: simReadProximitySensor)
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. |
Python synopsis
|
number errorCode,boolean detectionState,array detectedPoint,number detectedObjectHandle,array detectedSurfaceNormalVector=simxReadProximitySensor(number clientID,number sensorHandle,number operationMode) |
Python parameters |
sensorHandle: handle of the proximity sensor
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)
|
Python return values
|
detectionState: the detection state.
detectedPoint: the detected point coordinates (relative to the sensor reference frame).
detectedObjectHandle:the handle of the detected object.
detectedSurfaceNormalVector: the normal vector (normalized) of the detected surface. Relative to the sensor reference frame.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReadVisionSensor (regular API equivalent: simReadVisionSensor)
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. |
Python synopsis
|
number errorCode,boolean detectionState,array auxPackets=simxReadVisionSensor(number clientID,number sensorHandle,number operationMode) |
Python parameters |
sensorHandle: handle of the vision sensor
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)
|
Python return values
|
detectionState: the detection state (i.e. the trigger state).
auxPackets: packets containing 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 after the first packet.
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxReleaseBuffer (regular API equivalent: simReleaseBuffer)
Description
|
Releases a buffer previously created with simxCreateBuffer or a buffer returned by a remote API function. This is a remote API helper function. |
Python synopsis
|
simxReleaseBuffer(charPointer buffer) |
Python parameters |
buffer: buffer to be released
|
Python return values
|
|
Other languages
|
C/C++, Matlab |
simxRemoveObject (regular API equivalent: simRemoveObject)
Description
|
Removes a scene object. |
Python synopsis
|
number errorCode=simxRemoveObject(number clientID,number objectHandle,number operationMode) |
Python parameters |
objectHandle: handle of the object to remove
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxRemoveUI (regular API equivalent: simRemoveUI)
Description
|
Removes a custom user interface. |
Python synopsis
|
number errorCode=simxRemoveUI(number clientID,number uiHandle,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetArrayParameter (regular API equivalent: simSetArrayParameter)
simxSetBooleanParameter (regular API equivalent: simSetBooleanParameter)
simxSetFloatingParameter (regular API equivalent: simSetFloatingParameter)
simxSetFloatSignal (regular API equivalent: simSetFloatSignal)
simxSetIntegerParameter (regular API equivalent: simSetIntegerParameter)
simxSetIntegerSignal (regular API equivalent: simSetIntegerSignal)
simxSetJointForce (regular API equivalent: simSetJointForce)
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. |
Python synopsis
|
number errorCode=simxSetJointForce(number clientID,number jointHandle,number force,number operationMode)
|
Python parameters |
jointHandle: handle of the joint
force: the maximum force or torque that the joint can exert
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetJointPosition (regular API equivalent: simSetJointPosition)
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. |
Python synopsis
|
number errorCode=simxSetJointPosition(number clientID,number jointHandle,number position,number operationMode)
|
Python parameters |
jointHandle: handle of the joint
position: position of the joint (angular or linear value depending on the joint type)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetJointTargetPosition (regular API equivalent: simSetJointTargetPosition)
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. |
Python synopsis
|
number errorCode=simxSetJointTargetPosition(number clientID,number jointHandle,number targetPosition,number operationMode) |
Python parameters |
jointHandle: handle of the joint
targetPosition: target position of the joint (angular or linear value depending on the joint type)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetJointTargetVelocity (regular API equivalent: simSetJointTargetVelocity)
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) |
Python synopsis
|
number errorCode=simxSetJointTargetVelocity(number clientID,number jointHandle,number targetVelocity,number operationMode) |
Python parameters |
jointHandle: handle of the joint
targetVelocity: target velocity of the joint (linear or angular velocity depending on the joint-type)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetModelProperty (regular API equivalent: simSetModelProperty)
Description
|
Sets the properties of a model. See also simxGetModelProperty. |
Python synopsis
|
number errorCode=simxSetModelProperty(number clientID,number objectHandle,number prop,number operationMode) |
Python parameters |
objectHandle: handle of the object
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectFloatParameter (regular API equivalent: simSetObjectFloatParameter)
Description
|
Sets a floating-point parameter of a object. See also simxGetObjectFloatParameter and simxSetObjectIntParameter. |
Python synopsis
|
number errorCode=simxSetObjectFloatParameter(number clientID,number objectHandle,number parameterID,number parameterValue,number operationMode) |
Python parameters |
objectHandle: handle of the object
parameterValue: the desired value of the parameter
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectIntParameter (regular API equivalent: simSetObjectIntParameter)
Description
|
Sets an integer parameter of a object. See also simxGetObjectIntParameter and simxSetObjectFloatParameter. |
Python synopsis
|
number errorCode=simxSetObjectIntParameter(number clientID,number objectHandle,number parameterID,number parameterValue,number operationMode) |
Python parameters |
objectHandle: handle of the object
parameterValue: the desired value of the parameter
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectOrientation (regular API equivalent: simSetObjectOrientation)
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. |
Python synopsis
|
number errorCode=simxSetObjectOrientation(number clientID,number objectHandle,number relativeToObjectHandle,array eulerAngles,number operationMode) |
Python parameters |
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)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectParent (regular API equivalent: simSetObjectParent)
Description
|
Sets an object's parent object. See also simxGetObjectParent. |
Python synopsis
|
number errorCode=simxSetObjectParent(number clientID,number objectHandle,number parentObject,boolean keepInPlace,number operationMode) |
Python parameters |
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
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectPosition (regular API equivalent: simSetObjectPosition)
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. |
Python synopsis
|
number errorCode=simxSetObjectPosition(number clientID,number objectHandle,number relativeToObjectHandle,array position,number operationMode) |
Python parameters |
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)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetObjectSelection
Description
|
Sets the selection state for objects. See also simxGetObjectSelection. |
Python synopsis
|
number errorCode=simxSetObjectSelection(number clientID,array objectHandles,number operationMode) |
Python parameters |
objectHandles: an array of object handles
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.
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetSphericalJointMatrix (regular API equivalent: simSetSphericalJointMatrix)
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.. |
Python synopsis
|
number errorCode=simxSetSphericalJointMatrix(number clientID,number jointHandle,array matrix,number operationMode) |
Python parameters |
jointHandle: handle of the joint
matrix: 12 values. See the regular API equivalent function for details
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetStringSignal (regular API equivalent: simSetStringSignal)
Description
|
Sets the value of a string signal. If that signal is not yet present, it is added. To pack/unpack integers/floats into/from a string, refer to simxPackInts, simxPackFloats, simxUnpackInts and simxUnpackFloats. See also simxAppendStringSignal, simxGetStringSignal, simxClearStringSignal, simxSetIntegerSignal and simxSetFloatSignal. |
Python synopsis
|
number errorCode=simxSetStringSignal(number clientID,string signalName,string signalValue,number operationMode) |
Python parameters |
signalName: name of the signal
signalValue: value of the signal (which may contain any value, including embedded zeros)
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetUIButtonLabel (regular API equivalent: simSetUIButtonLabel)
Description
|
Sets the up-state and down-state labels of a custom user interface button. |
Python synopsis
|
number errorCode=simxSetUIButtonLabel(number clientID,number uiHandle,number uiButtonID,string upStateLabel,string downStateLabel,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
uiButtonID: handle (or ID) of the custom user interface button
upStateLabel: string containing the label of the button when it is up.
downStateLabel: string containing the label of the button when it is down..
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetUIButtonProperty (regular API equivalent: simSetUIButtonProperty)
Description
|
Sets the properties of a custom user interface button. See also simxGetUIButtonProperty. |
Python synopsis
|
number errorCode=simxSetUIButtonProperty(number clientID,number uiHandle,number uiButtonID,number prop,number operationMode) |
Python parameters |
uiHandle: handle of the custom user interface
uiButtonID: handle (or ID) of the custom user interface button
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetUISlider (regular API equivalent: simSetUISlider)
Description
|
Sets the slider position of a custom user interface button (must be a slider-type button). See also simxGetUISlider. |
Python synopsis
|
number errorCode=simxSetUISlider(number clientID,number uiHandle,number uiButtonID,number position,number operationMode) |
Python parameters |
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
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSetVisionSensorImage (regular API equivalent: simSetVisionSensorImage)
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. |
Python synopsis
|
number errorCode=simxSetVisionSensorImage(number clientID,number sensorHandle,array image,number options,number operationMode) |
Python parameters |
sensorHandle: handle of the vision sensor
image: 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
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxStart
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. |
Python synopsis
|
number clientID=simxStart(string connectionAddress,number connectionPort,boolean waitUntilConnected,boolean doNotReconnectOnceDisconnected,number timeOutInMs,number commThreadCycleInMs) |
Python parameters |
connectionAddress: the ip address where the server is located (i.e. V-REP)
connectionPort: the port number where to connect
waitUntilConnected: if True, then the function blocks until connected (or timed out).
doNotReconnectOnceDisconnected: if True, 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.
|
Python return values
|
clientID: 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
|
C/C++, Java, Matlab, Urbi |
simxStartSimulation (regular API equivalent: simStartSimulation)
simxStopSimulation (regular API equivalent: simStopSimulation)
simxSynchronous
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. |
Python synopsis
|
number errorCode=simxSynchronous(number clientID,boolean enable) |
Python parameters |
enable: the enable state of the synchronous operation
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxSynchronousTrigger
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. |
Python synopsis
|
number errorCode=simxSynchronousTrigger(number clientID) |
Python parameters |
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxTransferFile
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. |
Python synopsis
|
number errorCode=simxTransferFile(number clientID,string filePathAndName,string fileName_serverSide,number timeOut,number operationMode) |
Python parameters |
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
|
Python return values
|
|
Other languages
|
C/C++, Java, Matlab, Urbi |
simxUnpackFloats
Description
|
Unpacks a string into an array of floats. This is a remote API helper function. See also simxPackFloats and simxUnpackInts. |
Python synopsis
|
array floatValues=simxUnpackFloats(string packedData) |
Python parameters |
packedData: a string that contains the packed values. Each values takes exactly 4 bytes in the string.
|
Python return values
|
floatValues: an array of numbers that were unpacked as floats
|
Other languages
|
Java, Matlab, Urbi |
simxUnpackInts
Description
|
Unpacks a string into an array of integers. This is a remote API helper function. See also simxPackInts and simxUnpackFloats. |
Python synopsis
|
array intValues=simxUnpackInts(string packedData) |
Python parameters |
packedData: a string that contains the packed values. Each values takes exactly 4 bytes in the string.
|
Python return values
|
intValues: an array of numbers that were unpacked as integers
|
Other languages
|
Java, Matlab, Urbi |
|