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 baseCycleTime,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).
baseCycleTime: the smallest expected cycle time. The cycle time should always be a multiple of baseCycleTime. 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, i.e. [maxV_1, ..., maxV_n]). If sim.ruckig_minvel is specified in flags, then maxVel should contain [maxV_1, ..., maxV_n,minV_1, ..., minV_n]
maxAccel: the maximum allowed acceleration (one value for each DoF, i.e. [maxA_1, ..., maxA_n]). If sim.ruckig_minaccel is specified in flags, then maxAccel should contain [maxA_1, ..., maxA_n, minA_1, ..., minA_n]
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 baseCycleTime,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
dofs: the number of degrees of freedom (n).
baseCycleTime: the smallest expected cycle time. The cycle time should always be a multiple of baseCycleTime. Use a value of 0.0001 (0.1ms).
flags: Ruckig flags. -1 for default flags.
currentPosVelAccel: the current position, velocity and acceleration: {pos_1, ..., pos_n, vel_1, ..., vel_n, accel_1, ..., accel_n} (one value for each DoF)
maxVelAccelJerk: the maximum allowed velocity, acceleration and jerk: {maxV_1, ..., maxV_n, maxA_1, ..., maxA_n, maxJ_1, ..., maxJ_n}. If sim.ruckig_minvel is specified in flags, then maxVelAccelJerk should contain following additional values: {minV_1, ..., minV_n}. If sim.ruckig_minaccel is specified in flags, then maxVelAccelJerk should contain following additional values: {minA_1, ..., minA_n}
selection: the selection vector (one value for each DoF). For a default behaviour, fill the vector with non-zero values.
targetPosVel: the target position and velocity: {tPos_1, ..., tPos_n, tVel_1, ..., tVel_n}
Lua
return values
handle: the handle to the created object
Python
synopsis
int handle=sim.ruckigPos(int dofs,float baseCycleTime,int flags,list currentPosVelAccel,list maxVelAccelJerk,list selection,list targetPosVel)