ROS services
simRosAddStatusbarMessage
|
Description | Adds a message to the status bar.
Equivalent topic subscribtion command: simros_strmcmd_add_status_bar_message
|
Input |
message (string): the message to display
|
Output |
result (int32): -1 if operation was not successful
|
Description | Closes an auxiliary console window. See also simRosAuxiliaryConsoleOpen. |
Input |
consoleHandle (int32): the handle of the console window, previously returned by the simRosAuxiliaryConsoleOpen command
|
Output |
result (int32): -1 if operation was not successful. 0 if the console doesn't exist (anymore), in which case no error is generated. 1 if the console window was closed.
|
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 simRosAuxiliaryConsolePrint, simRosAuxiliaryConsoleShow and simRosAuxiliaryConsoleClose. |
Input |
title (string): the title of the console window
maxLines (int32): the number of text lines that can be displayed and buffered
mode (int32): 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 (int32[]): the initial position of the console window (x and y value). Can be empty for default values
size (int32[]): the initial size of the console window (x and y value). Can be empty for default values
textColor (float32[]): the color of the text (rgb values, 0-1). Can be empty for default values
backgroundColor (float32[]): the background color of the console window (rgb values, 0-1). Can be empty for default values
|
Output |
consoleHandle (int32): the handle of the created console
|
Description | Prints to an auxiliary console window. See also simRosAuxiliaryConsoleOpen.
Equivalent topic subscribtion command: simros_strmcmd_auxiliary_console_print
|
Input |
consoleHandle (int32): the handle of the console window, previously returned by the simRosAuxiliaryConsoleOpen command
text (string): the text to append, or an empty string to clear the console window
|
Output |
result (int32): -1 if operation was not successful. 0 if the console doesn't exist (anymore), in which case no error is generated. 1 if the operation was successful.
|
Description | Shows or hides an auxiliary console window. See also simRosAuxiliaryConsoleOpen and simRosAuxiliaryConsoleClose. |
Input |
consoleHandle (int32): the handle of the console window, previously returned by the simRosAuxiliaryConsoleOpen command
showState (uint8): indicates whether the console should be hidden (0) or shown (!=0)
|
Output |
result (int32): -1 if operation was not successful. 0 if the console doesn't exist (anymore), in which case no error is generated. 1 if the console window's show state was changed.
|
Description | Allows breaking a force sensor during simulation. A broken force sensor will lose its positional and orientational constraints. See also simRosReadForceSensor. |
Input |
objectHandle (int32): handle of the force sensor
|
Output |
result (int32): -1 if operation was not successful
|
Description | Clears a float signal (removes it). See also simRosSetFloatSignal, simRosClearIntegerSignal and simRosClearStringSignal.
Equivalent topic subscribtion command: simros_strmcmd_clear_float_signal
|
Input |
signalName (string): name of the signal or an empty string to clear all float signals
|
Output |
result (int32): -1 if operation was not successful, otherwise the number of signals cleared
|
Description | Clears an integer signal (removes it). See also simRosSetIntegerSignal, simRosClearFloatSignal and simRosClearStringSignal.
Equivalent topic subscribtion command: simros_strmcmd_clear_integer_signal
|
Input |
signalName (string): name of the signal or an empty string to clear all integer signals
|
Output |
result (int32): -1 if operation was not successful, otherwise the number of signals cleared
|
Description | Clears a string signal (removes it). See also simRosSetStringSignal, simRosClearIntegerSignal and simRosClearFloatSignal.
Equivalent topic subscribtion command: simros_strmcmd_clear_string_signal
|
Input |
signalName: name of the signal or an empty string to clear all string signals
|
Output |
result (int32): -1 if operation was not successful
|
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. See also simRosLoadScene. |
Input |
-
|
Output |
result (int32): -1 if operation was not successful
|
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. |
Input |
objectHandles (int32[]): the handles of the objects to copy
|
Output |
result (int32): the number of copied objects (not necessarily the number of returned object handles!)
newObjectHandles (int32): the handles of newly created objects. Individual objects of a new model are not returned, but only the model base.
|
Description | Creates a dummy in the scene. |
Input |
size (float32): the size of the dummy
colors (int8[]): 4*3 bytes (0-255) for (ambient/diffuse/specular/emissive)*(rgb). Can be empty for default colors.
|
Output |
dummyHandle (int32): the handle of the created dummy, or -1 in case of an error
|
Description | Disables a publisher (i.e. V-REP will stop streaming data on a specific topic) previously enabled with simRosEnablePublisher. If a same publisher was enabled several times (e.g. from different nodes), then this command will only decrement a reference counter (a publisher is effectively disabled when its reference counter reaches zero). At simulation end, all publishers are automatically disabled. A publisher can also be disabled using the ROS plugin's exported Lua function: simExtROS_disablePublisher. See also simRosDisableSubscriber. |
Input |
topicName (string): the topic name previously returned by simRosEnablePublisher.
|
Output |
referenceCounter (int32): the value of the reference counter. If the counter is >0, then the publisher is still enabled. If the counter is 0, then the publisher was just disabled. If referenceCounter is -1, there was an error.
|
Description | Disables a subscriber (i.e. data streaming for a specific topic will not be read anymore by V-REP) previously enabled with simRosEnableSubscriber. At simulation end, all subscribers are automatically disabled. A subscriber can also be disabled using the ROS plugin's exported Lua function: simExtROS_disableSubscriber. See also simRosDisablePublisher. |
Input |
subscriberID (int32): a subscriber ID previously returned by simRosEnableSubscriber.
|
Output |
result (uint8): 0 if the operation was not successful.
|
Description | Displays a generic dialog box during simulation (and only during simulation!). Use in conjunction with simRosGetDialogResult, simRosGetDialogInput and simRosEndDialog.Use custom user interfaces instead if a higher customization level is required. |
Input |
titleText (string): Title bar text
mainText (string): Information text
dialogType (int32): a generic dialog style
initialText (string): Initial text in the edit box if the dialog is of type sim_dlgstyle_input. Cannot be NULL!
titleColors (float32[]): Title bar color (6 values for RGB for background and foreground), can be empty for default colors
dialogColors (float32[]): Dialog color (6 values for RGB for background and foreground), can be empty for default colors
|
Output |
dialogHandle (int32): handle of the generic dialog (different from custom user interface handle!! (see hereafter)). This handle should be used with the following functions: simRosGetDialogResult, simRosGetDialogInput and simRosEndDialog.
uiHandle (int32): handle of the corresponding custom user interface.
|
Description | Enables a publisher (i.e. V-REP will be streaming data on a specific topic). Publishers can only be enabled while simulation is running. If a same publisher (i.e. of the same type and applied to the same item) was already enabled previously, then a reference counter will be incremented and the topic name of that publisher is returned. Publishers can be disabled with simRosDisablePublisher. At simulation end, all publishers are automatically disabled. A publisher can also be enabled using the ROS plugin's exported Lua function: simExtROS_enablePublisher. See also simRosEnableSubscriber. |
Input |
topicName (string): the desired topic name.
queueSize (int32): the desired queue size.
streamCmd (int32): the desired type of data to stream.
auxInt1 (int32): an auxiliary integer value (first) that might be needed to fully specify the desired data to stream
auxInt2 (int32): an auxiliary integer value (second) that might be needed to fully specify the desired data to stream
auxString (string): an auxiliary string value that might be needed to fully specify the desired data to stream
|
Output |
effectiveTopicName (string): the effective topic name that will be used to stream the desired data, or an empty string if there was an error. If the desired topic name is already in use for another type of publisher, then a new topic name is generated (i.e. "_2" appended). If the desired publisher is already enabled, then the topic name of that existing publisher is returned.
|
Description | Enables a subscriber (i.e. V-REP will be listening to data streaming on a specific topic). Subscribers can only be enabled while simulation is running. Subscribers can be disabled with simRosDisableSubscriber. At simulation end, all subscribers are automatically disabled. A subscriber can also be enabled using the ROS plugin's exported Lua function: simExtROS_enableSubscriber. See also simRosEnablePublisher. |
Input |
topicName (string): the desired topic name.
queueSize (int32): the desired queue size.
streamCmd (int32): the desired type of data to stream.
auxInt1 (int32): an auxiliary integer value (first) that might be needed to fully specify the desired data to stream
auxInt2 (int32): an auxiliary integer value (second) that might be needed to fully specify the desired data to stream
auxString (string): an auxiliary string value that might be needed to fully specify the desired data to stream
|
Output |
subscriberID (int32): a subscriber ID, or -1 in case of an error. The subscriber ID is needed to disable that subscriber with simRosDisableSubscriber.
|
Description | Closes and releases resources from a previous call to simRosDisplayDialog. 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). |
Input |
dialogHandle (int32): handle of generic dialog (return value of simRosDisplayDialog)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Erases a file on the server side. See also simRosTransferFile. |
Input |
fileName (string): the file to erase on the server side. For now, do not specify a path (the file will be erased in the V-REP installation directory)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Gets the value of a string signal, then clears it. Useful to retrieve continuous data from the server. See also simRosGetStringSignal.
Equivalent topic publishing command: simros_strmcmd_get_and_clear_string_signal
|
Input |
signalName (string): name of the signal
|
Output |
result (int32): -1 if operation was not successful, 0 if the signal does not exist. 1 otherwise.
signalValue (string): the value of the signal, which may contain any data (also embedded zeros).
|
Description | Retrieves 3 values from an array. See the array parameter identifiers. See also simRosSetArrayParameter, simRosGetBooleanParameter, simRosGetIntegerParameter, simRosGetFloatingParameter and simRosGetStringParameter.
Equivalent topic publishing command: simros_strmcmd_get_array_parameter
|
Input |
parameter (int32): an array parameter identifier
|
Output |
result (int32): -1 if operation was not successful
parameterValues (float32[]): the 3 parameter values
|
Description | Retrieves a boolean value. See the Boolean parameter identifiers. See also simRosSetBooleanParameter, simRosGetIntegerParameter, simRosGetFloatingParameter, simRosGetArrayParameter and simRosGetStringParameter.
Equivalent topic publishing command: simros_strmcmd_get_boolean_parameter
|
Input |
parameter (int32): a Boolean parameter identifier
|
Output |
parameterValue (int32): -1 if operation was not successful, otherwise the parameter value
|
Description | Retrieves a collision object handle based on its name. See also simRosGetObjectGroupData. |
Input |
collisionName (string): 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.
|
Output |
handle (int32): -1 if operation was not successful, otherwise the handle of the collision object
|
Description | Queries the text the user entered into a generic dialog box of style sim_dlgstyle_input. To be used after simRosDisplayDialog was called and after simRosGetDialogResult returned sim_dlgret_ok. |
Input |
dialogHandle (int32): handle of generic dialog (return value of simRosDisplayDialog)
|
Output |
result (int32): -1 if operation was not successful
input (string): the string the user entered.
|
Description | Queries the result of a dialog box. To be used after simRosDisplayDialog was called.
Equivalent topic publishing command: simros_strmcmd_get_dialog_result
|
Input |
dialogHandle (int32): handle of a generic dialog (return value of simRosDisplayDialog)
|
Output |
result (int32): -1 if operation was not successful, otherwise a dialog result value.
Note. If the result value is sim_dlgret_still_open, the dialog was not closed and no button was pressed. Otherwise, you should free resources with simRosEndDialog (the dialog might not be visible anymore, but is still present)
|
Description | Retrieves a distance object handle based on its name. See also simRosGetObjectGroupData. |
Input |
distanceName (string): 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.
|
Output |
handle (int32): -1 if operation was not successful, otherwise the handle of the distance object
|
Description | Retrieves a floating point value. See the floating-point parameter identifiers. See also simRosSetFloatingParameter, simRosGetBooleanParameter, simRosGetIntegerParameter, simRosGetArrayParameter and simRosGetStringParameter.
Equivalent topic publishing command: simros_strmcmd_get_floating_parameter
|
Input |
parameter (int32): a floating parameter identifier
|
Output |
result (int32): -1 if operation was not successful
parameterValue (float32): the parameter value
|
Description | Gets the value of a float signal. Signals are cleared at simulation start. See also simRosSetFloatSignal, simRosClearFloatSignal, simRosGetIntegerSignal and simRosGetStringSignal.
Equivalent topic publishing command: simros_strmcmd_get_float_signal
|
Input |
signalName (string): name of the signal
|
Output |
result (int32): -1 if operation was not successful, 0 if signal does not exist. 1 otherwise.
signalValue (float32): the value of the signal
|
Description | Retrieves basic information from the server (V-REP)
Equivalent streaming topic name: info
|
Input |
-
|
Output |
headerInfo (Header): header information
simulatorState (int32): the simulator state, bit-coded:
bit0 set: simulation not stopped
bit1 set: simulation paused
bit2 set: real-time switch on
bit3-bit5: the edit mode type (0=no edit mode, 1=triangle, 2=vertex, 3=edge, 4=path, 5=UI)
simulationTime (float32): the simulation time
timeStep (float32): the simulation time step
|
Description | Retrieves an integer value. See the integer parameter identifiers. See also simRosSetIntegerParameter, simRosGetBooleanParameter, simRosGetFloatingParameter, simRosGetArrayParameter and simRosGetStringParameter.
Equivalent topic publishing command: simros_strmcmd_get_integer_parameter
|
Input |
parameter (int32): an integer parameter identifier
|
Output |
result (int32): -1 if operation was not successful
parameterValue (int32): the parameter value
|
Description | Gets the value of an integer signal. Signals are cleared at simulation start. See also simRosSetIntegerSignal, simRosClearIntegerSignal, simRosGetFloatSignal and simRosGetStringSignal.
Equivalent topic publishing command: simros_strmcmd_get_integer_signal
|
Input |
signalName (string): name of the signal
|
Output |
result (int32): -1 if operation was not successful, 0 if signal does not exist. 1 otherwise.
signalValue (int32): the value of the signal
|
Description | Retrieves the intrinsic transform of a joint (the transformation caused by the joint movement). See also simRosSetSphericalJointMatrix. |
Input |
handle (int32): handle of the joint
|
Output |
result (int32): -1 if operation was not successful
transform (geometry_msgs/TransformationStamped): a transform. Refer to the ROS documentation
|
Description | Retrieves information about a joint's position, velocity and force (with the Bullet engine, the returned force or torque is the force or torque the joint motor exerts (forces/torques from joint limits are not taken into account). With the ODE engine, the total force or torque a joint exerts along/about its z-axis is returned). This function cannot be used with spherical joints (use simRosGetJointMatrix instead). See also simRosSetJointState, simRosSetJointPosition, simRosSetJointTargetPosition, simRosSetJointTargetVelocity, simRosSetJointForceand simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_get_joint_state
|
Input |
handle (int32): handle of the joint, or sim_handle_all to retrieve information of all joints in a scene
|
Output |
result (int32): -1 if operation was not successful
JointState (sensor_msgs/JointState): the joint state (position, velocity and force/torque). Refer to the ROS documentation.
|
Description | Retrieves the last 50 errors that occured on the server side, and clears the error buffer there. Only errors that occured because of ROS services will be reported. |
Input |
-
|
Output |
errorCnt (int32): -1 if operation was not successful, otherwise the number of error strings returned
errorStrings (string): the error strings (individual strings are separated by a zero character).
|
Description | Retrieves the properties of a model. See also simRosSetModelProperty. |
Input |
handle (int32): handle of the object
|
Output |
propertyValue (int32): -1 if operation was not successful, otherwise the model property value
|
Description | Retrieves the handle of an object's child object. See also simRosGetObjectParent. |
Input |
handle (int32): handle of the object
index (int32): 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
|
Output |
childHandle (int32): -1 if operation was not successful or there is no child at the given index, otherwise the handle of the child object.
|
Description | Retrieves a floating-point parameter of a object. See also simRosSetObjectFloatParameter and simRosGetObjectIntParameter.
Equivalent topic publishing command: simros_strmcmd_get_object_float_parameter
|
Input |
handle (int32): handle of the object
parameterID (int32): identifier of the parameter to retrieve. See the list of all possible object parameter identifiers
|
Output |
result (int32): -1 if operation was not successful
parameterValue (float32): pthe value of the parameter
|
Description | Simultaneously retrieves data of various objects in a V-REP scene.
Equivalent topic publishing command: simros_strmcmd_get_object_group_data
|
Input |
objectType (int32): a scene object type, or sim_appobj_object_type for all scene objects.
dataType (int32): the type of data that is desired:
0: retrieves the object names (in strings.)
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)
|
Output |
handles (int32[]): the object handles
intData (int32[]): the integer data
floatData (float32[]): the float data
strings (string[]): the strings
|
Description | Retrieves an object handle based on its name. See also simRosGetObjectGroupData. |
Input |
objectName (string): 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.
|
Output |
handle (int32): -1 if operation was not successful, otherwise the handle of the object
|
Description | Retrieves an integer parameter of a object. See also simRosSetObjectIntParameter and simRosGetObjectFloatParameter.
Equivalent topic publishing command: simros_strmcmd_get_object_int_parameter
|
Input |
handle (int32): handle of the object
parameterID (int32): identifier of the parameter to retrieve. See the list of all possible object parameter identifiers
|
Output |
result (int32): -1 if operation was not successful
parameterValue (int32): the value of the parameter
|
Description | Retrieves the handle of an object's parent object. See also simRosGetObjectChild and simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_get_object_parent
|
Input |
handle (int32): handle of the object
|
Output |
parentHandle (int32): -1 if operation was not successful, otherwise the handle of the parent object
|
Description | Retrieves the pose of an object (position and orientation). See also simRosSetObjectPose, simRosSetObjectPosition, simRosSetObjectQuaternionand simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_get_object_pose
|
Input |
handle (int32): handle of the object
relativeToObjectHandle (int32): 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
|
Output |
result (int32): -1 if operation was not successful
pose (geometry_msgs/PoseStamped): the object pose (position and quaternion). Refer to the ROS documentation.
|
Description | Retrieves object handles of a given type, or of all types (i.e. all object handles).
See also simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_get_objects
|
Input |
objectType (int32): object type (sim_object_shape_type, sim_object_joint_type, etc., or sim_handle_all for any type of object
|
Output |
result (int32): -1 if operation was not successful, otherwise the number of returned object
objectHandles (int32[]): the returned object handles.
|
Description | Retrieves all selected object's handles. See also simRosSetObjectSelection.
Equivalent topic publishing command: simros_strmcmd_get_object_selection
|
Input |
-
|
Output |
handles (int32[]): the selected object handles
|
Description | Retrieves a string value. See the string parameter identifiers. See also simRosGetBooleanParameter, simRosGetIntegerParameter, simRosGetArrayParameter and simRosGetFloatingParameter.
Equivalent topic publishing command: simros_strmcmd_get_string_parameter
|
Input |
parameter (int32): a string parameter identifier
|
Output |
result (int32): -1 if operation was not successful
parameterValue (string): the parameter value
|
Description | Gets the value of a string signal. Signals are cleared at simulation start. See also simRosSetStringSignal, simRosClearStringSignal, simRosGetIntegerSignal and simRosGetFloatSignal.
Equivalent topic publishing command: simros_strmcmd_get_string_signal
|
Input |
signalName (string): name of the signal
|
Output |
result (int32): -1 if operation was not successful, 0 if the signal does not exist. 1 otherwise.
signalValue (string): the value of the signal, which may contain any data (also embedded zeros).
|
Description | Retrieves the properties of a custom user interface button. See also simRosSetUIButtonProperty.
Equivalent topic publishing command: simros_strmcmd_get_ui_button_property
|
Input |
uiHandle (int32): handle of the custom user interface
buttonID (int32): handle (or id) of the custom user interface button
|
Output |
propertyValue (int32): -1 if operation was not successful, otherwise a button property value.
|
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.
Equivalent topic publishing command: simros_strmcmd_get_ui_event_button
|
Input |
uiHandle (int32): handle of the custom user interface
|
Output |
buttonID (int32): id of the UI button where an event occured, or -1 if no event occured or the operation was not successful
auxValues (int32[]): 2 values:
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)
|
Description | Retrieves the handle of a custom user interface. See also simRosGetObjectGroupData. |
Input |
uiName (string): 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.
|
Output |
handle (int32): -1 if operation was not successful, otherwise the handle
|
Description | Gets the slider position of a custom user interface button (must be slider-type button). See also simRosSetUISlider.
Equivalent topic publishing command: simros_strmcmd_get_ui_slider
|
Input |
uiHandle (int32): handle of the custom user interface
buttonID (int32): handle of a button inside the specified custom user interface
|
Output |
position (int32): -1 if operation was not successful, otherwise the slider position (value between 0 and 1000)
|
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). See also simRosGetVisionSensorImage.
Equivalent topic publishing command: simros_strmcmd_get_vision_sensor_depth_buffer
|
Input |
handle (int32): handle of the vision sensor
|
Output |
result (int32): -1 if operation was not successful
resolution (int32[]): 2 values for the resolution of the image
buffer (float32[]): the depth buffer data. Values are in the range of 0-1 (0=closest to sensor, 1=farthest from sensor).
|
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). See also simRosSetVisionSensorImage, simRosGetVisionSensorDepthBuffer and simRosReadVisionSensor.
Equivalent topic publishing command: simros_strmcmd_get_vision_sensor_image
|
Input |
handle (int32): handle of the vision sensor
options (uint8): image options, bit-coded:
bit0 set: each image pixel is a byte (greyscale image (MONO8)), otherwise each image pixel is a rgb byte-triplet (RGB8).
|
Output |
result (int32): -1 if operation was not successful
image (sensor_msgs/Image): the image. Refer to the ROS documentation
|
Description | Loads a previously saved model. See also simRosLoadUI, simRosLoadScene and simRosTransferFile. |
Input |
fileName (string): the model filename, including the path and extension ("ttm"). The file is relative to the server system (V-REP application)
|
Output |
result (int32): -1 if operation was not successful
baseHandle (int32): the loaded model base.
|
Description | Loads a previously saved scene. Should only be called when simulation is not running. See also simRosCloseScene, simRosLoadModel, simRosLoadUI and simRosTransferFile. |
Input |
fileName (string): the scene filename, including the path and extension ("ttt"). The file is relative to the server system (V-REP application)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Loads previously saved custom user interfaces. See also simRosLoadModel, simRosLoadScene and simRosTransferFile. |
Input |
fileName (string): the ui filename, including the path and extension ("ttb"). The file is relative to the server system (V-REP application)
|
Output |
result (int32): -1 if operation was not successful
uiHandles (int32[]): the loaded UI handles.
|
Description | Requests a pause of a simulation. See also simRosStartSimulation and simRosStopSimulation. |
Input | |
Output |
result (int32): -1 if operation was not successful
|
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 simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_read_collision
|
Input |
handle (int32): handle of the collision object
|
Output |
collisionState (int32): -1 if operation was not successful, otherwise the collision state
|
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 simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_read_distance
|
Input |
handle (int32): handle of the distance object
|
Output |
result (int32): -1 if operation was not successful
distance (float32): the minimum distance
|
Description | Reads the force and torque applied to a force sensor (filtered values are read), and its current state ('unbroken' or 'broken'). See also simRosBreakForceSensor, simRosGetJointStateand simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_read_force_sensor
|
Input |
handle (int32): handle of the force sensor
|
Output |
result (int32): -1 if operation was not successful, otherwise bit-coded value:
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')
force (geometry_msgs/Vector3): the force vector
torque (geometry_msgs/Vector3): the torque vector
|
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 simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_read_proximity_sensor
|
Input |
handle (int32): handle of the proximity sensor
|
Output |
result (int32): -1 if operation was not successful, otherwise the detection state
detectedPoint (float32[]): the detected point coordinates (relative to the sensor reference frame).
detectedObject (int32): the handle of the detected object.
normalVector (float32[]): the normal vector (normalized) of the detected surface. Relative to the sensor reference frame.
|
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 simRosGetVisionSensorImageand simRosGetObjectGroupData. Equivalent topic publishing command: simros_strmcmd_read_vision_sensor
|
Input |
handle (int32): handle of the vision sensor
|
Output |
result (int32): -1 if operation was not successful, otherwise the detection state (trigger state)
packetData (float32[]): 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.
packetSizes (int32[]): contains information about the packet sizes. The first value is the size of packet 1, the second value the size of packet 2, etc.
|
Description | Removes a scene object. |
Input |
handle (int32): handle of the object to remove
|
Output |
result (int32): -1 if operation was not successful
|
Description | Removes a custom user interface. |
Input |
handle (int32): handle of the custom user interface
|
Output |
result (int32): -1 if operation was not successful
|
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). See also simRosRMLVelocity. |
Input |
dofs (int32): the number of degrees of freedom
timeStep (float64): the cycle time
flags (int32): RML flags. -1 for default flags.
currentPosVelAccel (float64[]): the current position, velocity and acceleration. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
maxVelAccelJerk (float64[]): the maximum allowed velocity, acceleration and jerk. Arrange values as {vel1,vel2,..,velN,accel1,accel2,..,accelN,jerk1,jerk2,..,jerkN}
selection (uint8[]): the selection vector (one value for each DoF)
targetPosVel (float64[]): the target position and velocity. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN}
|
Output |
result (int32): -42 if the corresponding plugin could not be found, -43 if there is an error in argument, otherwise the return value of function RMLPosition in the library (0=final state not yet reached, 1=final state reached, otherwise an error code)
newPosVelAccel (float64[]): the new position, velocity and acceleration. Values are arranged as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
|
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 (RMLPosition). See also simRosRMLPosition. |
Input |
dofs (int32): the number of degrees of freedom
timeStep (float64): the cycle time
flags (int32): RML flags. -1 for default flags.
currentPosVelAccel (float64[]): the current position, velocity and acceleration. Arrange values as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
maxAccelJerk (float64[]): the maximum allowed acceleration and jerk. Arrange values as {accel1,accel2,..,accelN,jerk1,jerk2,..,jerkN}
selection (uint8[]): the selection vector (one value for each DoF)
targetVel (float64[]): the target velocity (one value for each DoF)
|
Output |
result (int32): -42 if the corresponding plugin could not be found, -43 if there is an error in argument, otherwise the return value of function RMLVelocity in the library (0=final state not yet reached, 1=final state reached, otherwise an error code)
newPosVelAccel (float64[]): the new position, velocity and acceleration. Values are arranged as {pos1,pos2,..,posN,vel1,vel2,..,velN,accel1,accel2,..,accelN}
|
Description | Sets 3 values of an array parameter. See also simRosGetArrayParameter, simRosSetBooleanParameter, simRosSetIntegerParameter and simRosSetFloatingParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_array_parameter
|
Input |
parameter (int32): an array parameter identifier
parameterValues (float32[]): the array containing the 3 values to set
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets a boolean parameter. See also simRosGetBooleanParameter, simRosSetIntegerParameter, simRosSetArrayParameter and simRosSetFloatingParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_boolean_parameter
|
Input |
parameter (int32): a Boolean parameter identifier
parameterValue (uint8): the parameter value
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets a floating point parameter. See also simRosGetFloatingParameter, simRosSetBooleanParameter, simRosSetArrayParameter and simRosSetIntegerParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_floating_parameter
|
Input |
parameter (int32): a floating parameter identifier
parameterValue (float32): the parameter value
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the value of a float signal. If that signal is not yet present, it is added. See also simRosGetFloatSignal, simRosClearFloatSignal, simRosSetIntegerSignal and simRosSetStringSignal.
Equivalent topic subscribtion command: simros_strmcmd_set_float_signal
|
Input |
signalName (string): name of the signal
signalValue (float32): value of the signal
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets an integer parameter. See also simRosGetIntegerParameter, simRosSetBooleanParameter, simRosSetArrayParameter and simRosSetFloatingParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_integer_parameter
|
Input |
parameter (int32): an integer parameter identifier
parameterValue (int32): the parameter value
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the value of an integer signal. If that signal is not yet present, it is added. See also simRosGetIntegerSignal, simRosClearIntegerSignal, simRosSetFloatSignal and simRosSetStringSignal.
Equivalent topic subscribtion command: simros_strmcmd_set_integer_signal
|
Input |
signalName (string): name of the signal
signalValue (int32): value of the signal
|
Output |
result (int32): -1 if operation was not successful
|
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 simRosSetJointState and simRosGetJointState.
Equivalent topic subscribtion command: simros_strmcmd_set_joint_force
|
Input |
handle (int32): handle of the joint
forceOrTorque (float64): the maximum force or torque that the joint can exert
|
Output |
result (int32): -1 if operation was not successful
|
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 simRosSetSphericalJointMatrix instead). See also simRosSetJointState, simRosGetJointState and simRosSetJointTargetPosition.
Equivalent topic subscribtion command: simros_strmcmd_set_joint_position
|
Input |
handle (int32): handle of the joint
position (float64): position of the joint (angular or linear value depending on the joint type)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Allows setting the state of several joints at the same time. You can set a joint's position, target position (when in position control mode), target velocity (when in velocity mode), or maximum force. This function cannot be used with spherical joints (use simRosSetSphericalJointMatrix instead). See also simRosGetJointState, simRosSetJointPosition, simRosSetJointTargetPosition, simRosSetJointTargetVelocity and simRosSetJointForce. Equivalent topic subscription command: simros_strmcmd_set_joint_state
|
Input |
handles (int32[]): handles of the joints. For each handle there must be a specific setMode and value to set.
setModes (int32[]): joint set modes:
0: sets the position
1: sets the target position (when joint is dynamically enabled and in position control)
2: sets the target velocity (when joint is dynamically enabled without position control, or when joint is in velocity mode)
3: sets the maximum force/torque that the joint can exert
values (float32[]): values to set
|
Output |
result (int32): -1 if operation was not successful, otherwise the number of successfully set joint values
|
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 simRosSetJointState and simRosSetJointPosition.
Equivalent topic subscribtion command: simros_strmcmd_set_joint_target_position
|
Input |
handle (int32): handle of the joint
targetPosition (float64): target position of the joint (angular or linear value depending on the joint type)
|
Output |
result (int32): -1 if operation was not successful
|
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).
See also simRosSetJointState. Equivalent topic subscribtion command: simros_strmcmd_set_joint_target_velocity
|
Input |
handle (int32): handle of the joint
targetVelocity (float64): target velocity of the joint (linear or angular velocity depending on the joint-type)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the properties of a model. See also simRosGetModelProperty. |
Input |
handle (int32): handle of the object
propertyValue (int32): a model property value
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets a floating-point parameter of a object. See also simRosGetObjectFloatParameter and simRosSetObjectIntParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_object_float_parameter
|
Input |
handle (int32): handle of the object
parameter (int32): identifier of the parameter to set. See the list of all possible object parameter identifiers
parameterValue (float32): the desired value of the parameter
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets an integer parameter of a object. See also simRosGetObjectIntParameter and simRosSetObjectFloatParameter.
Equivalent topic subscribtion command: simros_strmcmd_set_object_int_parameter
|
Input |
handle (int32): handle of the object
parameter (int32): identifier of the parameter to set. See the list of all possible object parameter identifiers
parameterValue (int32): the desired value of the parameter
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets an object's parent object. See also simRosGetObjectParent. |
Input |
handle (int32): handle of the object that will become child of the parent object
parentHandle (int32): handle of the object that will become parent, or -1 if the object should become parentless
keepInPlace (uint8): indicates whether the object's absolute position and orientation should stay same
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the pose (position and orientation) 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 simRosGetObjectPose, simRosSetObjectPosition, and simRosSetObjectQuaternion. Equivalent topic subscribtion command: simros_strmcmd_set_object_pose
|
Input |
handle (int32): handle of the object
relativeToObjectHandle (int32): indicates relative to which reference frame the pose is specified. Specify -1 to set the absolute pose, sim_handle_parent to set the posed relative to the object's parent, or an object handle relative to whose reference frame the pose is specified.
pose (geometry_msgs/Pose): the desired pose. Refer to the ROS documentation
|
Output |
result (int32): -1 if operation was not successful
|
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 simRosGetObjectPose ,simRosSetObjectPose, and simRosSetObjectQuaternion.
Equivalent topic subscribtion command: simros_strmcmd_set_object_position
|
Input |
handle (int32): handle of the object
relativeToObjectHandle (int32): 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 (geometry_msgs/Point): the position. Refer to the ROS documentation
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the quaternion (x,y,z,w) of an object. Make sure to set a valid quaternion, otherwise you might experience strange behaviours. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling simResetDynamicObject just before). See also simRosGetObjectPose, simRosSetObjectPose and simRosSetObjectPosition.
Equivalent topic subscribtion command: simros_strmcmd_set_object_quaternion
|
Input |
handle (int32): handle of the object
relativeToObjectHandle (int32): 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.
quaternion (geometry_msgs/Quaternion): the quaternion (x,y,z,w). Refer to the ROS documentation
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the selection state for objects. See also simRosGetObjectSelection.
Equivalent topic subscribtion command: simros_strmcmd_set_object_selection
|
Input |
handles (int32[]): the object handles
|
Output |
result (int32): -1 if operation was not successful, otherwise the number of selected objects
|
Description | Sets the intrinsic orientation matrix of a spherical joint object. This function cannot be used with non-spherical joints (use simRosSetJointPosition instead). See also simRosGetJointMatrix. |
Input |
handle (int32): handle of the joint
quaternion (geometry_msgs/Quaternion): the orientation. Refer to the ROS documentation
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the value of a string signal. If that signal is not yet present, it is added. See also simRosAppendStringSignal, simRosGetStringSignal, simRosClearStringSignal, simRosSetIntegerSignal and simRosSetFloatSignal.
Equivalent topic subscribtion command: simros_strmcmd_set_string_signal
|
Input |
signalName (string): name of the signal
signalValue (string): value of the signal (which may contain any value, including embedded zeros)
|
Output |
result (int32): -1 if operation was not successful
|
Description | Appends a string to a string signal. If that signal is not yet present, it is added. See also simRosSetStringSignal.
Equivalent topic subscribtion command: simros_strmcmd_append_string_signal
|
Input |
signalName (string): name of the signal
signalValue (string): string to append to the string signal. That string may contain any value, including embedded zeros.
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the up-state and down-state labels of a custom user interface button.
Equivalent topic subscribtion command: simros_strmcmd_set_ui_button_label
|
Input |
uiHandle (int32): handle of the custom user interface
buttonID (int32): handle (or ID) of the custom user interface button
upStateLabel (string): the label of the button when it is up.
downStateLabel (string): the label of the button when it is down.
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the properties of a custom user interface button. See also simRosGetUIButtonProperty.
Equivalent topic subscribtion command: simros_strmcmd_set_ui_button_property
|
Input |
uiHandle (int32): handle of the custom user interface
buttonID (int32): handle (or ID) of the custom user interface button
propertyValue (int32): a button property value.
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sets the slider position of a custom user interface button (must be a slider-type button). See also simRosGetUISlider.
Equivalent topic subscribtion command: simros_strmcmd_set_ui_slider
|
Input |
uiHandle (int32): handle of the custom user interface
buttonID (int32): id of the button (slider) in the custom user interface
position (int32): slider position. valid values are between 0 and 1000
|
Output |
result (int32): -1 if operation was not successful
|
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 simRosGetVisionSensorImage, 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.
Make sure the image data corresponds to the vision sensor's resolution. Equivalent topic subscribtion command: simros_strmcmd_set_vision_sensor_image
|
Input |
handle (int32): handle of the vision sensor
image (sensor_msgs/Image): the image. Has to be the same resolution as the vision sensor. Supported formats are RGB8 and MONO8. Refer to the ROS documentation
|
Output |
result (int32): -1 if operation was not successful
|
Description | Requests a start of a simulation (or a resume of a paused simulation). See also simRosPauseSimulation and simRosStopSimulation. |
Input | |
Output |
result (int32): -1 if operation was not successful
|
Description | Requests a stop of the running simulation. See also simRosStartSimulation and simRosPauseSimulation. |
Input |
-
|
Output |
result (int32): -1 if operation was not successful
|
Description | Enables or disables the synchronous operation mode. While in synchronous operation mode, the client application is in charge of triggering the next simulation step. This function should only be called when simulation is not running. See also simRosSynchronousTrigger. |
Input |
enable (uint8): the enable state of the synchronous operation
|
Output |
result (int32): -1 if operation was not successful
|
Description | Sends a synchronization trigger signal to the server. The server needs to be previously enabled for synchronous operation via the simRosSynchronous 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. |
Input |
-
|
Output |
result (int32): -1 if operation was not successful
|
Description | Allows transferring a file from the client to the server. See also simRosEraseFile. |
Input |
data (uint8[]): the file content (i.e. its data)
fileName (string): 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 V-REP directory)
|
Output |
result (int32): -1 if operation was not successful
|