Refactor angular_system out of 2016 intake
Change-Id: I82272ea74b375861f8472e735fd489b431614ebe
diff --git a/frc971/control_loops/python/linear_system.py b/frc971/control_loops/python/linear_system.py
index 21fa4ec..7129e32 100755
--- a/frc971/control_loops/python/linear_system.py
+++ b/frc971/control_loops/python/linear_system.py
@@ -4,7 +4,6 @@
from frc971.control_loops.python import control_loop
from frc971.control_loops.python import controls
import numpy
-import sys
from matplotlib import pylab
import glog
@@ -48,7 +47,7 @@
self.G = params.G
self.radius = params.radius
- # 5.4 kg of moving mass for the linear_system
+ # Mass in kg
self.mass = params.mass + self.motor.motor_inertia / (
(self.G * self.radius)**2.0)
@@ -126,8 +125,6 @@
def __init__(self, params, name='IntegralLinearSystem'):
super(IntegralLinearSystem, self).__init__(params, name=name)
- self.kalman_q_voltage = params.kalman_q_voltage
-
self.A_continuous_unaugmented = self.A_continuous
self.B_continuous_unaugmented = self.B_continuous
@@ -180,10 +177,10 @@
Args:
plant: plant object to use.
end_goal: end_goal state.
- controller: Intake object to get K from, or None if we should
+ controller: LinearSystem object to get K from, or None if we should
use plant.
- observer: Intake object to use for the observer, or None if we should
- use the actual state.
+ observer: LinearSystem object to use for the observer, or None if we
+ should use the actual state.
duration: float, time in seconds to run the simulation for.
kick_time: float, time in seconds to kick the robot.
kick_magnitude: float, disturbance in volts to apply.