Regular API function

sim.moveToPose

Description Generates object movement data using the Ruckig online trajectory generator, by performing interpolations between two poses. The function can operate by handling 4 movement variables (x,y,z and angle between the two poses), or a single movement variable (t, which requires a metric to be specified for distance calculation between the two poses). This function can only be called from child scripts running in a thread or from a coroutine (since this is a blocking operation). See also sim.moveToConfig, and sim.ruckigPos.
C/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
float[7]/float[12] endPose/endMatrix,float timeLeft=sim.moveToPose(int flags,float[7]/float[12] currentPose/currentMatrix,float[] maxVel,float[] maxAccel,float[] maxJerk,float[7]/float[12] targetPose/targetMatrix,func/string callback,auxData,float[4] metric=nil,float timeStep=0)
Lua
parameters
flags: Ruckig flags. -1 for default flags.
currentPose/currentMatrix: the start pose, specified via a pose (x,y,z,qx,qy,qz,qw) or transformation matrix (the last row of the 4x4 matrix is omitted).
maxVel: the maximum allowed velocity. If metric is specified, then this is a table of size 1, otherwse a table of size 4. If sim.ruckig_minVel is specified in flags, then this table should contain twice as many values, first the values for the maximum velocity, then the values for the minimum velocity.
maxAccel: the maximum allowed acceleration. If metric is specified, then this is a table of size 1, otherwse a table of size 4. If sim.ruckig_minAccel is specified in flags, then this table should contain twice as many values, first the values for the maximum acceleration, then the values for the minimum acceleration.
maxJerk: the maximum allowed jerk. If metric is specified, then this is a table of size 1, otherwse a table of size 4.
targetPose/targetMatrix: the goal pose, specified via a pose (x,y,z,qx,qy,qz,qw) or transformation matrix (the last row of the 4x4 matrix is omitted).
callback: a callback function that will be called for each movement step. The arguments provided to the callback function are: currentPose/currentMatrix, currentVel, currentAccel, auxData.
auxData: random data that will be forwarded to the callback function.
metric: an optional metric, used to compute a pose-pose distance. If metric is nil, the movement calculation happens in the 4-dimensional space (x,y,z,angle), otherwise it happens in the 1-dimensional space (t).
timeStep: the desired time step size. A value of 0 indicates that the current simulation time step will be used.
Lua
return values
endPose/endMatrix: the pose at the end of the movement, specified via a pose (x,y,z,qx,qy,qz,qw) or transformation matrix (the last row of the 4x4 matrix is omitted).
timeLeft: the leftover time in current simulation step, i.e. the remaining time that was not used for movement.
Python
synopsis
list endPose/endMatrix,float timeLeft=sim.moveToPose(int flags,list currentPose/currentMatrix,list maxVel,list maxAccel,list maxJerk,list targetPose/targetMatrix,func callback,auxData,list metric=None,float timeStep=0)

<