Revert "Support overshoot moves"

This reverts commit 0ea6a5a37b.
This commit is contained in:
Unknown
2018-09-18 22:13:17 -04:00
parent cd09406133
commit ea510fb8e5
+2 -17
View File
@@ -58,6 +58,7 @@ float TrapezoidalTrajectory::planTrapezoidal(float Xf, float Xi,
}
// Populate object's values
Xf_ = Xf;
Xi_ = Xi;
Vi_ = Vi;
@@ -73,23 +74,7 @@ float TrapezoidalTrajectory::planTrapezoidal(float Xf, float Xi,
yAccel_ = (Ar * Ta * Ta) / 2.0f + (Vi * Ta) + Xi;
Tav_ = Ta + Tv;
// If it's an overshoot trajectory, we need to re-do our process
// to generate the second-half of the trajectory
if (fabs(dX) <= dx_stop) {
TrapTrajStep_t traj;
traj = evalTrapTraj(Td_);
planTrapezoidal(Xf, traj.Y, traj.Yd, Vmax, Amax, Dmax);
// Fix initial points
Xi_ = Xi;
Vi_ = Vi;
// Fix time points
Ta_ += Td;
yAccel_ = (Ar_ * Ta_ * Ta_) / 2.0f + (Vi_ * Ta_) + Xi_;
Tav_ = Ta_ + Tv_;
}
return Ta_ + Tv_ + Td_;
return Ta + Tv + Td;
}
TrapTrajStep_t TrapezoidalTrajectory::evalTrapTraj(float t) {