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 joint positions/angles.
currentVel: the current velocity. Can be nil in which case a velocity vector of 0 is used.
currentAccel: the current acceleration. Can be nil in which case an acceleration vector of 0 is used.
maxVel: the maximum allowed velocity.
maxAccel: the maximum allowed acceleration.
maxJerk: the maximum allowed jerk.
targetPos: the desired target configuration.
targetVel: the desired target point velocity. 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)