Make sure claw is down when picking up vertical cans.
Change-Id: Ida9173ee7f8aeba6227d47bc437e93d2d3a48d6c
diff --git a/frc971/actors/can_pickup_actor.cc b/frc971/actors/can_pickup_actor.cc
index 7b43694..ee1d21e 100644
--- a/frc971/actors/can_pickup_actor.cc
+++ b/frc971/actors/can_pickup_actor.cc
@@ -18,6 +18,20 @@
: FridgeActorBase<CanPickupActionQueueGroup>(queues) {}
bool CanPickupActor::RunAction(const CanPickupParams ¶ms) {
+ // Make sure the claw is down.
+ {
+ auto message = control_loops::claw_queue.goal.MakeMessage();
+ message->angle = 0.0;
+ message->angular_velocity = 0.0;
+ message->intake = 0.0;
+ message->rollers_closed = true;
+ message->max_velocity = 6.0;
+ message->max_acceleration = 10.0;
+
+ LOG_STRUCT(DEBUG, "Sending claw down goal", *message);
+ message.Send();
+ }
+
// Go around the can.
DoFridgeProfile(params.pickup_height, params.pickup_angle, kElevatorMove,
kArmMove, false);