Fix documentation in fridge.q and actions.
Austin made zero on the arm sticking straight up, and the comments
in fridge.q ended up being wrong. I fixed these comments, as well
as the actions that I had written based on them.
I also made the comments in fridge.q about zero on the elevator
match the ones in constants.cc.
Change-Id: Ie50c99f6cafc82f0e4baba851cd20353a9d871ac
diff --git a/frc971/actors/score_actor.cc b/frc971/actors/score_actor.cc
index 25edbff..0ab54de 100644
--- a/frc971/actors/score_actor.cc
+++ b/frc971/actors/score_actor.cc
@@ -52,13 +52,13 @@
// We're going to move the elevator first so we don't crash the fridge into
// the ground.
- DoProfile(values.fridge.arm_zeroing_height, M_PI / 2.0, true);
+ DoProfile(values.fridge.arm_zeroing_height, 0.0, true);
// Now move them both together.
- DoProfile(params.height, M_PI, true);
+ DoProfile(params.height, M_PI / 2.0, true);
// Release the totes.
- DoProfile(values.fridge.arm_zeroing_height, M_PI / 2.0, false);
+ DoProfile(values.fridge.arm_zeroing_height, 0.0, false);
// Retract. Move back to our lowered position.
- DoProfile(values.fridge.elevator.lower_limit, M_PI / 2.0, false);
+ DoProfile(values.fridge.elevator.lower_limit, 0.0, false);
return true;
}
diff --git a/frc971/actors/stack_actor.cc b/frc971/actors/stack_actor.cc
index ff9c739..6ce8fbd 100644
--- a/frc971/actors/stack_actor.cc
+++ b/frc971/actors/stack_actor.cc
@@ -28,7 +28,7 @@
params.elevator_max_velocity = kElevatorMaxVelocity;
params.elevator_max_acceleration = kElevatorMaxAccel;
- params.arm_angle = M_PI / 2.0;
+ params.arm_angle = 0.0;
params.arm_max_velocity = kArmMaxVelocity;
params.arm_max_acceleration = kArmMaxAccel;
diff --git a/frc971/control_loops/fridge/fridge.q b/frc971/control_loops/fridge/fridge.q
index be54ee7..f8fa16e 100644
--- a/frc971/control_loops/fridge/fridge.q
+++ b/frc971/control_loops/fridge/fridge.q
@@ -15,13 +15,14 @@
queue_group FridgeQueue {
implements aos.control_loops.ControlLoop;
- // All angles are in radians with 0 sticking straight out horizontally over
- // the intake (the front). Rotating up and into the robot (towards the back
+ // All angles are in radians with 0 sticking straight up.
+ // Rotating up and into the robot (towards the back
// where boxes are placed) is positive. Positive output voltage moves all
// mechanisms in the direction with positive sensor values.
- // Elevator heights are the vertical distance (in meters) from the top of the
- // frame (at the front and back) to the axis of the bottom pivot of the arm.
+ // Elevator heights are the vertical distance (in meters) from a defined zero.
+ // In this case, zero is where the portion of the carriage that Spencer
+ // removed lines up with the bolt.
message Goal {
// Angle of the arm.
@@ -47,7 +48,7 @@
message Status {
// Are both the arm and elevator zeroed?
bool zeroed;
-
+
// Angle of the arm.
double angle;
// Height of the elevator.