Skip to content

Commit

Permalink
started to rework the create trajectory function for jerk testing
Browse files Browse the repository at this point in the history
  • Loading branch information
SPD3 committed Oct 7, 2017
1 parent 68437ce commit 5cce2e6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -264,8 +264,12 @@ public void createTrajectory(Path Key, double maxVelocity, double maxAcceleratio
*/

if (theoreticalMaxVelocity > setpoint.maxVelocity) {
double distanceAccelerating = getDistanceTraveledWhileAccelerating(setpoint.vi, setpoint.maxVelocity,
Key.maxAcceleration);
double viJerkDistance = getDistanceTraveledWhileAccelerating(setpoint.vi, maxJerk, Key.maxJerk);

double distanceAtMaxAcceleration = setpoint.maxVelocity - (2*viJerkDistance);

setpoint.firstStartAccelerationCruisingDeltaTime = (Key.maxAcceleration - setpoint.vi)/Key.maxJerk;


setpoint.startVeloctityCruisingDeltaTime = (setpoint.maxVelocity - setpoint.vi) / Key.maxAcceleration;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public MotionProfilingTesting() {
e.printStackTrace();
}

Robot.kinematicsSimpler.createTrajectory(myFirstPath, 2.0, 0.5);
Robot.kinematicsSimpler.createTrajectory(myFirstPath, 2.0, 0.5, 0.25);

addSequential(new MoveWithEncoder(myFirstPath));
}
Expand Down

0 comments on commit 5cce2e6

Please sign in to comment.