Regular API function


Description Generates joint movement data using the Reflexxes Motion Library type II or IV. 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.rmlPos.
C synopsis
C parameters
C return value
Lua synopsis table[] endPos,table[] endVel,table[] endAccel,float timeLeft=sim.moveToConfig(int flags,table[] currentPos,table[] currentVel,table[] currentAccel,table[] maxVel,table[] maxAccel,table[] maxJerk,table[] targetPos,table[] targetVel,function callback,auxData,table[] cyclicJoints=nil,float timeStep=0)
Lua parameters
flags: RML 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. With the RML type II plugin, the max. jerk will however always be infinite.
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.