|
@ -22,6 +22,7 @@ class LinearJointTrajectory : public Trajectory<SIZE> |
|
|
// calculate maximum velocity and acceleration |
|
|
// calculate maximum velocity and acceleration |
|
|
Vec<float, SIZE> maxJointLocalVelocity = maxJointVelocity * (sampleTimeMs / MStoSec); |
|
|
Vec<float, SIZE> maxJointLocalVelocity = maxJointVelocity * (sampleTimeMs / MStoSec); |
|
|
Vec<float, SIZE> maxJointLocalAcceleration = maxJointAcceleration * (sampleTimeMs / MStoSec); |
|
|
Vec<float, SIZE> maxJointLocalAcceleration = maxJointAcceleration * (sampleTimeMs / MStoSec); |
|
|
|
|
|
std::cout << "max : " << maxJointLocalVelocity << "\n"; |
|
|
|
|
|
|
|
|
// calculate delta movement |
|
|
// calculate delta movement |
|
|
Vec<float,SIZE> jointMovement = jointEnd - jointStart; |
|
|
Vec<float,SIZE> jointMovement = jointEnd - jointStart; |
|
@ -31,7 +32,10 @@ class LinearJointTrajectory : public Trajectory<SIZE> |
|
|
|
|
|
|
|
|
// calculate number of movement steps |
|
|
// calculate number of movement steps |
|
|
Vec<float,SIZE> minStepsPerJoint = jointMovementAbs.celldivide(maxJointLocalVelocity); |
|
|
Vec<float,SIZE> minStepsPerJoint = jointMovementAbs.celldivide(maxJointLocalVelocity); |
|
|
|
|
|
std::cout << "minsteps : " << minStepsPerJoint << "\n"; |
|
|
|
|
|
std::cout << "steps : " << minStepsPerJoint.max() << "\n"; |
|
|
this->steps = ceil(minStepsPerJoint.max()); |
|
|
this->steps = ceil(minStepsPerJoint.max()); |
|
|
|
|
|
std::cout << "steps : " << this->steps << "\n"; |
|
|
if (this->steps == 0) |
|
|
if (this->steps == 0) |
|
|
this->steps +=1; |
|
|
this->steps +=1; |
|
|
|
|
|
|
|
|