Add claw control loop.
It's based pretty heavily on the fridge loop. Currently, all the
tests pass.
Change-Id: Ieb386dfa5c3fe2d34e2d191fa39a44dc77ee6ab6
diff --git a/frc971/control_loops/claw/claw.q b/frc971/control_loops/claw/claw.q
index 1ca5746..00c38c4 100644
--- a/frc971/control_loops/claw/claw.q
+++ b/frc971/control_loops/claw/claw.q
@@ -13,6 +13,8 @@
message Goal {
// Angle of wrist joint.
double angle;
+ // Angular velocity of wrist.
+ double angular_velocity;
// Voltage of intake rollers. Positive means sucking in, negative means
// spitting out.
double intake;
@@ -39,8 +41,10 @@
message Status {
// Is claw zeroed?
bool zeroed;
- // Has claw zeroed and reached goal?
- bool done;
+ // Did the claw estop?
+ bool estopped;
+ // The internal state of the claw state machine.
+ uint32_t state;
// Angle of wrist joint.
double angle;
@@ -53,7 +57,7 @@
bool rollers_open;
// True iff there has been enough time since we actuated the rollers closed
// that they should be there.
- bool rollers_close;
+ bool rollers_closed;
};
queue Goal goal;