Skip to content

Commit ce812f5

Browse files
authored
Merge pull request #301 from thedropbears/retune_arm
redo arm profile
2 parents cf2adc4 + 52c046f commit ce812f5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

components/wrist.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,11 @@ def __init__(self, mech_root: wpilib.MechanismRoot2d):
4949
self.wrist_profile = TrapezoidProfile(
5050
TrapezoidProfile.Constraints(self.WRIST_MAX_VEL, self.WRIST_MAX_ACC)
5151
)
52-
# Values need to be modified with new gear ratio
53-
self.pid = PIDController(Kp=8.0177, Ki=0, Kd=0.0062399)
52+
# theoretical max pos 0.01 max velocity 0.1
53+
self.pid = PIDController(Kp=37.129, Ki=0, Kd=0.091477)
5454

55-
self.wrist_ff = ArmFeedforward(kS=0.42619, kG=0.18, kV=4.09, kA=0.003)
55+
# https://www.reca.lc/arm?armMass=%7B%22s%22%3A8%2C%22u%22%3A%22kg%22%7D&comLength=%7B%22s%22%3A0.15%2C%22u%22%3A%22m%22%7D&currentLimit=%7B%22s%22%3A40%2C%22u%22%3A%22A%22%7D&efficiency=90&endAngle=%7B%22s%22%3A-10%2C%22u%22%3A%22deg%22%7D&iterationLimit=10000&motor=%7B%22quantity%22%3A1%2C%22name%22%3A%22NEO%22%7D&ratio=%7B%22magnitude%22%3A432%2C%22ratioType%22%3A%22Reduction%22%7D&startAngle=%7B%22s%22%3A-110%2C%22u%22%3A%22deg%22%7D
56+
self.wrist_ff = ArmFeedforward(kS=0.42619, kG=0.45, kV=4.10, kA=0.01)
5657

5758
wrist_config.encoder.positionConversionFactor(
5859
math.tau * (1 / self.wrist_gear_ratio)

0 commit comments

Comments
 (0)