sim.moveToConfig

Generates joint movement data using the Ruckig online trajectory generator. This function can only be called from scripts running in a thread, since this is a blocking operation

Synopsis

list endP, list endV, list endA, float t = sim.moveToConfig(int flags, list currentP, list currentV, list currentA, list maxV, list maxA, list maxJ, list targetP, list targetV, func callback, auxData, list cyclicJoints = None, float timeStep = 0) float[] endP, float[] endV, float[] endA, float t = sim.moveToConfig(int flags, float[] currentP, float[] currentV, float[] currentA, float[] maxV, float[] maxA, float[] maxJ, float[] targetP, float[] targetV, func/string callback, auxData, bool[] cyclicJoints = nil, float timeStep = 0)

Arguments

  • flags: Ruckig flags. -1 for default flags.
  • currentP: current configuration, i.e. the current linear/angular joint positions, one value for each DoF.
  • currentV: current velocity, one value for each DoF. Can be None/nil in which case a velocity vector of 0 is used.
  • currentA: current acceleration, one value for each DoF. Can be None/nil in which case an acceleration vector of 0 is used.
  • maxV: maximum allowed velocity, one value for each DoF. If sim.ruckig_minvel is specified in flags, then maxVel should contain following values: [maxV_1 ... maxV_n minV_1 ... minV_n], i.e. 2x DoF values.
  • maxA: maximum allowed acceleration, one value for each DoF. If sim.ruckig_minaccel is specified in flags, then maxAccel should contain following values: [maxA_1 ... maxA_n minA_1 ... minA_n], i.e. 2x DoF values.
  • maxJ: maximum allowed jerk, one value for each DoF.
  • targetP: desired target configuration, one value for each DoF.
  • targetV: desired target point velocity, one value for each DoF. Can be None/nil in which case a velocity vector of 0 is used.
  • callback: 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: array 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: desired time step size. A value of 0 indicates that the current simulation time step is used

Return values

  • endP: the configuration at the end of the movement.
  • endV: the velocity at the end of the movement.
  • endA: the acceleration at the end of the movement.
  • t: the leftover time in current simulation step, i.e. the remaining time that was not used for movement.


See also: