Regular API function

simRuckigPos / sim.ruckigPos

Description Executes a call to the Ruckig online trajectory generator. The Ruckig online trajectory generator provides instantaneous trajectory generation capabilities for motion control systems. This function prepares a position-based trajectory generation object, that can then be calculated with sim.ruckigStep. When this object is not needed anymore, remove it with sim.ruckigRemove. See also sim.ruckigVel, sim.moveToPose and sim.moveToConfig.
C/C++
synopsis
simInt simRuckigPos(simInt dofs,simDouble smallestTimeStep,simInt flags,const simDouble* currentPos,const simDouble* currentVel,const simDouble* currentAccel,const simDouble* maxVel,const simDouble* maxAccel,const simDouble* maxJerk,const simBool* selection,const simDouble* targetPos,const simDouble* targetVe,simDouble* reserved1,simInt* reserved2l)
C/C++
parameters
dofs: the number of degrees of freedom (N).
smallestTimeStep: the smallest expected cycle time. Use a value of 0.0001 (0.1ms).
flags: Ruckig flags. -1 for default flags.
currentPos: the current position (one value for each DoF)
currentVel: the current velocity (one value for each DoF)
currentAccel: the current acceleration (one value for each DoF)
maxVel: the maximum allowed velocity (one value for each DoF)
maxAccel: the maximum allowed acceleration (one value for each DoF)
maxJerk: the maximum allowed jerk (one value for each DoF)
selection: the selection vector (one value for each DoF). For a default behaviour, fill the vector with non-zero values.
targetPos: the target position (one value for each DoF)
targetVel: the target velocity (one value for each DoF)
reserved1: reserved. Set to nullptr
reserved2: reserved. Set to nullptr
C/C++
return value
A negative value in case of an error, otherwise the handle of the created object
Lua synopsis int handle=sim.ruckigPos(int dofs,float smallestTimeStep,int flags,float[] currentPosVelAccel,float[] maxVelAccelJerk,int[] selection,float[] targetPosVel)

If you wish to use this function in a blocking mode, consider using sim.moveToPose and sim.moveToConfig instead.
Lua parameters
Similar to the C-function counterpart
Lua return values
Similar to the C-function counterpart
Python synopsis int handle=sim.ruckigPos(int dofs,float smallestTimeStep,int flags,list currentPosVelAccel,list maxVelAccelJerk,list selection,list targetPosVel)