Regular API function
simRuckigVel / sim.ruckigVel
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 velocity-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.ruckigPos. |
C/C++ synopsis
|
simInt simRuckigVel(simInt dofs,simDouble baseCycleTime,simInt flags,const simDouble* currentPos,const simDouble* currentVel,const simDouble* currentAccel,const simDouble* maxAccel,const simDouble* maxJerk,const simBool* selection,const simDouble* targetVel,simDouble* reserved1,simInt* reserved2) |
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).
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)
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.
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.ruckigVel(int dofs,float baseCycleTime,int flags,float[] currentPosVelAccel,float[] maxAccelJerk,int[] selection,float[] targetVel)
|
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).
currentPosVelAccel: the current position, velocity and acceleration: {pos_1, ..., pos_n, vel_1, ..., vel_n, accel_1, ..., accel_n} (one value for each DoF)
maxAccelJerk: the maximum allowed acceleration and jerk: {maxA_1, ..., maxA_n, maxJ_1, ..., maxJ_n}. If sim.ruckig_minaccel is specified in flags, then maxAccelJerk 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.
targetVel: the target velocity (one value for each DoF)
|
Lua return values
|
handle: the handle of the created object
|
Python synopsis |
int handle=sim.ruckigVel(int dofs,float baseCycleTime,int flags,list currentPosVelAccel,list maxAccelJerk,list selection,list targetVel) |
|