B0-based remote API, Java
BlueZero is deprecated. We highly recommend using the ZeroMQ remote API instead.
simxAddDrawingObject_cubes
Description |
Displays cubes in the scene |
synopsis |
public MessageUnpacker simxAddDrawingObject_cubes(float size, final int[] color, final float[] coords, final String topic)
|
Parameters |
size: The size of the cubes
color: The RGB color of the cubes (0-255). Specify negative values for emissive color
coords: The coordinates for the cubes to display (3 per cube)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created drawing object
|
See also |
|
Other languages |
|
simxAddDrawingObject_points
Description |
Displays points in the scene |
synopsis |
public MessageUnpacker simxAddDrawingObject_points(int size, final int[] color, final float[] coords, final String topic)
|
Parameters |
size: The pixel size of the points
color: The RGB color of the points (0-255). Specify negative values for emissive color
coords: The coordinates for the points to display (3 per point)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created drawing object
|
See also |
|
Other languages |
|
simxAddDrawingObject_segments
Description |
Displays line segments in the scene |
synopsis |
public MessageUnpacker simxAddDrawingObject_segments(int lineSize, final int[] color, final float[] segments, final String topic)
|
Parameters |
lineSize: The size of the segments, in pixels
color: The RGB color of the cubes (0-255). Specify negative values for emissive color
segments: The coordinates for the segments to display (6 per segment)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created drawing object
|
See also |
|
Other languages |
|
simxAddDrawingObject_spheres
Description |
Displays spheres in the scene |
synopsis |
public MessageUnpacker simxAddDrawingObject_spheres(float size, final int[] color, final float[] coords, final String topic)
|
Parameters |
size: The size of the spheres
color: The RGB color of the spheres (0-255). Specify negative values for emissive color
coords: The coordinates for the spheres to display (3 per sphere)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created drawing object
|
See also |
|
Other languages |
|
simxAddDrawingObject_triangles
Description |
Displays triangles in the scene |
synopsis |
public MessageUnpacker simxAddDrawingObject_triangles(final int[] color, final float[] triangles, final String topic)
|
Parameters |
color: The RGB color of the triangles (0-255). Specify negative values for emissive color
triangles: The coordinates for the triangles to display (9 per triangle)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created drawing object
|
See also |
|
Other languages |
|
simxAddStatusbarMessage
Description |
Adds a message to the status bar |
synopsis |
public MessageUnpacker simxAddStatusbarMessage(final String msg, final String topic)
|
Parameters |
msg: The message to display
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxAuxiliaryConsoleClose
Description |
Closes an auxiliary console window |
synopsis |
public MessageUnpacker simxAuxiliaryConsoleClose(int consoleHandle, final String topic)
|
Parameters |
consoleHandle: The handle of the console window
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the console doesn't exist (anymore), 1 if the console window was closed
|
See also |
|
Other languages |
|
simxAuxiliaryConsoleOpen
Description |
Opens an auxiliary console window for text display |
synopsis |
public MessageUnpacker simxAuxiliaryConsoleOpen(final String title, int maxLines, int mode, final int[] position, final int[] size, final int[] textColor, final int[] backgroundColor, final String topic)
|
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)
size: The initial size of the console window (x and y value)
textColor: The color of the text (rgb values, 0-255)
backgroundColor: The background color of the window (rgb values, 0-255)
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created console window
|
See also |
|
Other languages |
|
simxAuxiliaryConsolePrint
Description |
Prints to an auxiliary console window |
synopsis |
public MessageUnpacker simxAuxiliaryConsolePrint(int consoleHandle, final String text, final String topic)
|
Parameters |
consoleHandle: The handle of the console window
text: The text to append, or the empty string to clear the console window
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the console doesn't exist (anymore), 1 if the operation was successful
|
See also |
|
Other languages |
|
simxAuxiliaryConsoleShow
Description |
Shows or hides an auxiliary console window |
synopsis |
public MessageUnpacker simxAuxiliaryConsoleShow(int consoleHandle, bool showState, final String topic)
|
Parameters |
consoleHandle: The handle of the console window
showState: The show state of the console window
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the console doesn't exist (anymore), 1 if the console window's show state was changed
|
See also |
|
Other languages |
|
simxCallScriptFunction
Description |
Calls a script function inside of CoppeliaSim (i.e. server side) |
synopsis |
public MessageUnpacker simxCallScriptFunction(final String funcAtScriptName, int/String scriptType, final byte[] funcArgs, final String topic)
|
Parameters |
funcAtScriptName: A string representing the function name. If scriptType is sim.scripttype_childscript or sim.scripttype_customizationscript, then append a '@' followed by the path to the scene object the script is attached to, e.g. func@/path/to/object. If scriptType is sim.scripttype_addonscript, then append a '@' followed by the name of the add-on, e.g. func@Isometric scaling.
scriptType: The type of the script (specified as number or string). E.g. "sim.scripttype_mainscript" is a valid string argument that will be evaluated on the server side. See also simxEvaluateToInt
funcArgs: The function arguments, packed in a messagePack message
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (?): The first return value of the called function
item3 (?): The second return value of the called function
item4 (?): etc.
|
See also |
|
Other languages |
|
simxCheckCollision
Description |
Checks whether two collidable entities are colliding |
synopsis |
public MessageUnpacker simxCheckCollision(int entity1, int/String entity2, final String topic)
|
Parameters |
entity1: The handle of the first entity
entity2: The handle of the second entity. Can also be the "sim.handle_all" string, to check entity1 against all other collidable objects. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The collision state of the object
|
See also |
|
Other languages |
|
simxCheckDistance
Description |
Computes the minimum distance between two measurable entities |
synopsis |
public MessageUnpacker simxCheckDistance(int entity1, int/String entity2, float threshold, final String topic)
|
Parameters |
entity1: The handle of the first entity
entity2: The handle of the second entity. Can also be the "sim.handle_all" string, to check entity1 against all other measurable objects. See also simxEvaluateToInt
threshold: If distance is bigger than the threshold, the distance is not calculated. If threshold is 0 or negative, then no threshold is used
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 is distance is larger than the threshold, 1 otherwise
item3 (float): The minimum distance
item4 (float[3]): The first point of the minimum distance segment
item5 (float[3]): The second point of the minimum distance segment
|
See also |
|
Other languages |
|
simxCheckProximitySensor
Description |
Computes the detection state of a proximity sensor, for a specific detectable entity |
synopsis |
public MessageUnpacker simxCheckProximitySensor(int handle, int/String entity, final String topic)
|
Parameters |
handle: The handle of the proximity sensor
entity: The handle of the entity to detect. Can also be the "sim.handle_all" string, to check all detectable entities. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): detection state (0 or 1)
item3 (float): The distance to the detected point
item4 (float[3]): The detected point relative to the sensor frame
|
See also |
|
Other languages |
|
simxCheckVisionSensor
Description |
Computes the detection state of a vision sensor, for a specific entity |
synopsis |
public MessageUnpacker simxCheckVisionSensor(int handle, int/String entity, final String topic)
|
Parameters |
handle: The handle of the vision sensor
entity: The handle of the entity to detect. Can also be the "sim.handle_all" string, to check all objects. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): detection state (0 or 1)
item3 (float): The distance to the detected point
item4 (float[3]): The detected point relative to the sensor frame
|
See also |
|
Other languages |
|
simxClearFloatSignal
Description |
Clears a float signal (removes it) |
synopsis |
public MessageUnpacker simxClearFloatSignal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxClearInt32Signal
Description |
Clears an int signal (removes it) |
synopsis |
public MessageUnpacker simxClearInt32Signal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxClearStringSignal
Description |
Clears a string signal (removes it) |
synopsis |
public MessageUnpacker simxClearStringSignal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxCloseScene
Description |
Closes current scene, and switches to another open scene |
synopsis |
public MessageUnpacker simxCloseScene(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxCopyPasteObjects
Description |
Duplicates objects |
synopsis |
public MessageUnpacker simxCopyPasteObjects(final int[] objectHandles, int options, final String topic)
|
Parameters |
objectHandles: The handles of the objects to copy and paste
options: Bit-coded. If bit0 is set (i.e. 1), then whole models will be copied
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[]): handles of the duplicates
|
See also |
|
Other languages |
|
simxCreateDummy
Description |
Creates a dummy object in the scene |
synopsis |
public MessageUnpacker simxCreateDummy(float size, final int[] color, final String topic)
|
Parameters |
size: The size of the dummy
color: The RGB color of the dummy (0-255). Specify negative values for emissive color
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the created dummy
|
See also |
|
Other languages |
|
simxCreatePublisher
Description |
Creates a custom publisher topic, and returns it |
synopsis |
final String simxCreatePublisher(bool dropMessages = false)
|
Parameters |
dropMessages: Whether some messages will be dropped if a queue is forming. In that case, the freshest messages will be retained
|
return |
The topic of the created publisher
|
See also |
|
Other languages |
|
simxCreateSubscriber
Description |
Creates a custom subscriber topic, and returns it |
synopsis |
final String simxCreateSubscriber(final Consumer callBackFunc, int publishInterval = 1, bool dropMessages = false)
|
Parameters |
callBackFunc: The callback function for the subscriber
publishInterval: The rate (in terms of simulation loops) at which the server (i.e. CoppeliaSim) should publish the message
dropMessages: Whether some messages will be dropped if a queue is forming. In that case, the freshest message will be retained
|
return |
The default subscriber topic
|
See also |
|
Other languages |
|
simxDefaultPublisher
Description |
Returns the topic for the default publisher |
synopsis |
final String simxDefaultPublisher()
|
Parameters |
|
return |
The default publisher topic
|
See also |
|
Other languages |
|
simxDefaultSubscriber
Description |
Returns the topic for the default subscriber |
synopsis |
final String simxDefaultSubscriber(final Consumer callBackFunc, int publishInterval = 1)
|
Parameters |
callBackFunc: The callback function for the subscriber
publishInterval: The rate (in terms of simulation loops) at which the server (i.e. CoppeliaSim) should publish the message
|
return |
The default subscriber topic
|
See also |
|
Other languages |
|
simxDisplayDialog
Description |
Displays a generic dialog box |
synopsis |
public MessageUnpacker simxDisplayDialog(final String titleText, final String mainText, int/String dialogType, final String inputText, final String topic)
|
Parameters |
titleText: The title bar text
mainText: The information text
inputText: The initial text in the edit box if the dialog is an input dialog
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the dialog
|
See also |
|
Other languages |
|
simxEndDialog
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 |
synopsis |
public MessageUnpacker simxEndDialog(int handle, final String topic)
|
Parameters |
handle: The handle of the generic dialog
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxEvaluateToInt
Description |
Evaluates a Lua expression to an integer, on the server side, e.g. sim.object_proximitysensor_type would evaluate to 5, 25+42 would evaluate to 67 |
synopsis |
public MessageUnpacker simxEvaluateToInt(final String str, final String topic)
|
Parameters |
str: The Lua expression to evaluate
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): the integer value of the evaluated Lua expression
|
See also |
|
Other languages |
|
simxEvaluateToStr
Description |
Evaluates a Lua expression to a string, on the server side, e.g. string.gsub("Hello World", "World", "Paul") would evaluate to Hello Paul |
synopsis |
public MessageUnpacker simxEvaluateToStr(final String str, final String topic)
|
Parameters |
str: The Lua expression to evaluate
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (string): the string value of the evaluated Lua expression
|
See also |
|
Other languages |
|
simxExecuteScriptString
Description |
Executes a Lua string (i.e. runs the code) |
synopsis |
public MessageUnpacker simxExecuteScriptString(final String code, final String topic)
|
Parameters |
code: The string to execute
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (?): The first return value of the executed string
item3 (?): The second return value of the executed string
item4 (?): etc.
|
See also |
|
Other languages |
|
simxGetArrayParam
Description |
Retrieves a array parameter |
synopsis |
public MessageUnpacker simxGetArrayParam(int/String paramId, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.arrayparam_gravity". See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[3]): The value of the parameter
|
See also |
|
Other languages |
|
simxGetBoolParam
Description |
Retrieves a bool parameter |
synopsis |
public MessageUnpacker simxGetBoolParam(int/String paramId, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.boolparam_dynamics_handling_enabled". See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The value of the parameter
|
See also |
|
Other languages |
|
simxGetCollectionHandle
Description |
This is a convenience function. Since CoppeliaSim V4.2.0, collections should be dynamically created and do not have a name anymore. This function will first try to retrieve a static collection with the specified name (for backward compatibility's sake). If such a collection does not exist, it will try to return the integer signal with the specified name. |
synopsis |
public MessageUnpacker simxGetCollectionHandle(final String collectionName, final String topic)
|
Parameters |
collectionName: Name of the collection. If the name is appended by a "@silentError" suffix, then no error will be output if the collection does not exist
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the collection
|
Other languages |
|
simxGetCollisionHandle
Description |
Deprecated. See simxCheckCollision instead. |
synopsis |
public MessageUnpacker simxGetCollisionHandle(final String nameOfObject, final String topic)
|
Parameters |
nameOfObject: The name of the collision object. If the name is appended by a "@silentError" suffix, then no error will be output if the collision object does not exist
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the collision object
|
See also |
|
Other languages |
|
simxGetDialogInput
Description |
Queries the input of a generic dialog box |
synopsis |
public MessageUnpacker simxGetDialogInput(int handle, final String topic)
|
Parameters |
handle: The handle of the generic dialog
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (string): The input text
|
See also |
|
Other languages |
|
simxGetDialogResult
Description |
Queries the result of a generic dialog box |
synopsis |
public MessageUnpacker simxGetDialogResult(int handle, final String topic)
|
Parameters |
handle: The handle of the generic dialog
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxGetDistanceHandle
Description |
Deprecated. See simxCheckDistance instead. |
synopsis |
public MessageUnpacker simxGetDistanceHandle(final String nameOfObject, final String topic)
|
Parameters |
nameOfObject: The name of the distance calculation object. If the name is appended by a "@silentError" suffix, then no error will be output if the distance object does not exist
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the distance calculation object
|
See also |
|
Other languages |
|
simxGetFloatParam
Description |
Retrieves a float parameter |
synopsis |
public MessageUnpacker simxGetFloatParam(int/String paramId, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.floatparam_simulation_time_step". See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The value of the parameter
|
See also |
|
Other languages |
|
simxGetFloatSignal
Description |
Retrieves a float signal |
synopsis |
public MessageUnpacker simxGetFloatSignal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The value of the signal, or nil if the signal does not exist
|
See also |
|
Other languages |
|
simxGetInt32Param
Description |
Retrieves an integer parameter |
synopsis |
public MessageUnpacker simxGetInt32Param(int/String paramId, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.intparam_program_version". See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The value of the parameter
|
See also |
|
Other languages |
|
simxGetInt32Signal
Description |
Retrieves an int signal |
synopsis |
public MessageUnpacker simxGetInt32Signal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The value of the signal, or nil if the signal does not exist
|
See also |
|
Other languages |
|
simxGetJointForce
Description |
Retrieves the force or torque applied to a joint along/about its active axis |
synopsis |
public MessageUnpacker simxGetJointForce(int jointHandle, final String topic)
|
Parameters |
jointHandle: The handle of the joint
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The force or the torque applied to the joint along/about its z-axis, or nil if no value is available yet
|
See also |
|
Other languages |
|
simxGetJointMaxForce
Description |
Retrieves the maximum force or torque that a joint can exert |
synopsis |
public MessageUnpacker simxGetJointMaxForce(int jointHandle, final String topic)
|
Parameters |
jointHandle: The handle of the joint
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The maximum force or torque that the joint can exert
|
See also |
|
Other languages |
|
simxGetJointPosition
Description |
Retrieves the intrinsic position of a joint |
synopsis |
public MessageUnpacker simxGetJointPosition(int jointHandle, final String topic)
|
Parameters |
jointHandle: The handle of the joint
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The position of the joint, in radians or meters
|
See also |
|
Other languages |
|
simxGetJointTargetPosition
Description |
Retrieves the target position of a joint |
synopsis |
public MessageUnpacker simxGetJointTargetPosition(int jointHandle, final String topic)
|
Parameters |
jointHandle: The handle of the joint
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The target position of the joint, in radians or meters
|
See also |
|
Other languages |
|
simxGetJointTargetVelocity
Description |
Retrieves the target velocity of a joint |
synopsis |
public MessageUnpacker simxGetJointTargetVelocity(int jointHandle, final String topic)
|
Parameters |
jointHandle: The handle of the joint
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The target velocity of the joint, in radians/s or meters/s
|
See also |
|
Other languages |
|
simxGetObjectAlias
Description |
Retrieves the path/alias of an object |
synopsis |
public MessageUnpacker simxGetObjectAlias(int objectHandle, int options, final String topic)
|
Parameters |
objectHandle: Handle of the object
options: Value indicating how the return value is formatted. Check the regular API equivalent for details
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (string): The path/alias of the object
|
See also |
|
Other languages |
|
simxGetObjectChild
Description |
Retrieves the handle of an object's child object |
synopsis |
public MessageUnpacker simxGetObjectChild(int objectHandle, int index, final String topic)
|
Parameters |
objectHandle: The handle of the object
index: The zero-based index of the child's position. To retrieve all children of an object, call the function by increasing the index until the return value is -1
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the child, or -1 if there is no child at the given index position
|
See also |
|
Other languages |
|
simxGetObjectFloatParam
Description |
Retrieves a floating point parameter of an object |
synopsis |
public MessageUnpacker simxGetObjectFloatParam(int objectHandle, int/String parameterID, final String topic)
|
Parameters |
objectHandle: Handle of the object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The retrieved parameter
|
See also |
|
Other languages |
|
simxGetObjectHandle
Description |
Retrieves the handle of an object |
synopsis |
public MessageUnpacker simxGetObjectHandle(final String objectPath, final String topic)
|
Parameters |
objectPath: Path and alias of object.
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the object
|
See also |
|
Other languages |
|
simxGetObjectInt32Param
Description |
Retrieves an integer parameter of an object |
synopsis |
public MessageUnpacker simxGetObjectInt32Param(int objectHandle, int/String parameterID, final String topic)
|
Parameters |
objectHandle: Handle of the object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The retrieved parameter
|
See also |
|
Other languages |
|
simxGetObjectMatrix
Description |
Retrieves the transformation matrix of an object |
synopsis |
public MessageUnpacker simxGetObjectMatrix(int objectHandle, int/String relObjHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the matrix. Specify -1 to retrieve the absolute matrix, "sim.handle_parent" to retrieve the matrix relative to the object's parent, or an object handle relative to whose reference frame you want the matrix. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[12]): The (Xx,Yx,Zx,Px,Xy,Yy,Zy,Py,Xz,Yz,Zz,Pz) transformation matrix of the object
|
See also |
|
Other languages |
|
simxGetObjectOrientation
Description |
Retrieves the Euler angles orientation of an object |
synopsis |
public MessageUnpacker simxGetObjectOrientation(int objectHandle, int/String relObjHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[3]): The (alpha,beta,gamma) Euler angles of the object
|
See also |
|
Other languages |
|
simxGetObjectParent
Description |
Retrieves the handle of an object's parent object |
synopsis |
public MessageUnpacker simxGetObjectParent(int objectHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the parent, or -1 if the object has no parent
|
See also |
|
Other languages |
|
simxGetObjectPose
Description |
Retrieves the position and quaternion of an object |
synopsis |
public MessageUnpacker simxGetObjectPose(int objectHandle, int/String relObjHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame we want the pose. Specify -1 to retrieve the absolute pose, "sim.handle_parent" to retrieve the pose relative to the object's parent, or an object handle relative to whose reference frame you want the pose. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[7]): The (X,Y,Z,Qx,Qy,Qz,Qw) pose of the object
|
See also |
|
Other languages |
|
simxGetObjectPosition
Description |
Retrieves the position of an object |
synopsis |
public MessageUnpacker simxGetObjectPosition(int objectHandle, int/String relObjHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[3]): The (X,Y,Z) position of the object
|
See also |
|
Other languages |
|
simxGetObjectQuaternion
Description |
Retrieves the quaternion orientation of an object |
synopsis |
public MessageUnpacker simxGetObjectQuaternion(int objectHandle, int/String relObjHandle, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[4]): The (Qx,Qy,Qz,Qw) quaternion of the object
|
See also |
|
Other languages |
|
simxGetObjectSelection
Description |
Retrieves all selected object handles |
synopsis |
public MessageUnpacker simxGetObjectSelection(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[]): The handles of the selected objects
|
See also |
|
Other languages |
|
simxGetObjectStringParam
Description |
Retrieves a string parameter of an object |
synopsis |
public MessageUnpacker simxGetObjectStringParam(int objectHandle, int/String parameterID, final String topic)
|
Parameters |
objectHandle: Handle of the object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (string): The retrieved parameter
|
See also |
|
Other languages |
|
simxGetObjectVelocity
Description |
Reads the linear and angular velocity of an object. The velocity is a measured velocity (i.e. from one simulation step to the next) |
synopsis |
public MessageUnpacker simxGetObjectVelocity(int handle, final String topic)
|
Parameters |
handle: The handle of the object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float[3]): The linear velocity
item3 (float[3]): The angular velocity vector, i.e. its direction represents the rotation axis, its length the rotation velocity
|
See also |
|
Other languages |
|
simxGetObjects
Description |
Retrieves object handles from the scene |
synopsis |
public MessageUnpacker simxGetObjects(int/String objectType, final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[]): The object handles
|
See also |
|
Other languages |
|
simxGetObjectsInTree
Description |
Retrieves object handles in a given hierarchy tree |
synopsis |
public MessageUnpacker simxGetObjectsInTree(int/String treeBaseHandle, final String objectType, int options, final String topic)
|
Parameters |
treeBaseHandle: The handle of the object that describes the hierarchy tree, or the string "sim.handle_scene" for all objects in the scene. See also simxEvaluateToInt
objectType: The object type to retrieve, or 'sim.handle_all' for any type of object in the tree
options: Bit-coded. bit0 set (1): exclude the tree base from the returned array, bit1 set (2): include in the returned array only the object's first children. If treeBaseHandle is 'sim.handle_scene', then only parentless objects will be included
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[]): The object handles
|
See also |
|
Other languages |
|
simxGetServerTimeInMs
Description |
Retrieves the current server time, in milliseconds |
synopsis |
public MessageUnpacker simxGetServerTimeInMs(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The server time. On Windows is equivalent to the TimeGetTime() function, on Linux it is equivalent to the gettimeofday() function.
|
See also |
|
Other languages |
|
simxGetSimulationState
Description |
Retrieves the state of the simulation |
synopsis |
public MessageUnpacker simxGetSimulationState(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The simulation state: 0=stopped, 8=paused, 16=running
|
See also |
|
Other languages |
|
simxGetSimulationStepDone
Description |
Checks whether the current simulation step finished executing |
synopsis |
void simxGetSimulationStepDone(final String topic)
|
Parameters |
|
return |
|
See also |
|
Other languages |
|
simxGetSimulationStepStarted
Description |
Checks whether the current simulation step finished executing |
synopsis |
void simxGetSimulationStepStarted(final String topic)
|
Parameters |
|
return |
|
See also |
|
Other languages |
|
simxGetSimulationTime
Description |
Retrieves the current simulation time |
synopsis |
public MessageUnpacker simxGetSimulationTime(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The simulation time in seconds
|
See also |
|
Other languages |
|
simxGetSimulationTimeStep
Description |
Retrieves the current simulation time step |
synopsis |
public MessageUnpacker simxGetSimulationTimeStep(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (float): The simulation time step in seconds
|
See also |
|
Other languages |
|
simxGetStringParam
Description |
Retrieves a string parameter |
synopsis |
public MessageUnpacker simxGetStringParam(int/String paramId, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.stringparam_scene_name". See also simxEvaluateToInt
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (string): The value of the parameter
|
See also |
|
Other languages |
|
simxGetStringSignal
Description |
Retrieves a string signal. Such a signal represents a byte buffer |
synopsis |
public MessageUnpacker simxGetStringSignal(final String sigName, final String topic)
|
Parameters |
sigName: The name of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (byte[]): The value of the signal, or nil if the signal does not exist
|
See also |
|
Other languages |
|
simxGetTimeInMs
Description |
Returns the system time in milliseconds |
synopsis |
long simxGetTimeInMs()
|
Parameters |
|
return |
The time in milliseconds
|
See also |
|
Other languages |
|
simxGetVisionSensorDepthBuffer
Description |
Retrieves the depth buffer of a vision sensor |
synopsis |
public MessageUnpacker simxGetVisionSensorDepthBuffer(int objectHandle, bool toMeters, bool asByteArray, final String topic)
|
Parameters |
objectHandle: The handle of the vision sensor
toMeters: Whether depth values are expressed in terms of relative distance to the sensor's clipping planes or whether depth values are expressed in terms of distance in meters
asByteArray: If true, then a byte array will be returned, instead of a float array, which is much faster (large float arrays might be very slow to handle with message pack, in several languages). In that case, the user is in charge of correctly decoding the byte array containing 4-byte floats, including little/big Endian conversions, etc.
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[2]): The resolution of the depth buffer
item3 (float[]): The depth buffer. Values are in the range of 0-1 (0=on the near clipping plane, 1=on the far clipping plane). If toMeters was specified, then values represent the distance from the sensor's origin, in meters
|
See also |
|
Other languages |
|
simxGetVisionSensorImage
Description |
Retrieves the image of a vision sensor |
synopsis |
public MessageUnpacker simxGetVisionSensorImage(int objectHandle, bool greyScale, final String topic)
|
Parameters |
objectHandle: The handle of the vision sensor
greyScale: Whether the image should be grey scale or color
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int[2]): The resolution of the image
item3 (byte[]): The image. In a grey scale image, each pixel is represented by one byte, with a color image, each pixel is represented by a RGB-byte-triplet
|
See also |
|
Other languages |
|
simxLoadModelFromBuffer
Description |
Loads a model from a buffer |
synopsis |
public MessageUnpacker simxLoadModelFromBuffer(final byte[] buffer, final String topic)
|
Parameters |
buffer: The buffer representing the model to load
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the model base object
|
See also |
|
Other languages |
|
simxLoadModelFromFile
Description |
Loads a model from file |
synopsis |
public MessageUnpacker simxLoadModelFromFile(final String filename, final String topic)
|
Parameters |
filename: The location of the model file. The filename extension is required
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The handle of the model base object
|
See also |
|
Other languages |
|
simxLoadScene
Description |
Loads a scene from file |
synopsis |
public MessageUnpacker simxLoadScene(final String filename, final String topic)
|
Parameters |
filename: The location of the scene file. The filename extension is required
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 if operation was not successful
|
See also |
|
Other languages |
|
simxPauseSimulation
Description |
Requests a pause of the running simulation |
synopsis |
public MessageUnpacker simxPauseSimulation(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the operation could not be performed. >0 in case of success
|
See also |
|
Other languages |
|
simxReadCollision
Description |
Deprecated. See simxCheckCollision instead. |
synopsis |
public MessageUnpacker simxReadCollision(int handle, final String topic)
|
Parameters |
handle: The handle of the collision object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (bool): The collision state of the object
item3 (int[2]): handles of the colliding objects
|
See also |
|
Other languages |
|
simxReadDistance
Description |
Deprecated. See simxCheckDistance instead. |
synopsis |
public MessageUnpacker simxReadDistance(int handle, final String topic)
|
Parameters |
handle: The handle of the distance calculation object
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if distance was not yet computed, 1 otherwise
item3 (float): The smallest distance
|
See also |
|
Other languages |
|
simxReadForceSensor
Description |
Reads the force and torque applied to a force sensor (filtered values are read), and its current state ('unbroken' or 'broken') |
synopsis |
public MessageUnpacker simxReadForceSensor(int handle, final String topic)
|
Parameters |
handle: The handle of the force sensor
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The sensor state (bit coded: bit0 set=force/torque data is valid, bit1 set=force sensor is broken)
item3 (float[3]): The applied force
item4 (float[3]): The applied torque
|
See also |
|
Other languages |
|
simxReadProximitySensor
Description |
Reads the calculation result of a proximity sensor |
synopsis |
public MessageUnpacker simxReadProximitySensor(int handle, final String topic)
|
Parameters |
handle: The handle of the proximity sensor
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): detection state (0 or 1)
item3 (float): The distance to the detected point
item4 (float[3]): The detected point relative to the sensor frame
item5 (int): The detected object handle
item6 (float[3]): The normal vector of the detected surface, relative to the sensor frame
|
See also |
|
Other languages |
|
simxReadVisionSensor
Description |
Reads the state of a vision sensor |
synopsis |
public MessageUnpacker simxReadVisionSensor(int handle, final String topic)
|
Parameters |
handle: The handle of the vision sensor
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): detection state (0 or 1)
item3 (float[]): The default auxiliary value packet. See [L[regularApi/simReadVisionSensor.htm,here] for details
item4 (float[]): Additional auxiliary value packet (e.g. from an image processing component)
item5 (float[]): Etc.
|
See also |
|
Other languages |
|
simxRemoveDrawingObject
Description |
Removes a drawing object from the scene |
synopsis |
public MessageUnpacker simxRemoveDrawingObject(int handle, final String topic)
|
Parameters |
handle: The drawing object handle to remove
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxRemoveObjects
Description |
Removes objects or models |
synopsis |
public MessageUnpacker simxRemoveObjects(final int[] objectHandles, int options, final String topic)
|
Parameters |
objectHandles: The handles of the objects/models to remove
options: Bit-coded. If bit0 is set (i.e. 1), then whole models will be removed. If bit1 is set (i.e. 2), then all objects and models will be removed
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): The number of removed objects
|
See also |
|
Other languages |
|
simxRemovePublisher
Description |
Removes or disables a custom publisher |
synopsis |
void simxRemovePublisher(final String topic)
|
Parameters |
topic: The topic of the publisher
|
return |
|
See also |
|
Other languages |
|
simxRemoveSubscriber
Description |
Removes or disables a subscriber |
synopsis |
void simxRemoveSubscriber(final String topic)
|
Parameters |
topic: The topic of the subscriber
|
return |
|
See also |
|
Other languages |
|
simxServiceCall
Description |
Returns the topic for service calls |
synopsis |
final String simxServiceCall()
|
Parameters |
|
return |
The service call topic
|
See also |
|
Other languages |
|
simxSetArrayParam
Description |
Sets a float parameter |
synopsis |
public MessageUnpacker simxSetArrayParam(int/String paramId, final float[] paramVal, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.arrayparam_gravity". See also simxEvaluateToInt
paramVal: The value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetBoolParam
Description |
Sets a bool parameter |
synopsis |
public MessageUnpacker simxSetBoolParam(int/String paramId, bool paramVal, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.boolparam_dynamics_handling_enabled". See also simxEvaluateToInt
paramVal: The value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetFloatParam
Description |
Sets a float parameter |
synopsis |
public MessageUnpacker simxSetFloatParam(int/String paramId, float paramVal, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.floatparam_simulation_time_step". See also simxEvaluateToInt
paramVal: The value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetFloatSignal
Description |
Sets a float signal |
synopsis |
public MessageUnpacker simxSetFloatSignal(final String sigName, float sigValue, final String topic)
|
Parameters |
sigName: The name of the signal
sigValue: The value of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetInt32Param
Description |
Sets an integer parameter |
synopsis |
public MessageUnpacker simxSetInt32Param(int/String paramId, int paramVal, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.intparam_program_version". See also simxEvaluateToInt
paramVal: The value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetInt32Signal
Description |
Sets an int signal |
synopsis |
public MessageUnpacker simxSetInt32Signal(final String sigName, int sigValue, final String topic)
|
Parameters |
sigName: The name of the signal
sigValue: The value of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetJointForce
Description |
Deprecated. Use simxSetJointMaxForce instead |
synopsis |
public MessageUnpacker simxSetJointForce(int jointHandle, float forceOrTorque, final String topic)
|
Parameters |
jointHandle: The handle of the joint
forceOrTorque: The maximum force or torque that the joint can exert
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetJointMaxForce
Description |
Sets the maximum force or torque that a joint can exert |
synopsis |
public MessageUnpacker simxSetJointMaxForce(int jointHandle, float forceOrTorque, final String topic)
|
Parameters |
jointHandle: The handle of the joint
forceOrTorque: The maximum force or torque that the joint can exert
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetJointPosition
Description |
Sets the intrinsic position of a joint |
synopsis |
public MessageUnpacker simxSetJointPosition(int jointHandle, float position, final String topic)
|
Parameters |
jointHandle: The handle of the joint
position: The position of the joint, in radians or meters
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetJointTargetPosition
Description |
Sets the target position of a joint |
synopsis |
public MessageUnpacker simxSetJointTargetPosition(int jointHandle, float targetPos, final String topic)
|
Parameters |
jointHandle: The handle of the joint
targetPos: The target position of the joint, in radians or meters
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetJointTargetVelocity
Description |
Sets the target velocity of a joint |
synopsis |
public MessageUnpacker simxSetJointTargetVelocity(int jointHandle, float targetPos, final String topic)
|
Parameters |
jointHandle: The handle of the joint
targetPos: The target velocity of the joint, in radians/s or meters/s
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectFloatParam
Description |
Sets a floating point parameter of an object |
synopsis |
public MessageUnpacker simxSetObjectFloatParam(int objectHandle, int/String parameterID, float parameter, final String topic)
|
Parameters |
objectHandle: Handle of the object
parameter: The desired value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 in case of an error, 0 if the parameter could not be set
|
See also |
|
Other languages |
|
simxSetObjectInt32Param
Description |
Sets an integer parameter of an object |
synopsis |
public MessageUnpacker simxSetObjectInt32Param(int objectHandle, int/String parameterID, int parameter, final String topic)
|
Parameters |
objectHandle: Handle of the object
parameter: The desired value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 in case of an error, 0 if the parameter could not be set
|
See also |
|
Other languages |
|
simxSetObjectMatrix
Description |
Sets the transformation matrix of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before) |
synopsis |
public MessageUnpacker simxSetObjectMatrix(int objectHandle, int/String relObjHandle, final float[] matr, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the matrix is specified. Specify -1 to set the absolute matrix, "sim.handle_parent" to set the matrix relative to the object's parent, or an object handle relative to whose reference frame the matrix is specified. See also simxEvaluateToInt
matr: The desired (Xx,Yx,Zx,Px,Xy,Yy,Zy,Py,Xz,Yz,Zz,Pz) transformation matrix
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectOrientation
Description |
Sets the orientation (in Euler angles) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before) |
synopsis |
public MessageUnpacker simxSetObjectOrientation(int objectHandle, int/String relObjHandle, final float[] euler, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
euler: The desired (alpha,beta,gamma) Euler-angle orientation
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectParent
Description |
Gives an object a new parent object |
synopsis |
public MessageUnpacker simxSetObjectParent(int objectHandle, int parentHandle, bool assembly, bool keepInPlace, final String topic)
|
Parameters |
objectHandle: The handle of the object
parentHandle: handle of the object that will become parent, or -1 if the object should become parentless
assembly: true if the two objects can be assembled via a predefined assembly transformation (refer to the assembling option in the object common properties). In that case, parentHandle can't be -1, and keepInPlace should be set to false
keepInPlace: indicates whether the object's absolute position and orientation should remain same
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 if the operation was not successful
|
See also |
|
Other languages |
|
simxSetObjectPose
Description |
Sets the pose (position + quaternion) of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before) |
synopsis |
public MessageUnpacker simxSetObjectPose(int objectHandle, int/String relObjHandle, final float[] pose, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: Indicates relative to which reference frame the pose is specified. Specify -1 to set the absolute pose, "sim.handle_parent" to set the pose relative to the object's parent, or an object handle relative to whose reference frame the pose is specified. See also simxEvaluateToInt
pose: The desired (X,Y,Z,Qx,Qy,Qz,Qw) pose
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectPosition
Description |
Sets the position of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before) |
synopsis |
public MessageUnpacker simxSetObjectPosition(int objectHandle, int/String relObjHandle, final float[] position, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
position: The desired (X,Y,Z) position
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectQuaternion
Description |
Sets the quaternion orientation of an object. Dynamically simulated objects will implicitely be reset before the command is applied (i.e. similar to calling sim.resetDynamicObject just before) |
synopsis |
public MessageUnpacker simxSetObjectQuaternion(int objectHandle, int/String relObjHandle, final float[] quat, final String topic)
|
Parameters |
objectHandle: The handle of the object
relObjHandle: 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. See also simxEvaluateToInt
quat: The desired (Qx,Qy,Qz,Qw) quaternion orientation
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetObjectSelection
Description |
Sets the object selection state |
synopsis |
public MessageUnpacker simxSetObjectSelection(final int[] selection, final String topic)
|
Parameters |
selection: The handles of the objects to be selected
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 if operation was not successful
|
See also |
|
Other languages |
|
simxSetObjectStringParam
Description |
Sets a string parameter of an object |
synopsis |
public MessageUnpacker simxSetObjectStringParam(int objectHandle, int/String parameterID, final String parameter, final String topic)
|
Parameters |
objectHandle: Handle of the object
parameter: The desired value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): -1 in case of an error, 0 if the parameter could not be set
|
See also |
|
Other languages |
|
simxSetStringParam
Description |
Sets a string parameter |
synopsis |
public MessageUnpacker simxSetStringParam(int/String paramId, final String paramVal, final String topic)
|
Parameters |
paramId: The parameter identifier. Can also be a string value, e.g. "sim.stringparam_scene_name". See also simxEvaluateToInt
paramVal: The value of the parameter
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetStringSignal
Description |
Sets a string signal. Such a signal represents a byte buffer |
synopsis |
public MessageUnpacker simxSetStringSignal(final String sigName, final byte[] sigValue, final String topic)
|
Parameters |
sigName: The name of the signal
sigValue: The value of the signal
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSetVisionSensorImage
Description |
Applies an image of a vision sensor |
synopsis |
public MessageUnpacker simxSetVisionSensorImage(int objectHandle, bool greyScale, final byte[] img, final String topic)
|
Parameters |
objectHandle: The handle of the vision sensor
greyScale: Whether the provided image is grey scale or color
img: The image that must be provided in the same resolution as the vision sensor. In a grey scale image, each pixel is represented by one byte, with a color image, each pixel is represented by a RGB-byte-triplet
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
|
See also |
|
Other languages |
|
simxSleep
Description |
Waits for a certain duration |
synopsis |
void simxSleep(int durationInMs)
|
Parameters |
durationInMs: The sleep time in milliseconds
|
return |
|
See also |
|
Other languages |
|
simxSpin
Description |
Handles all callbacks for subscribers that have messages waiting, in a loop (i.e. does not return) |
synopsis |
void simxSpin()
|
Parameters |
|
return |
|
See also |
|
Other languages |
|
simxSpinOnce
Description |
Calls all callbacks for subscribers that have messages waiting, then returns |
synopsis |
void simxSpinOnce()
|
Parameters |
|
return |
|
See also |
|
Other languages |
|
simxStartSimulation
Description |
Requests a start of a simulation (or a resume of a paused simulation) |
synopsis |
public MessageUnpacker simxStartSimulation(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the operation could not be performed. >0 in case of success
|
See also |
|
Other languages |
|
simxStopSimulation
Description |
Requests a stop of the running simulation |
synopsis |
public MessageUnpacker simxStopSimulation(final String topic)
|
Parameters |
|
return |
A MessageUnpacker. For convenience, you can use the helper functions to read its values. The MessageUnpacker contains: item1 (bool): Whether the function was successfully called on the server side
item2 (int): 0 if the operation could not be performed. >0 in case of success
|
See also |
|
Other languages |
|
simxSynchronous
Description |
Enables/disables the CoppeliaSim stepping mode. In stepping mode, each simulation step will require an external trigger signal in order to be run |
synopsis |
void simxSynchronous(bool enable)
|
Parameters |
enable: The enable state of the synchonous mode
|
return |
|
See also |
|
Other languages |
|
simxSynchronousTrigger
Description |
Triggers next simulation step, if the CoppeliaSim stepping mode was previously enabled |
synopsis |
void simxSynchronousTrigger()
|
Parameters |
|
return |
|
See also |
|
Other languages |
|
Topics / Communication channels
simxServiceCall
simxDefaultPublisher
simxDefaultSubscriber
simxCreatePublisher
simxCreateSubscriber
Helper functions
static void b0RemoteApi::print(final MessageUnpacker msg)
static bool b0RemoteApi::hasValue(final MessageUnpacker msg)
static Value b0RemoteApi::readValue(final MessageUnpacker msg,
int valuesToDiscard = 0)
static bool b0RemoteApi::readBool(final MessageUnpacker msg,
int valuesToDiscard = 0)
static int b0RemoteApi::readInt(final MessageUnpacker msg,
int valuesToDiscard = 0)
static float b0RemoteApi::readFloat(final MessageUnpacker msg,
int valuesToDiscard = 0)
static double b0RemoteApi::readDouble(final MessageUnpacker msg,
int valuesToDiscard = 0)
static String b0RemoteApi::readString(final MessageUnpacker msg,
int valuesToDiscard = 0)
static byte[] b0RemoteApi::readByteArray(final MessageUnpacker msg,
int valuesToDiscard = 0)
static int[] b0RemoteApi::readIntArray(final MessageUnpacker msg,
int valuesToDiscard = 0)
static float[] b0RemoteApi::readFloatArray(final MessageUnpacker msg,
int valuesToDiscard = 0)
static double[] b0RemoteApi::readDoubleArray(final MessageUnpacker msg,
int valuesToDiscard = 0)
static String[] b0RemoteApi::readStringArray(final MessageUnpacker msg,
int valuesToDiscard = 0)
|