Update python models to have accurate constants
This should bring the python models all up to date. Thanks Sarah for
pulling some of these out of the CAD.
Change-Id: I948685629b8d6835dccd72e623bf110525cb4254
diff --git a/frc971/control_loops/python/angular_system.py b/frc971/control_loops/python/angular_system.py
index 36da41a..bd4447b 100755
--- a/frc971/control_loops/python/angular_system.py
+++ b/frc971/control_loops/python/angular_system.py
@@ -22,6 +22,13 @@
kalman_q_voltage,
kalman_r_position,
dt=0.00505):
+ """Constructs an AngularSystemParams object.
+
+ Args:
+ motor: Motor object with the motor constants.
+ G: float, Gear ratio. Less than 1 means output moves slower than the
+ input.
+ """
self.name = name
self.motor = motor
self.G = G
diff --git a/frc971/control_loops/python/control_loop.py b/frc971/control_loops/python/control_loop.py
index 919968e..f124852 100644
--- a/frc971/control_loops/python/control_loop.py
+++ b/frc971/control_loops/python/control_loop.py
@@ -685,3 +685,7 @@
(12.0 - self.resistance * self.free_current))
# Torque constant
self.Kt = self.stall_torque / self.stall_current
+ # Motor inertia in kg m^2
+ # Diameter of 1.9", weight of: 100 grams
+ # TODO(austin): Get a number from Scott Westbrook for the mass
+ self.motor_inertia = 0.1 * ((0.95 * 0.0254) ** 2.0)