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/motors/pistol_grip/generate_cogging.py b/motors/pistol_grip/generate_cogging.py
index 9eaf537..d889064 100644
--- a/motors/pistol_grip/generate_cogging.py
+++ b/motors/pistol_grip/generate_cogging.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
from matplotlib import pylab
diff --git a/motors/python/BUILD b/motors/python/BUILD
index 4925d4c..90ab608 100644
--- a/motors/python/BUILD
+++ b/motors/python/BUILD
@@ -13,7 +13,7 @@
"//external:python-gflags",
"//external:python-glog",
"//frc971/control_loops/python:controls",
- "@matplotlib_repo//:matplotlib2.7",
+ "@matplotlib_repo//:matplotlib3",
],
)
diff --git a/motors/python/big_phase_current.py b/motors/python/big_phase_current.py
index 6b51704..8cbce3f 100755
--- a/motors/python/big_phase_current.py
+++ b/motors/python/big_phase_current.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from __future__ import print_function
diff --git a/motors/seems_reasonable/drivetrain.py b/motors/seems_reasonable/drivetrain.py
index f4a5094..52b3920 100644
--- a/motors/seems_reasonable/drivetrain.py
+++ b/motors/seems_reasonable/drivetrain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
from frc971.control_loops.python import drivetrain
import sys
@@ -27,7 +27,7 @@
glog.init()
if len(argv) != 5:
- print "Expected .h file name and .cc file name"
+ glog.error("Expected .h file name and .cc file name")
else:
# Write the generated constants out to a file.
drivetrain.WriteDrivetrain(
diff --git a/motors/seems_reasonable/polydrivetrain.py b/motors/seems_reasonable/polydrivetrain.py
index a006c67..452b3fb 100644
--- a/motors/seems_reasonable/polydrivetrain.py
+++ b/motors/seems_reasonable/polydrivetrain.py
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
import sys
from motors.seems_reasonable import drivetrain