Skip to content

Commit

Permalink
fixed feedforward stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
sofiebudman committed Mar 6, 2024
1 parent ec3ea78 commit 519029c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/carlmontrobotics/subsystems/Arm.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ private void driveArm() {
double armFeedVolts = armFeed.calculate(getArmPos(), setpoint.velocity);
if ((getArmPos() < LOWER_ANGLE_LIMIT_RAD)
|| (getArmPos() > UPPER_ANGLE_LIMIT_RAD)) {
armFeedVolts = kG * (COM_ARM_LENGTH_METERS) * Math.cos(getArmPos()) + armFeed.calculate(getCurrentArmGoal().position, 0);
armFeedVolts = armFeed.calculate(getArmPos(), 0);
//kg * cos(arm angle) * arm_COM_length
}
armPIDMaster.setReference(setpoint.position, CANSparkBase.ControlType.kPosition, 0, armFeedVolts);
Expand Down

0 comments on commit 519029c

Please sign in to comment.