Switch to python3 and scipy from slycot

Turns out we need python3 matplotlib to make scipy work well enough to
place the poles correctly for our systems.  Rather than do it piecemeal,
do it all at once.

This includes a python opencv upgrade too to support the new python, and
a matplotlib upgrade.

Change-Id: Ic7517b5ebbfdca9cc90ae6a61d86b474f2f21b29
diff --git a/y2017/control_loops/python/BUILD b/y2017/control_loops/python/BUILD
index 4de8144..a6277e7 100644
--- a/y2017/control_loops/python/BUILD
+++ b/y2017/control_loops/python/BUILD
@@ -58,7 +58,7 @@
         "//external:python-gflags",
         "//external:python-glog",
         "//frc971/control_loops/python:controls",
-        "@matplotlib_repo//:matplotlib2.7",
+        "@matplotlib_repo//:matplotlib3",
     ],
 )
 
@@ -106,7 +106,7 @@
         "//external:python-gflags",
         "//external:python-glog",
         "//frc971/control_loops/python:controls",
-        "@matplotlib_repo//:matplotlib2.7",
+        "@matplotlib_repo//:matplotlib3",
     ],
 )
 
@@ -123,7 +123,7 @@
         "//external:python-gflags",
         "//external:python-glog",
         "//frc971/control_loops/python:controls",
-        "@matplotlib_repo//:matplotlib2.7",
+        "@matplotlib_repo//:matplotlib3",
     ],
 )
 
@@ -168,7 +168,7 @@
         "//external:python-gflags",
         "//external:python-glog",
         "//frc971/control_loops/python:controls",
-        "@matplotlib_repo//:matplotlib2.7",
+        "@matplotlib_repo//:matplotlib3",
     ],
 )
 
diff --git a/y2017/control_loops/python/column.py b/y2017/control_loops/python/column.py
index 7c34ee6..0122b58 100755
--- a/y2017/control_loops/python/column.py
+++ b/y2017/control_loops/python/column.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from aos.util.trapezoid_profile import TrapezoidProfile
 from frc971.control_loops.python import control_loop
diff --git a/y2017/control_loops/python/drivetrain.py b/y2017/control_loops/python/drivetrain.py
index 66adc0a..652fcf4 100755
--- a/y2017/control_loops/python/drivetrain.py
+++ b/y2017/control_loops/python/drivetrain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from __future__ import print_function
 from frc971.control_loops.python import drivetrain
diff --git a/y2017/control_loops/python/hood.py b/y2017/control_loops/python/hood.py
index 7f875c9..c405bb2 100755
--- a/y2017/control_loops/python/hood.py
+++ b/y2017/control_loops/python/hood.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from aos.util.trapezoid_profile import TrapezoidProfile
 from frc971.control_loops.python import control_loop
diff --git a/y2017/control_loops/python/indexer.py b/y2017/control_loops/python/indexer.py
index 0c5cb6b..7312e57 100755
--- a/y2017/control_loops/python/indexer.py
+++ b/y2017/control_loops/python/indexer.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from frc971.control_loops.python import control_loop
 from frc971.control_loops.python import controls
diff --git a/y2017/control_loops/python/intake.py b/y2017/control_loops/python/intake.py
index 015fdfa..ae4f257 100755
--- a/y2017/control_loops/python/intake.py
+++ b/y2017/control_loops/python/intake.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from frc971.control_loops.python import control_loop
 from frc971.control_loops.python import linear_system
diff --git a/y2017/control_loops/python/polydrivetrain.py b/y2017/control_loops/python/polydrivetrain.py
index 7ddd630..498a2c3 100755
--- a/y2017/control_loops/python/polydrivetrain.py
+++ b/y2017/control_loops/python/polydrivetrain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import sys
 from y2017.control_loops.python import drivetrain
diff --git a/y2017/control_loops/python/polydrivetrain_test.py b/y2017/control_loops/python/polydrivetrain_test.py
index 434cdca..8e0176e 100755
--- a/y2017/control_loops/python/polydrivetrain_test.py
+++ b/y2017/control_loops/python/polydrivetrain_test.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 import polydrivetrain
 import numpy
diff --git a/y2017/control_loops/python/shooter.py b/y2017/control_loops/python/shooter.py
index 69f0af4..be4fb81 100755
--- a/y2017/control_loops/python/shooter.py
+++ b/y2017/control_loops/python/shooter.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from frc971.control_loops.python import control_loop
 from frc971.control_loops.python import controls
@@ -125,7 +125,7 @@
         glog.debug('Poles are %s',
                    repr(numpy.linalg.eig(self.A - self.B * self.K)[0]))
 
-        self.PlaceObserverPoles([0.3, 0.3])
+        self.PlaceObserverPoles([0.299, 0.301])
 
         self.U_max = numpy.matrix([[12.0]])
         self.U_min = numpy.matrix([[-12.0]])
diff --git a/y2017/control_loops/python/turret.py b/y2017/control_loops/python/turret.py
index c5e4269..e67904d 100755
--- a/y2017/control_loops/python/turret.py
+++ b/y2017/control_loops/python/turret.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
 
 from aos.util.trapezoid_profile import TrapezoidProfile
 from frc971.control_loops.python import control_loop