Fixed claw angle conversion bug and scaled the hall effect on the drivetrain propperly.
diff --git a/frc971/control_loops/claw/claw.q b/frc971/control_loops/claw/claw.q
index 233a3ea..f1d2f93 100644
--- a/frc971/control_loops/claw/claw.q
+++ b/frc971/control_loops/claw/claw.q
@@ -31,10 +31,10 @@
double bottom_angle;
// How much higher the top claw is.
double separation_angle;
- // top claw intake roller
+ // top claw intake roller
double intake;
- // bottom claw tusk centering
- double centering;
+ // bottom claw tusk centering
+ double centering;
};
message Position {
diff --git a/frc971/control_loops/claw/claw_motor_plant.cc b/frc971/control_loops/claw/claw_motor_plant.cc
index 196b62c..76cbeca 100644
--- a/frc971/control_loops/claw/claw_motor_plant.cc
+++ b/frc971/control_loops/claw/claw_motor_plant.cc
@@ -9,9 +9,9 @@
StateFeedbackPlantCoefficients<4, 2, 2> MakeClawPlantCoefficients() {
Eigen::Matrix<double, 4, 4> A;
- A << 1.0, 0.0, 0.00740659366663, 0.0, 0.0, 1.0, 0.0, 0.00740659366663, 0.0, 0.0, 0.530576083967, 0.0, 0.0, 0.0, 0.0, 0.530576083967;
+ A << 1.0, 0.0, 0.00767587925947, 0.0, 0.0, 1.0, 0.0, 0.00767587925947, 0.0, 0.0, 0.574320358283, 0.0, 0.0, 0.0, 0.0, 0.574320358283;
Eigen::Matrix<double, 4, 2> B;
- B << 0.00101390984157, 0.0, 0.0, 0.00101390984157, 0.183524472124, 0.0, 0.0, 0.183524472124;
+ B << 0.000908630807869, 0.0, 0.0, 0.000908630807869, 0.166422350613, 0.0, 0.0, 0.166422350613;
Eigen::Matrix<double, 2, 4> C;
C << 1, 0, 0, 0, 1, 1, 0, 0;
Eigen::Matrix<double, 2, 2> D;
@@ -25,9 +25,9 @@
StateFeedbackController<4, 2, 2> MakeClawController() {
Eigen::Matrix<double, 4, 2> L;
- L << 1.43057608397, -4.48948312405e-16, -1.43057608397, 1.43057608397, 31.1907717473, -9.79345171104e-15, -31.1907717473, 31.1907717473;
+ L << 1.47432035828, 4.62747953155e-16, -1.47432035828, 1.47432035828, 35.823366785, 1.12408806964e-14, -35.823366785, 35.823366785;
Eigen::Matrix<double, 2, 4> K;
- K << 110.395400642, 0.0, 2.50425726274, 0.0, 0.0, 170.435941688, 0.0, 2.89797614353;
+ K << 78.988151683, 0.0, 1.65649264651, 0.0, 0.0, 109.921478378, 0.0, 2.09683545663;
return StateFeedbackController<4, 2, 2>(L, K, MakeClawPlantCoefficients());
}