Skip to content

Commit

Permalink
max feed forward acceleration added + max voltage in constants
Browse files Browse the repository at this point in the history
  • Loading branch information
Juliaaaahhhh committed Mar 2, 2024
1 parent 5b7a4a5 commit ab2ef91
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/carlmontrobotics/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,9 @@ public static final class Arm {
public static final double kP = 0.1;
public static final double kI = 0.1;
public static final double kD = 0.1;


public static final int MAX_VOLTAGE = 12;


//Arm measurements - ALL OF THEM ARE PLACEHOLDERS THE NUMBERS MEAN NOTHING
public static final double COM_ARM_LENGTH_METERS = 0.381 ;
Expand Down
5 changes: 5 additions & 0 deletions src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ public TrapezoidProfile.State calculateSetPoint(double goalSeconds, TrapezoidPro

public TrapezoidProfile.State calculateCustomSetPoint(double goalSeconds, TrapezoidProfile.State currentPoint, TrapezoidProfile.State goalState) {
return profile.calculate(goalSeconds, currentPoint, goalState);

}

public void maxacceleration(){
armFeed.maxAchievableAcceleration(MAX_VOLTAGE, armEncoder.getVelocity());
}

// public void driveArm(double timeToTarget, TrapezoidProfile.State goalState) {
Expand Down

0 comments on commit ab2ef91

Please sign in to comment.