Skip to content

Commit 5509869

Browse files
Merge pull request #97 from DeepBlueRobotics/freshie-orientation
new encoder offset
2 parents 7233e9f + 56c74a5 commit 5509869

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/main/java/org/carlmontrobotics/Constants.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,8 @@ public static final class Armc {
120120
public static final boolean ENCODER_INVERTED = true;
121121

122122
// difference between CoG and arm is .328 rad
123-
public static final double ENCODER_OFFSET_RAD = -0.08 + .328; // - 0.6095;
123+
public static final double ENCODER_OFFSET_RAD = 6.132;
124+
// 0.08 + .328 - 0.404; // - 0.6095;
124125

125126
// TODO: finish understand why this is broken public static final Measure<Angle>
126127
// INTAKE_ANGLE = Degrees.to(-1);

src/main/java/org/carlmontrobotics/subsystems/Arm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,12 +396,12 @@ public Command sysIdDynamic(SysIdRoutine.Direction direction) {
396396
// #region Getters
397397

398398
public double getArmPos() {
399+
399400
return MathUtil.inputModulus(armMasterEncoder.getPosition(),
400401
ARM_DISCONT_RAD, ARM_DISCONT_RAD + 2 * Math.PI);// armMasterEncoder.getPosition();//MathUtil.inputModulus(armMasterEncoder.getPosition(),
401402
// ARM_DISCONT_RAD,
402403
// ARM_DISCONT_RAD + 2 * Math.PI);
403404
}
404-
405405
public double getArmVel() {
406406
return armMasterEncoder.getVelocity();
407407
}

0 commit comments

Comments
 (0)