simIK.addIkElement
Description |
Adds a new IK element to an IK group. |
Lua synopsis |
int elementHandle=simIK.addIkElement(int environmentHandle,int ikGroupHandle,int tipDummyHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
tipDummyHandle: the handle of the dummy object that should act as the tip in the IK element.
|
Lua return values |
elementHandle: the IK element handle in the IK group |
Python synopsis |
int elementHandle=simIK.addIkElement(int environmentHandle,int ikGroupHandle,int tipDummyHandle) |
See also |
simIK.createEnvironment, simIK.getIkGroupHandle, simIK.getObjectHandle, simIK.addIkElementFromScene |
simIK.addIkElementFromScene
Description |
Convenience function to quickly generate an IK element from a kinematic chain in the scene. Use together with simIK.applyIkEnvironmentToScene. |
Lua synopsis |
int ikElement,map simToIkObjectMap=simIK.addIkElementFromScene(int environmentHandle,int ikGroup,int baseHandle,int tipHandle,int targetHandle,int constraints) |
Lua arguments |
environmentHandle: the handle of the IK environment.
ikGroup: the handle of the IK group, where the IK element should be added.
baseHandle: the handle of the base object in the scene. Can be -1 if the base of the kinematic chain is not moving nor changing orientation.
tipHandle: the handle of the tip object in the scene.
targetHandle: the handle of the target object in the scene.
constraints: the constraints for the IK element that should be created. Bit-combine following: simIK.constraint_x, simIK.constraint_y, simIK.constraint_z, simIK.constraint_alpha_beta, simIK.constraint_gamma (simIK.constraint_gamma should only be set if simIK.constraint_alpha_beta is also set). For convenience we also have simIK.constraint_position=simIK.constraint_x|simIK.constraint_y|simIK.constraint_z, simIK.constraint_orientation=simIK.constraint_alpha_beta|simIK.constraint_gamma, and simIK.constraint_pose=simIK.constraint_position|simIK.constraint_orientation.
|
Lua return values |
ikElement: the handle of the created IK element.
simToIkObjectMap: the mapping of scene object to IK environment objects.
|
Python synopsis |
int ikElement,list simToIkObjectMap=simIK.addIkElementFromScene(int environmentHandle,int ikGroup,int baseHandle,int tipHandle,int targetHandle,int constraints) |
See also |
simIK.applyIkEnvironmentToScene, simIK.addIkElement |
simIK.applyIkEnvironmentToScene
Description |
Convenience function to compute and apply inverse kinematic values to the scene. Use together with simIK.addIkElementFromScene. |
Lua synopsis |
int result=simIK.applyIkEnvironmentToScene(int environmentHandle,int ikGroup,bool applyOnlyWhenSuccessful=false) |
Lua arguments |
environmentHandle: the handle of the IK environment.
ikGroup: the handle of the IK group.
applyOnlyWhenSuccessful: whether computed values should only be applied if computation result is simIK.ikresult_success.
|
Lua return values |
result: the resolution result, in return. Possible values are simIK.ikresult_not_performed, simIK.ikresult_success, or simIK.ikresult_fail
|
Python synopsis |
int result=simIK.applyIkEnvironmentToScene(int environmentHandle,int ikGroup,bool applyOnlyWhenSuccessful=False) |
See also |
simIK.addIkElementFromScene,simIK.applySceneToIkEnvironment |
simIK.applySceneToIkEnvironment
Description |
Convenience function to apply the scene state to its ik environment counterpart. Use together with simIK.addIkElementFromScene. |
Lua synopsis |
simIK.applySceneToIkEnvironment(int environmentHandle,int ikGroup) |
Lua arguments |
environmentHandle: the handle of the IK environment.
ikGroup: the handle of the IK group.
|
Lua return values |
|
Python synopsis |
simIK.applySceneToIkEnvironment(int environmentHandle,int ikGroup) |
See also |
simIK.addIkElementFromScene,simIK.applyIkEnvironmentToScene |
simIK.computeJacobian
Description |
Computes the Jacobian for an IK group. |
Lua synopsis |
bool success=simIK.computeJacobian(int environmentHandle,int ikGroupHandle,int options) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
options: options flag, bit-coded. bit0 set (i.e. 1): takes joint weights into account.
|
Lua return values |
success: whether the Jacobian could successfully be computed.
|
Python synopsis |
bool success=simIK.computeJacobian(int environmentHandle,int ikGroupHandle,int options) |
See also |
simIK.createEnvironment, simIK.getJacobian, simIK.getManipulability |
simIK.createDummy
Description |
Creates a dummy object. |
Lua synopsis |
int dummyHandle=simIK.createDummy(int environmentHandle,string dummyName='') |
Lua arguments |
environmentHandle: the handle of the environment.
dummyName: the name of the dummy.
|
Lua return values |
dummyHandle: the handle of the dummy.
|
Python synopsis |
int dummyHandle=simIK.createDummy(int environmentHandle,string dummyName='') |
See also |
simIK.createEnvironment, simIK.doesObjectExist, simIK.createJoint, simIK.eraseObject |
simIK.createEnvironment
Description |
Creates an new IK environment. |
Lua synopsis |
int environmentHandle=simIK.createEnvironment() |
Lua arguments |
|
Lua return values |
environmentHandle: the handle of the newly created environment.
|
Python synopsis |
int environmentHandle=simIK.createEnvironment() |
See also |
simIK.eraseEnvironment, simIK.load |
simIK.createIkGroup
Description |
Creates an IK group. |
Lua synopsis |
int ikGroupHandle=simIK.createIkGroup(int environmentHandle,string ikGroupName='') |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupName: the name of the IK group.
|
Lua return values |
ikGroupHandle: the handle of the IK group.
|
Python synopsis |
int ikGroupHandle=simIK.createIkGroup(int environmentHandle,string ikGroupName='') |
See also |
simIK.createEnvironment, simIK.doesIkGroupExist |
simIK.createJoint
Description |
Creates a joint object. |
Lua synopsis |
int jointHandle=simIK.createJoint(int environmentHandle,string jointName='') |
Lua arguments |
environmentHandle: the handle of the environment.
jointName: the name of the joint.
jointType: the type of the joint. Supported types are simIK.jointtype_revolute, simIK.jointtype_prismatic and simIK.jointtype_spherical.
|
Lua return values |
jointHandle: the handle of the joint.
|
Python synopsis |
int jointHandle=simIK.createJoint(int environmentHandle,string jointName='') |
See also |
simIK.createEnvironment, simIK.doesObjectExist, simIK.createDummy, simIK.eraseObject |
simIK.doesObjectExist
Description |
Checks whether an object exists, based on its name. |
Lua synopsis |
bool result=simIK.doesObjectExist(int environmentHandle,string objectName) |
Lua arguments |
environmentHandle: the handle of the environment.
objectName: the name of the object.
|
Lua return values |
result: true if the object exists.
|
Python synopsis |
bool result=simIK.doesObjectExist(int environmentHandle,string objectName) |
See also |
simIK.createEnvironment, simIK.getObjectHandle |
simIK.doesIkGroupExist
Description |
Checks whether an IK group exists, based on its name. |
Lua synopsis |
bool result=simIK.doesIkGroupExist(int environmentHandle,string ikGroupName) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupName: the name of the IK group.
|
Lua return values |
result: true if the IK group exists.
|
Python synopsis |
bool result=simIK.doesIkGroupExist(int environmentHandle,string ikGroupName) |
See also |
simIK.createEnvironment, simIK.getIkGroupHandle |
simIK.duplicateEnvironment
Description |
Duplicates an IK environment. Useful when operating on an environment while leaving the original environment unchanged. |
Lua synopsis |
int newEnvironmentHandle=simIK.duplicateEnvironment(int environmentHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
|
Lua return values |
newEnvironmentHandle: the handle of the duplicated environment.
|
Python synopsis |
int newEnvironmentHandle=simIK.duplicateEnvironment(int environmentHandle) |
See also |
simIK.eraseEnvironment, simIK.createEnvironment |
simIK.eraseEnvironment
Description |
Erases an IK environment. |
Lua synopsis |
simIK.eraseEnvironment(int environmentHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
|
Lua return values |
|
Python synopsis |
simIK.eraseEnvironment(int environmentHandle) |
See also |
simIK.createEnvironment |
simIK.eraseObject
simIK.findConfig
Description |
Searches for a manipulator configuration that matches the target dummy/dummies position/orientation in space. Search is randomized. One should call simIK.getAlternateConfigs for each returned configuration, if some revolute joints of the manipulator have a range of more than 360 degrees, in order to generate some equivalent poses but alternate configurations. The IK environment remains unchanged. |
Lua synopsis |
float[] jointPositions=simIK.findConfig(int environmentHandle,int ikGroupHandle,int[] jointHandles,float thresholdDist=0.1,float maxTime=0.5,float[4] metric={1,1,1,0.1},func/string validationCallback=nil,auxData=nil) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
jointHandles: a table that specifies the joint handles for the joints we wish to retrieve the values calculated by the IK.
thresholdDist: a distance indicating when IK should be computed in order to try to bring the tip onto the target: since the search algorithm proceeds by generating random configurations, many of them produce a tip pose that is too far from the target pose to run IK successfully. Choosing a large value will result in slow calculations, choosing a small value might produce a smaller subset of solutions. Distance between two poses is calculated using a metric (see metric argument below).
maxTime: the upper time limit, in seconds, after which the function returns.
metric: a table to 4 values indicating a metric used to compute pose-pose distances: distance=sqrt((dx*metric[1])^2+(dy*metric[2])^2+(dz*metric[3])^2+(angle*metric[4])^2).
validationCallback: an optional callback function expressed as a function or a string. The callback function takes as input arguments the proposed joint values (i.e. a configuration) and auxData, and as return value whether the configuration is valid (e.g. is not colliding).
auxData: auxiliary data that will be handed to the validation callback.
|
Lua return values |
jointPositions: a table that contains the IK calculated joint values, as specified by the jointHandles table, if a valid configuration was found.
|
Python synopsis |
list jointPositions=simIK.findConfig(int environmentHandle,int ikGroupHandle,list jointHandles,float thresholdDist=0.1,float maxTime=0.5,list metric=[1,1,1,0.1],function/string validationCallback=None,auxData=None) |
See also |
simIK.createEnvironment, simIK.duplicateEnvironment, simIK.getAlternateConfigs, simIK.computeJacobian, simIK.getJacobian |
simIK.generatePath
Description |
Generates a path that drives the IK tip onto its IK target, in a straight line (i.e. shortest path in Cartesian space). The function returns a path in the configuration space if the operation was successful. A reason for a non-successful operation can be: there are some forbidden poses/configurations on the way, or some of the configuration points cannot be reached (e.g. out of reach, or due to joint limits). The IK environment remains unchanged. |
Lua synopsis |
float[] configurationList=simIK.generatePath(int environmentHandle,int ikGroupHandle,int[] jointHandles,int tipHandle,int pathPointCount,function/string validationCallback=nil,auxData=nil |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the IK group handle.
jointHandles: a table that specifies the joint handles for the joints we wish to retrieve the values calculated by the IK.
tipHandle: the handle of the tip object.
pathPointCount: the desired number of path points. Each path point contains a joint configuration. A minimum of two path points is required.
validationCallback: an optional callback function, expressed as a function or string. The callback function takes as input arguments proposed joint values (i.e. a configuration) and auxData, and as return value whether the configuration is valid (e.g. is not colliding).
auxData: auxiliary data that will be handed to the validation callback.
|
Lua return values |
configurationList: a table that contains configurations (in row-major order) that will bring the IK tip onto its IK target.
|
Python synopsis |
list configurationList=simIK.generatePath(int environmentHandle,int ikGroupHandle,list jointHandles,int tipHandle,int pathPointCount,function/string validationCallback=None,auxData=None |
See also |
simIK.duplicateEnvironment |
simIK.getAlternateConfigs
Description |
Useful when called after simIK.findConfig: generates alternative manipulator configurations, for a same end-effector pose, for a manipulator that has revolute joints with a range larger than 360 degrees. The original submitted configuration will be part of the returned configurations. The IK environment remains unchanged. |
Lua synopsis |
float[] configurations=simIK.getAlternateConfigs(int environmentHandle,int[] jointHandles,float[] lowLimits=nil,float[] ranges=nil) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandles: a table with the handles of the manipulator joints.
lowLimits: a table with joint low limit values for each specified joint. This can be useful when you wish to explore a sub-set of the joint's intervals.
ranges: a table with joint range values for each specified joint. This can be useful when you wish to explore a sub-set of the joint's intervals. If the range value is 0, then the lowLimit and range values are taken from the joint's properties. If the range value is negative, then the search interval will be centered around the current linear/angular joint position, with an extent of (-range).
|
Lua return values |
configurations: a table containing configurations (in row-major order) that are equivalent to the specified inputConfig, in terms of end-effector pose.
|
Python synopsis |
list configurations=simIK.getAlternateConfigs(int environmentHandle,list jointHandles,list lowLimits=None,list ranges=None) |
See also |
simIK.createEnvironment, simIK.findConfig |
simIK.getConfigForTipPose
Description |
Deprecated. Use simIK.findConfig instead. |
Lua synopsis |
float[] jointPositions=simIK.getConfigForTipPose(int environmentHandle,int ikGroupHandle,int[] jointHandles,float thresholdDist=0.1,float maxTime=0.5,float[4] metric={1,1,1,0.1},function validationCallback=nil,auxData=nil,int[] jointOptions={},float[] lowLimits={},float[] ranges={}) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
jointHandles: a table that specifies the joint handles for the joints we wish to retrieve the values calculated by the IK.
thresholdDist: a distance indicating when IK should be computed in order to try to bring the tip onto the target: since the search algorithm proceeds by generating random configurations, many of them produce a tip pose that is too far from the target pose to run IK successfully. Choosing a large value will result in slow calculations, choosing a small value might produce a smaller subset of solutions. Distance between two poses is calculated using a metric (see metric argument below).
maxTime: the upper time limit, in seconds, after which the function returns.
metric: a table to 4 values indicating a metric used to compute pose-pose distances: distance=sqrt((dx*metric[1])^2+(dy*metric[2])^2+(dz*metric[3])^2+(angle*metric[4])^2).
validationCallback: an optional callback function. The callback function takes as input arguments the proposed joint values (i.e. a configuration) and auxData, and as return value whether the configuration is valid (e.g. is not colliding).
auxData: auxiliary data that will be handed to the validation callback.
jointOptions: a table with bit-coded values corresponding to each specified joint handle. Bit 0 (i.e. 1) indicates the corresponding joint is dependent of another joint.
lowLimits: a table with joint low limit values for each specified joint. This can be useful when you wish to explore a sub-set of the joint's intervals.
ranges: a table with joint range values for each specified joint. This can be useful when you wish to explore a sub-set of the joint's intervals. If the range value is 0, then the lowLimit and range values are taken from the joint's properties. If the range value is negative, then the search interval will be centered around the current linear/angular joint position, with an extent of (-range).
|
Lua return values |
jointPositions: a table that contains the IK calculated joint values, as specified by the jointHandles table, if a valid configuration was found.
|
Python synopsis |
list jointPositions=simIK.getConfigForTipPose(int environmentHandle,int ikGroupHandle,list jointHandles,float thresholdDist=0.1,float maxTime=0.5,list metric=[1,1,1,0.1],function validationCallback=None,auxData=None,list jointOptions=[],list lowLimits=[],list ranges=[]) |
See also |
simIK.createEnvironment, simIK.duplicateEnvironment, simIK.getAlternateConfigs, simIK.computeJacobian, simIK.getJacobian |
simIK.getIkElementBase
Description |
Retrieves the base object of an IK element. |
Lua synopsis |
int baseHandle,int constraintsBaseHandle=simIK.getIkElementBase(int environmentHandle,int ikGroupHandle,int elementHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
|
Lua return values |
baseHandle: the handle of the base object, or -1 if the world is the base.
constraintsBaseHandle: the handle of the constraints base object, relative to which the constraints are specified. Returns -1 if the constraints are relative to the base object.
|
Python synopsis |
int baseHandle,int constraintsBaseHandle=simIK.getIkElementBase(int environmentHandle,int ikGroupHandle,int elementHandle) |
See also |
simIK.createEnvironment, simIK.setIkElementBase, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.getIkElementConstraints
Description |
Retrieves the constraints of an IK element. |
Lua synopsis |
int constraints=simIK.getIkElementConstraints(int environmentHandle,int ikGroupHandle,int elementHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
|
Lua return values |
constraints: the constraints. A bit-combination of following is possible: simIK.constraint_x, simIK.constraint_y, simIK.constraint_z, simIK.constraint_alpha_beta, simIK.constraint_gamma.
|
Python synopsis |
int constraints=simIK.getIkElementConstraints(int environmentHandle,int ikGroupHandle,int elementHandle) |
See also |
simIK.createEnvironment, simIK.setIkElementConstraints, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.getIkElementFlags
Description |
Retrieves various flags of an IK element. |
Lua synopsis |
int flags=simIK.getIkElementFlags(int environmentHandle,int ikGroupHandle,int elementHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
|
Lua return values |
flags: bit-coded flags: bit0 set(1)=the enabled state of the ik element.
|
Python synopsis |
int flags=simIK.getIkElementFlags(int environmentHandle,int ikGroupHandle,int elementHandle) |
See also |
simIK.createEnvironment, simIK.setIkElementFlags, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.getIkElementPrecision
Description |
Retrieves the precision settings of an IK element. |
Lua synopsis |
float[2] precision=simIK.getIkElementPrecision(int environmentHandle,int ikGroupHandle,int elementHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
|
Lua return values |
precision: a table with the linear and angular precision.
|
Python synopsis |
list precision=simIK.getIkElementPrecision(int environmentHandle,int ikGroupHandle,int elementHandle) |
See also |
simIK.createEnvironment, simIK.setIkElementPrecision, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.getIkElementWeights
Description |
Retrieves the desired linear and angular resolution weights of an IK element. |
Lua synopsis |
float[2] weights=simIK.getIkElementWeights(int environmentHandle,int ikGroupHandle,int elementHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
|
Lua return values |
weights: a table with the linear and angular resolution weights.
|
Python synopsis |
list weights=simIK.getIkElementWeights(int environmentHandle,int ikGroupHandle,int elementHandle) |
See also |
simIK.createEnvironment, simIK.setIkElementWeights, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.getIkGroupCalculation
Description |
Retrieves calculation properties for an IK group. |
Lua synopsis |
int method,float damping,int maxIterations=simIK.getIkGroupCalculation(int environmentHandle,int ikGroupHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
|
Lua return values |
method: the resolution method. Possible values are simIK.method_pseudo_inverse (features a tiny bit of hard-coded damping), simIK.method_undamped_pseudo_inverse, simIK.method_damped_least_squares and simIK.method_jacobian_transpose.
damping: the damping, in case the resolution method is simIK.method_damped_least_squares.
maxIterations: the maximum number of iterations.
|
Python synopsis |
int method,float damping,int maxIterations=simIK.getIkGroupCalculation(int environmentHandle,int ikGroupHandle) |
See also |
simIK.createEnvironment, simIK.setIkGroupCalculation, simIK.getIkGroupHandle |
simIK.getIkGroupFlags
Description |
Retrieves flags of an IK group. |
Lua synopsis |
int flags=simIK.getIkGroupFlags(int environmentHandle,int ikGroupHandle)) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
|
Lua return values |
flags: the flags of the IK group. bit0 set (i.e. 1)=group is enabled, bit1 set (i.e. 2)=max. step sizes are ignored, bit2 set (i.e. 4)=restore joints if target position not reached, bit3 set (i.e. 8)=restore joints if target orientation not reached.
|
Python synopsis |
int flags=simIK.getIkGroupFlags(int environmentHandle,int ikGroupHandle)) |
See also |
simIK.createEnvironment, simIK.setIkGroupFlags, simIK.getIkGroupHandle |
simIK.getIkGroupHandle
Description |
Retrieves the handle of an IK group based on its name. |
Lua synopsis |
int ikGroupHandle=simIK.getIkGroupHandle(int environmentHandle,string ikGroupName) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupName: the name of the IK group.
|
Lua return values |
ikGroupHandle: the handle of the IK group.
|
Python synopsis |
int ikGroupHandle=simIK.getIkGroupHandle(int environmentHandle,string ikGroupName) |
See also |
simIK.createEnvironment, simIK.doesIkGroupExist, simIK.createIkGroup |
simIK.getJacobian
Description |
Retrieves the Jacobian previously computed via simIK.computeJacobian. |
Lua synopsis |
float[] jacobian,int[2] matrixSize=simIK.getJacobian(int environmentHandle,int ikGroupHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
|
Lua return values |
jacobian: a table with the jacobian values.
matrixSize: a table containing the sizes (row count (i.e. number of DoFs) and column count) of the Jacobian matrix.
|
Python synopsis |
list jacobian,list matrixSize=simIK.getJacobian(int environmentHandle,int ikGroupHandle) |
See also |
simIK.createEnvironment, simIK.computeJacobian, simIK.getManipulability |
simIK.getJointDependency
Description |
Retrieves information about a possible joint dependency. |
Lua synopsis |
int depJointHandle,float offset,float mult=simIK.getJointDependency(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
depJointHandle: the handle of the dependency joint.
offset: the offset. We have linear/angular joint position = dependency linear/angular joint position * mult + offset.
mult: the multiplication factor. We have linear/angular joint position = dependency linear/angular joint position * mult + offset.
|
Python synopsis |
int depJointHandle,float offset,float mult=simIK.getJointDependency(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointDependency, simIK.getObjectHandle |
simIK.getJointIkWeight
Description |
Retrieves the IK weight of a joint, i.e. the weight it has during IK resolution. |
Lua synopsis |
float weight=simIK.getJointIkWeight(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
weight: the IK weight.
|
Python synopsis |
float weight=simIK.getJointIkWeight(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointIkWeight, simIK.getObjectHandle |
simIK.getJointInterval
Description |
Retrieves the joint limits. |
Lua synopsis |
bool cyclic,float[2] interval=simIK.getJointInterval(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
cyclic: whether the joint is cyclic (has no limits).
interval: a table with two values: the joint lower limit, and the joint range (i.e. joint upper limit = joint lower limit + joint range)
|
Python synopsis |
bool cyclic,list interval=simIK.getJointInterval(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointInterval, simIK.getObjectHandle |
simIK.getJointMatrix
Description |
Retrieves the intrinsic transformation matrix of a joint. |
Lua synopsis |
float[12] matrix=simIK.getJointMatrix(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
matrix: a table of 12 numbers representing the transformation matrix (the last row of the 4x4 matrix (0,0,0,1) is not returned).
|
Python synopsis |
list matrix=simIK.getJointMatrix(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setSphericalJointMatrix, simIK.getJointPosition, simIK.getJointTransformation, simIK.getObjectHandle |
simIK.getJointMaxStepSize
Description |
Retrieves the maximum step size of a joint. |
Lua synopsis |
float stepSize=simIK.getJointMaxStepSize(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
stepSize: the maximum step size.
|
Python synopsis |
float stepSize=simIK.getJointMaxStepSize(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointMaxStepSize, simIK.getObjectHandle |
simIK.getJointMode
Description |
Retrieves the joint mode. |
Lua synopsis |
int jointMode=simIK.getJointMode(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
jointMode: the joint mode. Possible values are: simIK.jointmode_passive, simIK.jointmode_ik, simIK.jointmode_dependent
|
Python synopsis |
int jointMode=simIK.getJointMode(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointMode, simIK.getObjectHandle |
simIK.getJointPosition
simIK.getJointScrewPitch
Description |
Retrieves the screw pitch of a revolute joint. |
Lua synopsis |
float pitch=simIK.getJointScrewPitch(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
pitch: the screw pitch of the joint. A pitch value of zero represents a revolute joint, a value different from zero represents a screw.
|
Python synopsis |
float pitch=simIK.getJointScrewPitch(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setJointScrewPitch, simIK.getObjectHandle |
simIK.getJointTransformation
Description |
Retrieves the intrinsic transformation of a joint. |
Lua synopsis |
float[3] position,float[4] quaternion,float[3] euler=simIK.getJointTransformation(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
position: the translation of the joint.
quaternion: the rotation of the joint, expressed as quaternion (x,y,z,w).
euler: the rotation of the joint, expressed as Euler angles (alpha,beta,gamma).
|
Python synopsis |
list position,list quaternion,list euler=simIK.getJointTransformation(int environmentHandle,int jointHandle) |
See also |
simIK.createEnvironment, simIK.setSphericalJointRotation, simIK.getJointPosition, simIK.getJointMatrix, simIK.getObjectHandle |
simIK.getJointType
Description |
Retrieves the joint type. |
Lua synopsis |
int jointType=simIK.getJointType(int environmentHandle,int jointHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
|
Lua return values |
jointType: the joint type. Possible values are: simIK.jointtype_revolute, simIK.jointtype_prismatic and simIK.jointtype_spherical
|
Python synopsis |
int jointType=simIK.getJointType(int environmentHandle,int jointHandle) |
See also |
simIK.createJoint |
simIK.getLinkedDummy
Description |
Retrieves the handle of a dummy linked to this one. |
Lua synopsis |
int linkedDummyHandle=simIK.getLinkedDummy(int environmentHandle,int dummyHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
dummyHandle: the handle of the dummy object.
|
Lua return values |
linkedDummyHandle: the handle of the linked dummy object. Is -1 if no dummy object is linked to this one.
|
Python synopsis |
int linkedDummyHandle=simIK.getLinkedDummy(int environmentHandle,int dummyHandle) |
See also |
simIK.createEnvironment, simIK.setLinkedDummy, simIK.getObjectHandle |
simIK.getManipulability
Description |
Retrieves the manipulability value ( sqrt(det(J*JT)) ) of the Jacobian previously computed via simIK.computeJacobian. |
Lua synopsis |
float manipulability=simIK.getManipulability(int environmentHandle,int ikGroupHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
|
Lua return values |
manipulability: the manipulability value.
|
Python synopsis |
float manipulability=simIK.getManipulability(int environmentHandle,int ikGroupHandle) |
See also |
simIK.createEnvironment, simIK.computeJacobian, simIK.getJacobian |
simIK.getObjectHandle
Description |
Retrieves the handle of an object based on its name. |
Lua synopsis |
int objectHandle=simIK.getObjectHandle(int environmentHandle,string objectName) |
Lua arguments |
environmentHandle: the handle of the environment.
objectName: the name of the object.
|
Lua return values |
objectHandle: the object handle.
|
Python synopsis |
int objectHandle=simIK.getObjectHandle(int environmentHandle,string objectName) |
See also |
simIK.createEnvironment, simIK.doesObjectExist, simIK.createDummy, simIK.createJoint |
simIK.getObjectMatrix
Description |
Retrieves the transformation matrix of an object. If the object is a joint object, the matrix does not include the joint's intrinsic transformation. |
Lua synopsis |
float[12] matrix=simIK.getObjectMatrix(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which we want the matrix expressed. Otherwise, specify simIK.handle_world if you want the absolute matrix, or simIK.handle_parent if you want the matrix relative to the parent object.
|
Lua return values |
matrix: a table of 12 numbers representing the transformation matrix (the last row of the 4x4 matrix (0,0,0,1) is not returned)
|
Python synopsis |
list matrix=simIK.getObjectMatrix(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
See also |
simIK.createEnvironment, simIK.setObjectMatrix, simIK.getObjectPose,simIK.getObjectTransformation, simIK.getJointTransformation, simIK.getObjectHandle |
simIK.getObjectParent
Description |
Retrieves an object's parent handle. |
Lua synopsis |
int parentObjectHandle=simIK.getObjectParent(int environmentHandle,int objectHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
|
Lua return values |
parentObjectHandle: the returned handle of the parent, or -1 if the object has no parent.
|
Python synopsis |
int parentObjectHandle=simIK.getObjectParent(int environmentHandle,int objectHandle) |
See also |
simIK.createEnvironment, simIK.setObjectParent, simIK.getObjectHandle |
simIK.getObjectPose
Description |
Retrieves the pose (position and quaternion) of an object. If the object is a joint object, the pose does not include the joint's intrinsic transformation. |
Lua synopsis |
float[7] pose=simIK.getObjectPose(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which we want the pose expressed. Otherwise, specify simIK.handle_world if you want the absolute pose, or simIK.handle_parent if you want the pose relative to the parent object.
|
Lua return values |
pose: the position and quaternion of the object (x,y,z,qx,qy,qz,qw).
|
Python synopsis |
list pose=simIK.getObjectPose(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
See also |
simIK.createEnvironment, simIK.setObjectPose, simIK.getObjectTransformation, simIK.getObjectMatrix, simIK.getJointTransformation, simIK.getObjectHandle |
simIK.getObjects
Description |
Allows to loop through all objects in the environment. |
Lua synopsis |
int objectHandle,string objectName,bool isJoint,int jointType=simIK.getObjects(int environmentHandle,int index) |
Lua arguments |
environmentHandle: the handle of the environment.
index: the zero-based index. Start at 0, and increment until there is no return values anymore, in order to loop through all objects in the environment.
|
Lua return values |
objectHandle: the handle of the object, or nil if there is no object at the specified index.
objectName: the name of the object.
isJoint: whether the object is a joint.
jointType: the type of joint, if the object at the specified index is a joint. Possible values are simIK.jointtype_revolute, simIK.jointtype_prismatic or simIK.jointtype_spherical.
|
Python synopsis |
int objectHandle,string objectName,bool isJoint,int jointType=simIK.getObjects(int environmentHandle,int index) |
See also |
simIK.getObjectHandle, simIK.doesObjectExist |
simIK.getObjectTransformation
Description |
Retrieves the transformation (position and quaternion/euler angles) of an object. If the object is a joint object, the transformation does not include the joint's intrinsic transformation. |
Lua synopsis |
float[3] position,float[4] quaternion,float[3] euler=simIK.getObjectTransformation(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which we want the transformation expressed. Otherwise, specify simIK.handle_world if you want the absolute transformation, or simIK.handle_parent if you want the transformation relative to the parent object.
|
Lua return values |
position: the position of the object.
quaternion: the orientation of the object, expressed as quaternion (x,y,z,w).
euler: the orientation of the object, expressed as Euler angles (alpha,beta,gamma).
|
Python synopsis |
list position,list quaternion,list euler=simIK.getObjectTransformation(int environmentHandle,int objectHandle,int relativeToObjectHandle) |
See also |
simIK.createEnvironment, simIK.setObjectTransformation, simIK.getObjectPose, simIK.getObjectMatrix, simIK.getJointTransformation, simIK.getObjectHandle |
simIK.handleIkGroup
Description |
Handles (i.e. computes/resolves) an IK group. |
Lua synopsis |
int result=simIK.handleIkGroup(int environmentHandle,int ikGroupHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group, or simIK.handle_all to handle all IK groups.
|
Lua return values |
result: the resolution result, in return. Possible values are simIK.ikresult_not_performed, simIK.ikresult_success, or simIK.ikresult_fail
|
Python synopsis |
int result=simIK.handleIkGroup(int environmentHandle,int ikGroupHandle) |
See also |
simIK.createEnvironment, simIK.computeJacobian, simIK.findConfig |
simIK.load
Description |
Loads kinematic content previously exported in the CoppeliaSim application. Make sure that the environment is empty before calling this function. |
Lua synopsis |
simIK.load(int environmentHandle,buffer data) |
Lua arguments |
environmentHandle: the handle of the environment.
data: a buffer with the kinematic content.
|
Lua return values |
|
Python synopsis |
simIK.load(int environmentHandle,bytes data) |
See also |
simIK.save, simIK.createEnvironment, simIK.eraseEnvironment |
simIK.save
Description |
Saves the kinematic content of an IK environment. |
Lua synopsis |
buffer data=simIK.save(int environmentHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
|
Lua return values |
data: the exported data.
|
Python synopsis |
bytes data=simIK.save(int environmentHandle) |
See also |
simIK.load |
simIK.setIkElementBase
Description |
Sets the base object of an IK element. |
Lua synopsis |
simIK.setIkElementBase(int environmentHandle,int ikGroupHandle,int elementHandle,int baseHandle,int constraintsBaseHandle=-1) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
baseHandle: the handle of the base object, or -1 if the world is the base.
constraintsBaseHandle: the handle of the constraints base object, relative to which the constraints are specified. Set to -1 to have the constraints relative to the base object.
|
Lua return values |
|
Python synopsis |
simIK.setIkElementBase(int environmentHandle,int ikGroupHandle,int elementHandle,int baseHandle,int constraintsBaseHandle=-1) |
See also |
simIK.createEnvironment, simIK.getIkElementBase, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.setIkElementConstraints
Description |
Sets the constraints of an IK element. |
Lua synopsis |
simIK.setIkElementConstraints(int environmentHandle,int ikGroupHandle,int elementHandle,int constraints) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
constraints: the constraints. Bit-combine following: simIK.constraint_x, simIK.constraint_y, simIK.constraint_z, simIK.constraint_alpha_beta, simIK.constraint_gamma (simIK.constraint_gamma should only be set if simIK.constraint_alpha_beta is also set). For convenience we also have simIK.constraint_position=simIK.constraint_x|simIK.constraint_y|simIK.constraint_z, simIK.constraint_orientation=simIK.constraint_alpha_beta|simIK.constraint_gamma, and simIK.constraint_pose=simIK.constraint_position|simIK.constraint_orientation.
|
Lua return values |
|
Python synopsis |
simIK.setIkElementConstraints(int environmentHandle,int ikGroupHandle,int elementHandle,int constraints) |
See also |
simIK.createEnvironment, simIK.getIkElementConstraints, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.setIkElementFlags
Description |
Sets various flags of an IK element. |
Lua synopsis |
simIK.setIkElementFlags(int environmentHandle,int ikGroupHandle,int elementHandle,int flags) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
flags: bit-coded flags: bit0 set (1)=the enabled state of the IK element.
|
Lua return values |
|
Python synopsis |
simIK.setIkElementFlags(int environmentHandle,int ikGroupHandle,int elementHandle,int flags) |
See also |
simIK.createEnvironment, simIK.getIkElementFlags, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.setIkElementPrecision
Description |
Sets the desired precision of an IK element. |
Lua synopsis |
simIK.setIkElementPrecision(int environmentHandle,int ikGroupHandle,int elementHandle,float[2] precision) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
precision: a table with two values for the linear and angular precision.
|
Lua return values |
|
Python synopsis |
simIK.setIkElementPrecision(int environmentHandle,int ikGroupHandle,int elementHandle,list precision) |
See also |
simIK.createEnvironment, simIK.getIkElementPrecision, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.setIkElementWeights
Description |
Sets the desired linear and angular resolution weights of an IK element. |
Lua synopsis |
simIK.setIkElementWeights(int environmentHandle,int ikGroupHandle,int elementHandle,float[2] weights) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
elementHandle: the IK element handle, or X, where X=handleOfTipDummy+simIK.handleflag_tipdummy (if several IK elements with the same tip dummy exist, then the first encountered will be selected).
weights: a table with two values for the linear and angular resolution weight.
|
Lua return values |
|
Python synopsis |
simIK.setIkElementWeights(int environmentHandle,int ikGroupHandle,int elementHandle,list weights) |
See also |
simIK.createEnvironment, simIK.getIkElementWeights, simIK.getIkGroupHandle, simIK.getObjectHandle |
simIK.setIkGroupCalculation
Description |
Sets calculation properties for an IK group. |
Lua synopsis |
simIK.setIkGroupCalculation(int environmentHandle,int ikGroupHandle,int method,float damping,float maxIterations) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
method: the resolution method. Possible values are simIK.method_pseudo_inverse (features a tiny bit of hard-coded damping), simIK.method_undamped_pseudo_inverse, simIK.method_damped_least_squares and simIK.method_jacobian_transpose.
damping: the damping, in case the resolution method is simIK.method_damped_least_squares.
maxIterations: the maximum number of iterations.
|
Lua return values |
|
Python synopsis |
simIK.setIkGroupCalculation(int environmentHandle,int ikGroupHandle,int method,float damping,float maxIterations) |
See also |
simIK.createEnvironment, simIK.getIkGroupCalculation, simIK.getIkGroupHandle |
simIK.setIkGroupFlags
Description |
Sets flags of an IK group. |
Lua synopsis |
simIK.setIkGroupFlags(int environmentHandle,int ikGroupHandle,int flags) |
Lua arguments |
environmentHandle: the handle of the environment.
ikGroupHandle: the handle of the IK group.
flags: the flags of the IK group. bit0 set (i.e. 1)=group is enabled, bit1 set (i.e. 2)=max. step sizes are ignored, bit2 set (i.e. 4)=restore joints if target position not reached, bit3 set (i.e. 8)=restore joints if target orientation not reached.
|
Lua return values |
|
Python synopsis |
simIK.setIkGroupFlags(int environmentHandle,int ikGroupHandle,int flags) |
See also |
simIK.createEnvironment, simIK.getIkGroupFlags, simIK.getIkGroupHandle |
simIK.setJointDependency
Description |
Sets information about a possible dependent joint. |
Lua synopsis |
simIK.setJointDependency(int environmentHandle,int jointHandle,int depJointHandle,float offset=0,float mult=1) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
depJointHandle: the handle of the joint, this joint is dependent of. -1 to disable.
offset: the offset. We have linear/angular joint position = dependency linear/angular joint position * mult + offset
mult: the multiplication factor. We have linear/angular joint position = dependency linear/angular joint position * mult + offset
|
Lua return values |
|
Python synopsis |
simIK.setJointDependency(int environmentHandle,int jointHandle,int depJointHandle,float offset=0,float mult=1) |
See also |
simIK.createEnvironment, simIK.getJointDependency, simIK.getObjectHandle |
simIK.setJointIkWeight
Description |
Sets the IK weight of a joint, i.e. the weight it has during IK resolution. |
Lua synopsis |
simIK.setJointIkWeight(int environmentHandle,int jointHandle,float weight) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
weight: the IK weight.
|
Lua return values |
|
Python synopsis |
simIK.setJointIkWeight(int environmentHandle,int jointHandle,float weight) |
See also |
simIK.createEnvironment, simIK.getJointIkWeight, simIK.getObjectHandle |
simIK.setJointInterval
Description |
Sets the joint limits. |
Lua synopsis |
simIK.setJointInterval(int environmentHandle,int jointHandle,bool cyclic,float[2] interval={}) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
cyclic: whether the joint is cyclic (has no limits). Only revolute joints can be cyclic.
interval: a table with two values: the joint lower limit, and the joint range (i.e. joint upper limit = joint lower limit + joint range)
|
Lua return values |
|
Python synopsis |
simIK.setJointInterval(int environmentHandle,int jointHandle,bool cyclic,list interval=[]) |
See also |
simIK.createEnvironment, simIK.getJointInterval, simIK.getObjectHandle |
simIK.setJointMaxStepSize
Description |
Sets the maximum step size of a joint. |
Lua synopsis |
simIK.setJointMaxStepSize(int environmentHandle,int jointHandle,float stepSize) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
stepSize: the maximum step size.
|
Lua return values |
|
Python synopsis |
simIK.setJointMaxStepSize(int environmentHandle,int jointHandle,float stepSize) |
See also |
simIK.createEnvironment, simIK.getJointMaxStepSize, simIK.getObjectHandle |
simIK.setJointMode
Description |
Sets the joint mode. |
Lua synopsis |
simIK.setJointMode(int environmentHandle,int jointHandle,int jointMode) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
jointMode: the joint mode. Allowed values are: simIK.jointmode_passive, simIK.jointmode_ik, simIK.jointmode_dependent
|
Lua return values |
|
Python synopsis |
simIK.setJointMode(int environmentHandle,int jointHandle,int jointMode) |
See also |
simIK.createEnvironment, simIK.getJointMode, simIK.getObjectHandle |
simIK.setJointPosition
simIK.setJointScrewPitch
Description |
Sets the screw pitch, in case of a revolute joint. |
Lua synopsis |
simIK.setJointScrewPitch(int environmentHandle,int jointHandle,float pitch) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
pitch: the screw pitch of the joint. A pitch value of zero represents a revolute joint, a value different from zero represents a screw.
|
Lua return values |
|
Python synopsis |
simIK.setJointScrewPitch(int environmentHandle,int jointHandle,float pitch) |
See also |
simIK.createEnvironment, simIK.getJointScrewPitch, simIK.getObjectHandle |
simIK.setLinkedDummy
Description |
Links this dummy object to another dummy object, or detaches it from another dummy object. |
Lua synopsis |
simIK.setLinkedDummy(int environmentHandle,int dummyHandle,int linkedDummyHandle) |
Lua arguments |
environmentHandle: the handle of the environment.
dummyHandle: the handle of the dummy object.
linkedDummyHandle: the handle of the dummy object to be linked, or -1 to detach this dummy object from a linked dummy object.
|
Lua return values |
|
Python synopsis |
simIK.setLinkedDummy(int environmentHandle,int dummyHandle,int linkedDummyHandle) |
See also |
simIK.createEnvironment, simIK.getLinkedDummy, simIK.getObjectHandle |
simIK.setObjectMatrix
Description |
Sets the transformation matrix of an object. If the object is a joint object, the matrix does not include the joint's intrinsic transformation. |
Lua synopsis |
simIK.setObjectMatrix(int environmentHandle,int objectHandle,int relativeToObjectHandle,float[12] matrix) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which the matrix is expressed. Otherwise, specify simIK.handle_world if you specify the absolute matrix, or simIK.handle_parent if you specify the matrix relative to the parent object.
matrix: a table of 12 values representing the transformation matrix (the last row of the 4x4 matrix (0,0,0,1) is omitted)
|
Lua return values |
|
Python synopsis |
simIK.setObjectMatrix(int environmentHandle,int objectHandle,int relativeToObjectHandle,list matrix) |
See also |
simIK.createEnvironment, simIK.getObjectMatrix, simIK.setObjectPose, simIK.setObjectTransformation, simIK.setJointPosition, simIK.getObjectHandle |
simIK.setObjectParent
Description |
Sets the parent of an object. |
Lua synopsis |
simIK.setObjectParent(int environmentHandle,int objectHandle,int parentObjectHandle, bool keepInPlace=true) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
parentObjectHandle: the desired parent object, set -1 for no parent.
keepInPlace: if true, the object will stay in place, otherwise, it will keep its local transformation.
|
Lua return values |
|
Python synopsis |
simIK.setObjectParent(int environmentHandle,int objectHandle,int parentObjectHandle, bool keepInPlace=True) |
See also |
simIK.createEnvironment, simIK.getObjectParent, simIK.getObjectHandle |
simIK.setObjectPose
Description |
Sets the pose (position and quaternion) of an object. If the object is a joint object, the pose does not include the joint's intrinsic transformation. |
Lua synopsis |
simIK.setObjectPose(int environmentHandle,int objectHandle,int relativeToObjectHandle,float[7] pose) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which the pose is expressed. Otherwise, specify simIK.handle_world if you specify the absolute pose, or simIK.handle_parent if you specify the pose relative to the parent object.
pose: the position and quaternion (x,y,z,qx,qy,qz,qw).
|
Lua return values |
|
Python synopsis |
simIK.setObjectPose(int environmentHandle,int objectHandle,int relativeToObjectHandle,list pose) |
See also |
simIK.createEnvironment, simIK.getObjectPose, simIK.setObjectTransformation, simIK.setObjectMatrix, simIK.setJointPosition, simIK.getObjectHandle |
simIK.setObjectTransformation
Description |
Sets the transformation (position and quaternion/Euler angles) of an object. If the object is a joint object, the transformation does not include the joint's intrinsic transformation. |
Lua synopsis |
simIK.setObjectTransformation(int environmentHandle,int objectHandle,int relativeToObjectHandle,float[3] position,float[] eulerOrQuaternion) |
Lua arguments |
environmentHandle: the handle of the environment.
objectHandle: the handle of the object.
relativeToObjectHandle: the handle of an object relative to which the transformation is expressed. Otherwise, specify simIK.handle_world if you specify the absolute transformation, or simIK.handle_parent if you specify the transformation relative to the parent object.
position: the position component of the transformation.
eulerOrQuaternion: the orientation component of the transformation. If 3 values are specified, then they will be interpreted as Euler angles (alpha,beta,gamma). If 4 values are specified, they will be interpreted as quaternion values (x,y,z,w).
|
Lua return values |
|
Python synopsis |
simIK.setObjectTransformation(int environmentHandle,int objectHandle,int relativeToObjectHandle,list position,list eulerOrQuaternion) |
See also |
simIK.createEnvironment, simIK.getObjectTransformation, simIK.setObjectPose, simIK.setObjectMatrix, simIK.setJointPosition, simIK.getObjectHandle |
simIK.setSphericalJointMatrix
Description |
Sets the rotation transformation matrix of a spherical joint. |
Lua synopsis |
simIK.setSphericalJointMatrix(int environmentHandle,int jointHandle,float[12] matrix) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
matrix: a table of 12 values representing the transformation matrix (the last row of the 4x4 matrix (0,0,0,1) is omitted). The translation part in the matrix will be ignored.
|
Lua return values |
|
Python synopsis |
simIK.setSphericalJointMatrix(int environmentHandle,int jointHandle,list matrix) |
See also |
simIK.createEnvironment, simIK.getJointMatrix, simIK.setJointPosition, simIK.setSphericalJointRotation, simIK.getObjectHandle |
simIK.setSphericalJointRotation
Description |
Sets the rotation transformation of a spherical joint. |
Lua synopsis |
simIK.setSphericalJointRotation(int environmentHandle,int jointHandle,float[] eulerOrQuaternion) |
Lua arguments |
environmentHandle: the handle of the environment.
jointHandle: the handle of the joint.
eulerOrQuaternion: the rotation transformation to apply. If 3 values are specified, they will be interpreted as Euler angles (alpha,beta,gamma). If 4 values are specified, they will be interpreted as quaternion values (x,y,z,w).
|
Lua return values |
|
Python synopsis |
simIK.setSphericalJointRotation(int environmentHandle,int jointHandle,list eulerOrQuaternion) |
See also |
simIK.createEnvironment, simIK.getJointTransformation, simIK.setSphericalJointMatrix, simIK.setJointPosition, simIK.getObjectHandle |
|