Regular API function

sim.moveToConfig

Description Generates joint movement data using the Ruckig online trajectory generator. 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.moveToPose, and sim.ruckigPos.
C/C++
synopsis
C/C++
parameters
C/C++
return value
Lua
synopsis
float[] endPos,float[] endVel,float[] endAccel,float timeLeft=sim.moveToConfig(int flags,float[] currentPos,float[] currentVel,float[] currentAccel,float[] maxVel,float[] maxAccel,float[] maxJerk,float[] targetPos,float[] targetVel,func/string callback,auxData,bool[] cyclicJoints=nil,float timeStep=0)
Lua
parameters
flags: Ruckig flags. -1 for default flags.
currentPos: the current configuration, i.e. the current linear/angular joint positions, one value for each DoF.
currentVel: the current velocity, one value for each DoF. Can be nil in which case a velocity vector of 0 is used.
currentAccel: the current acceleration, one value for each DoF. Can be nil in which case an acceleration vector of 0 is used.
maxVel: the maximum allowed velocity, one value for each DoF. If sim.ruckig_minvel is specified in flags, then maxVel should contain following values: {maxV_1, ..., maxV_n, minV_1, ..., minV_n}, i.e. 2x DoF values.
maxAccel: the maximum allowed acceleration, one value for each DoF. If sim.ruckig_minaccel is specified in flags, then maxAccel should contain following values: {maxA_1, ..., maxA_n, minA_1, ..., minA_n}, i.e. 2x DoF values.
maxJerk: the maximum allowed jerk, one value for each DoF.
targetPos: the desired target configuration, one value for each DoF.
targetVel: the desired target point velocity, one value for each DoF. Can be nil in which case a velocity vector of 0 is used.
callback: a callback function that will be called for each movement step. The arguments provided to the callback function are: currentConfig, currentVel, currentAccel, auxData.
auxData: random data that will be forwarded to the callback function.
cyclicJoints: a table of booleans indicating which joint is cyclic (for cyclic joints, the movement will always go in the direction that represents the shortest distance to the goal). Can be nil or omitted.
timeStep: the desired time step size. A value of 0 indicates that the current simulation time step will be used.
Lua
return values
endPos: the configuration at the end of the movement.
endVel: the velocity at the end of the movement.
endAccel: the acceleration at the end of the movement.
timeLeft: the leftover time in current simulation step, i.e. the remaining time that was not used for movement.
Python
synopsis
list endPos,list endVel,list endAccel,float timeLeft=sim.moveToConfig(int flags,list currentPos,list currentVel,list currentAccel,list maxVel,list maxAccel,list maxJerk,list targetPos,list targetVel,func callback,auxData,list cyclicJoints=None,float timeStep=0)

<