setAccel(3)

NAME
setCartAccel, setJointAccel, setAccelScale -- set accelerations for RCCL motions.

USAGE
#include <rccl.h>

setCartAccel (mnp, taccel, raccel)
  MANIP *mnp;
  float taccel, raccel;

setJointAccel (mnp, jaccel)
  MANIP *mnp;
  JNTS *jaccel;

float setAccelScale (mnp, scale)
  MANIP *mnp;
  float scale;

ARGUMENTS

mnp --
    Manipulator reference structure.

taccel --
    Translational acceleration (mm. per second^2).

raccel --
    Rotational acceleration (degrees per second^2).

jaccel --
    Joint level accelerations (degrees or mm. per second^2).

scale --
    Acceleration scale factor (nominal value is 1.0)

RESTRICTIONS
These routines must be called from the planning level. setJointAccel() is not defined for virtual manipulators.

DESCRIPTION
These routines set the acceleration limits associated with a particular manipulator.

The RCCL trajectory generator creates a transition interval which smoothly connects different motion path segments. The length of the transition interval is computed dynamically for each manipulator based on its current acceleration limits. The higher the acceleration limit, the smaller the transition interval. Cartesian motions are constrained by two seperate acceleration limits, one for translation and one for rotation. Joint interpolated motions are constrained by a set of acceleration limits, one per joint. For the details on how the transition time is computed from the acceleration limit, consult the document "Trajectory Generation in Multi-RCCL".

setCartAccel() sets the translational and rotational acceleration limits used by Cartesian interpolated motions. If either taccel or raccel is specified as F_UNDEF, then the existing value is not changed. Specifying either value as F_DEFAULT causes the corresponding default acceleration to be set. Specifying any other non-positive value is illegal. The specification takes effect at the beginning of the next requested motion, and is valid for all subsequent motions.

Default values for the accelerations are chosen when the manipulator is created with rcclCreate(). For virtual manipulators, the accelerations are set to the defined constants DEFAULT_TRANS_ACCEL and DEFAULT_ROT_ACCEL. If the manipulator is a real robot, then the accelerations are computed from the nominal joint accelerations described in the nominalAcc field of the robot's JLS data structure. This is done using the manipulator Jacobian evaluated at the position bestAngles, which is also defined in the JLS structure.

setJointAccel() sets the accelerations for joint interpolated motions. Acceleration values are placed in the v field of jaccel. If any of these are specified as F_UNDEF then the corresponding joint acceleration value is not changed. Specifying any value as F_DEFAULT causes the default acceleration to be set for the corresponding joint. Specifying any other non-positive value is illegal. The specification takes effect at the end of the next requested motion, and is valid for all subsequent motions. This call is not legal for virtual manipulators.

Default values for the joint accelerations are chosen when the the manipulator is created with rcclCreate(). These are taken from the values defined in the nominalAcc field of the robot's JLS structure.

setAccelScale() specifies a scale factor that is applied to both the Cartesian and joint level acceleration limits. The default value for this scale factor is 1. A value less than 1 will cause transition times to increase, while a value greater than 1 will cause transition times to decrease, without having to change the primary limits set by setCartAccel() and setJointAccel(). The routine returns the previous scale value.

One use of these routines is to set the acceleration characteristics of a virtual manipulator to be equal to that of a real robot. This may be necessary if the virtual manipulator is being used to drive one or more real robots as a slave.

DIAGNOSTICS
These routines return -1 (or -1.0) in the event of an error. They will automatically abort the program if the option RCCL_ERROR_EXIT is set (see rcclSetOptions(3)). Error codes and messages are placed on the errorStack (q.v.). The following error codes may be set:

ERange --
    A non-positive value not equal to F_UNDEF or F_DEFAULT was specified in one of the set routines.

setJointAccel() may also set the following:

ENotDefined --
    The routine was called for a virtual manipulator.

These routines will abort the program if called from the control level.

SEE ALSO
rcclCreate(3), setSpeed(3), move(3), JLS(3), rcclSetOptions(3), errorStack(3)