Lua synopsis

table[7]/table[12] endPose/endMatrix,float timeLeft=sim.moveToPose(int flags,table[7]/table[12] currentPose/currentMatrix,table[] maxVel,table[] maxAccel,table[] maxJerk,table[7]/table[12] targetPose/targetMatrix,function callback,auxData,table[4] metric=nil,float timeStep=0) 
Lua parameters 
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.
maxAccel: the maximum allowed acceleration. If metric is specified, then this is a table of size 1, otherwse a table of size 4.
maxJerk: the maximum allowed jerk. If metric is specified, then this is a table of size 1, otherwse a table of size 4. With the RML type II plugin, the max. jerk will however always be infinite.
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 posepose distance. If metric is nil, the movement calculation happens in the 4dimensional space (x,y,z,angle), otherwise it happens in the 1dimensional 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.
