-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
140 arm and wrist subsystem checkup (#175)
* halfway through massive changes * basic pid for wrist + arm Co-authored-by: Rishi Reddy <RishiReddy1002@users.noreply.github.com> * final touchups Co-authored-by: Rishi Reddy <RishiReddy1002@users.noreply.github.com> * spotless * add ARMWRIST stuff * tuneablelele * even more fox 111!!!!11!!!1!1 * little stuff - cleaned up the Arm & Wrist subsystem * moved wrist subsystem * got basically all code properly written including, * current limit for wrist * flipping for wrist * PID loops for wrist and arm Co-authored-by: Matthew Milunic <mmilunicmobile@users.noreply.github.com> Co-authored-by: AlexNunemacher <AlexNunemacher@users.noreply.github.com> * properly added back in upper and lower bound for wrist and arm and made sure all constants were in * Fixed two very minor bugs * Formatted and functional. (Added PID gains that arent 0) --------- Co-authored-by: Asa Wang <axxwang13@gmail.com> Co-authored-by: Rishi Reddy <RishiReddy1002@users.noreply.github.com> Co-authored-by: Unciaur <52894100+Unciaur@users.noreply.github.com> Co-authored-by: wibwib <ray@dokholyan.org> Co-authored-by: Elliptication <amajha@hershey.k12.pa.us> Co-authored-by: Liam P. <liamthomaspotter@gmail.com> Co-authored-by: Matthew Milunic <mmilunicmobile@users.noreply.github.com> Co-authored-by: AlexNunemacher <AlexNunemacher@users.noreply.github.com>
- Loading branch information
1 parent
dfdf480
commit e106f80
Showing
16 changed files
with
465 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
package frc.robot.constants; | ||
|
||
import com.ctre.phoenix6.configs.MotionMagicConfigs; | ||
import com.ctre.phoenix6.configs.Slot0Configs; | ||
import com.ctre.phoenix6.signals.GravityTypeValue; | ||
import com.ctre.phoenix6.configs.CurrentLimitsConfigs; | ||
|
||
public class ArmConstants { | ||
|
||
public static final int ARM_PIVOT_MOTOR_ID = 0; // not correct motor ID | ||
public static final int WRIST_MOTOR_ID = 1; // not correct motor ID | ||
|
||
public static final Slot0Configs slot0Configs = | ||
new Slot0Configs() | ||
.withKA(0) | ||
.withKD(0) | ||
.withKG(0) | ||
.withKI(0) | ||
.withKP(0) | ||
.withKS(0) | ||
.withKV(0) | ||
.withGravityType(GravityTypeValue.Elevator_Static); | ||
; | ||
public static final MotionMagicConfigs motionMagicConfigs = | ||
new MotionMagicConfigs() | ||
.withMotionMagicAcceleration(4) // these are guesses, come back here | ||
.withMotionMagicCruiseVelocity(4) // also guess | ||
.withMotionMagicJerk(4); | ||
|
||
public static final double WRIST_KP = 0; | ||
public static final double WRIST_KD = 0; | ||
public static final double WRIST_KI = 0; | ||
public static final String ARM_PIVOT_CANBUS = "CANivore"; | ||
|
||
public static final int ARM_THROUGHBORE_ENCODER_ID = 0; | ||
|
||
// public static final Slot0Configs slot0Configs = | ||
// new Slot0Configs() | ||
// .withKA(0) | ||
// .withKD(0) | ||
// .withKG(0) | ||
// .withKI(0) | ||
// .withKP(0) | ||
// .withKS(0) | ||
// .withKV(0) | ||
// .withGravityType(GravityTypeValue.Elevator_Static); | ||
// ; | ||
// public static final MotionMagicConfigs motionMagicConfigs = | ||
// new MotionMagicConfigs() | ||
// .withMotionMagicAcceleration(4) // these are guesses, come back here | ||
// .withMotionMagicCruiseVelocity(4) // also guess | ||
// .withMotionMagicJerk(4); | ||
|
||
public static final CurrentLimitsConfigs currentLimitConfigs = new CurrentLimitsConfigs(); | ||
|
||
public static final double ARM_KP = 5; | ||
public static final double ARM_KD = 0; | ||
public static final double ARM_KI = 0; | ||
|
||
public static final double ARM_TOLERANCE = 0.01; | ||
|
||
public static final double upperLimit = 100; | ||
public static final double lowerLimit = 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package frc.robot.constants; | ||
|
||
public class WristConstants { | ||
|
||
public static final int WRIST_MOTOR_ID = 11; | ||
public static final String WRIST_CANBUS = "CANivore"; | ||
|
||
public static final int WRIST_THROUGHBORE_ENCODER_ID = 1; | ||
|
||
public static final double WRIST_KP = 5; | ||
public static final double WRIST_KD = 0; | ||
public static final double WRIST_KI = 0; | ||
|
||
public static final double WRIST_TOLERANCE = 0.01; | ||
|
||
public static final double WristCurrent = 0; | ||
|
||
public static final double upperLimit = 100; | ||
public static final double lowerLimit = 0; | ||
} |
Oops, something went wrong.