In the following example, the trajectory generation scheme for a 6
dimensional robot called PUMA is described. The structure
"pumasetpoint_t" contains several variables including 3 dimensional
vectors for desired position (desPos), desired velocity (desPosVel)
and desired aceleration (desPosAcc). The structure also contains 3
dimensional vectors describing the orientation of the robot
end-effector, the desired orientation (desTRSF), the desired angular
velocity (desOmega) and the desired angular acceleration
(desOmegaDot). The trajectories are generated using a trapezoidal
velocity profile- the parameters for generating this velocity profile
are initial position (startPos, startTRSF), final positon (finalPos,
finalTRSF),times ta, tb and tf as shown in the figure, and the maximum
velocity (maxPosVel).
- typedef struct sVel).
- typedef struct pumasetpoint_s{
- int numAxis;
- VECTOR3 startPos;
- VECTOR3 finalPos;
- VECTOR3 maxPosVel;
- VECTOR3 desPos;
- VECTOR3 desPosVel;
- VECTOR3 desPosAcc;
- TRANSFORM startTRSF;
- TRANSFORM finalTRSF;
- TRANSFORM desTRSF;
- VECTOR3 desOmega;
- VECTOR3 desOmegaDot;
- float ta;
- float tb;
- float tf;
- float t;
- }pumasetpoint_t;
-
- pumasetpoint_t PUMA;
- void Isr1_PUMATrajGen()
- {
-
-
-
spatStrLineTrapezoid(&PUMA.desPos,&PUMA.desPosVel,&PUMA.desPosAcc,
&PUMA.startPos,&PU&PUMA.startPos,&PUMA.finalPos,PUMA.ta,PUMA.tb,PUMA.tf,
&PUMA.maxPosVel,PUMA.t);
-
rotTrapezoid(&PUMA.desTRSF,&PUMA.desOmega,&PUMA.desOmegaDot,
&PUMA.startTRSF, &PUMA.finalTRSF,PUMA.ta, PUMA.tb, PUMA.tf,
PUMA.t );
- }
void oneDimTrapvoid oneDimTrapezoid(float *lambda, float *lambdaDot, float *lambdaDDot, float ta, float tb, float tf, float t);StrLineTrapezoid
void StrLineTrapezoid(float *desPos, float *desVel, float *desAcc, unsigned int numAxis, float *startPos, float *finalPos, float tb, float ta, float tf, float *maxVel, float t);trajGenPVA
void trajGenPVA(float *desPos, float *desVel, float *desAcc, unsigned int numAxis, float *startPos, float *finalPos, float *paramVec, float tf, float *maxVel, float t, void (*posFunc)(void *, void *, void *, void *, void *, void *, void *, void *, void *), void (*lambdaFunc)(void *, void *, void *, void *));spatStrLineTrapezoid
void spatStrLineTrapezoid(VECTOR3 *desPos, VECTOR3 *desVel, VECTOR3 *desAcc, VECTOR3 *startPos, VECTOR3 *finalPos, float ta, float tb, float tf, VECTOR3 *maxVel, float t);circArcTrapezoid
void circArcTrapezoid(VECTOR3 *desPos, VECTOR3 *desVel, VECTOR3 *desAcc, VECTOR3 *startPos, VECTOR3 *finalPos, VECTOR3 *centerPos, float angle,, VECTOR3 *centerPos, float angle, float ta, float tb, float tf, VECTOR3 *maxVel, float t);rotTrapezoid
void rotTrapezoid(TRANSFORM *Ades, VECTOR3 *omega, VECTOR3 *omegadot, TRANSFORM *Astart, TRANSFORM *Afinal, float ta, float tb, float tf, float t);*rotConstrTrapezoid
TRANSFORM *rotConstrTrapezoid( TRANSFORM *A, VECTOR3 *ni, VECTOR3 *nf, VECTOR3 *ovec, float ta, float tb, float tf, float t);Last modified: Mon Feb 15 00:02:37 Eastern Standard Time 1999