Convert y2014 to y2016, and get the drivetrain running.
I made a y2016 folder based on what was in y2014. Right now, it only has
a drivetrain control loop, and all the constants are not up to date with
the current CAD design. Changes from y2014 can be viewed by comparing to
the BASE commit, since I put this commit on top of a dummy y2014 folder
renamed y2016. Hope this helps.
Change-Id: I3f1d1d1a14a99ac441c51b2a67cbade7cbd708ab
diff --git a/y2016/control_loops/python/BUILD b/y2016/control_loops/python/BUILD
index 84e73a5..b424625 100644
--- a/y2016/control_loops/python/BUILD
+++ b/y2016/control_loops/python/BUILD
@@ -1,4 +1,4 @@
-package(default_visibility = ['//y2014:__subpackages__'])
+package(default_visibility = ['//y2016:__subpackages__'])
py_binary(
name = 'drivetrain',
@@ -37,28 +37,3 @@
'//frc971/control_loops/python:controls',
],
)
-
-py_binary(
- name = 'claw',
- srcs = [
- 'claw.py',
- ],
- deps = [
- ':polydrivetrain_lib',
- '//external:python-gflags',
- '//external:python-glog',
- '//frc971/control_loops/python:controls',
- ]
-)
-
-py_binary(
- name = 'shooter',
- srcs = [
- 'shooter.py',
- ],
- deps = [
- '//external:python-gflags',
- '//external:python-glog',
- '//frc971/control_loops/python:controls',
- ]
-)
diff --git a/y2016/control_loops/python/drivetrain.py b/y2016/control_loops/python/drivetrain.py
index 2a93285..f67662c 100755
--- a/y2016/control_loops/python/drivetrain.py
+++ b/y2016/control_loops/python/drivetrain.py
@@ -14,6 +14,8 @@
gflags.DEFINE_bool('plot', False, 'If true, plot the loop response.')
+#TODO(constants): All of the constants need to be updated for 2016.
+
class CIM(control_loop.ControlLoop):
def __init__(self):
super(CIM, self).__init__("CIM")
@@ -309,7 +311,7 @@
if len(argv) != 5:
print "Expected .h file name and .cc file name"
else:
- namespaces = ['y2014', 'control_loops', 'drivetrain']
+ namespaces = ['y2016', 'control_loops', 'drivetrain']
dog_loop_writer = control_loop.ControlLoopWriter(
"Drivetrain", [drivetrain_low_low, drivetrain_low_high,
drivetrain_high_low, drivetrain_high_high],
diff --git a/y2016/control_loops/python/polydrivetrain.py b/y2016/control_loops/python/polydrivetrain.py
index 93f3884..eb0890e 100755
--- a/y2016/control_loops/python/polydrivetrain.py
+++ b/y2016/control_loops/python/polydrivetrain.py
@@ -3,7 +3,7 @@
import numpy
import sys
from frc971.control_loops.python import polytope
-from y2014.control_loops.python import drivetrain
+from y2016.control_loops.python import drivetrain
from frc971.control_loops.python import control_loop
from frc971.control_loops.python import controls
from matplotlib import pylab
@@ -413,7 +413,7 @@
if len(argv) != 5:
glog.fatal('Expected .h file name and .cc file name')
else:
- namespaces = ['y2014', 'control_loops', 'drivetrain']
+ namespaces = ['y2016', 'control_loops', 'drivetrain']
dog_loop_writer = control_loop.ControlLoopWriter(
"VelocityDrivetrain", [vdrivetrain.drivetrain_low_low,
vdrivetrain.drivetrain_low_high,