aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2022-02-18 13:41:58 -0600
committerMatt Strapp <matt@mattstrapp.net>2022-02-18 13:41:58 -0600
commit4a05620653bddfd087fc631f402d82baee352d3e (patch)
tree625650ec085a807fcff04937e1abd92128794e28
parentUpdate submodules, again (diff)
downloadee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar.gz
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar.bz2
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar.lz
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar.xz
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.tar.zst
ee4511w-4a05620653bddfd087fc631f402d82baee352d3e.zip
Add requirements, force tests in specific dir
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '')
-rw-r--r--System/Tests/errorTestScript.py (renamed from System/pendulum/errorTestScript.py)2
-rw-r--r--System/Tests/homework8.ipynb (renamed from System/pendulum/homework8.ipynb)0
-rw-r--r--System/Tests/swingUp.py (renamed from System/pendulum/swingUp.py)0
-rw-r--r--System/Tests/system_swingup_test.py (renamed from System/pendulum/system_swingup_test.py)0
-rw-r--r--System/Tests/system_swingup_test_2.py (renamed from System/pendulum/system_swingup_test_2.py)0
-rw-r--r--System/pendulum/__init__.py4
-rw-r--r--System/pendulum/initialize_system.py2
-rw-r--r--System/pendulum/results.csv252
-rw-r--r--System/requirements.txt4
9 files changed, 8 insertions, 256 deletions
diff --git a/System/pendulum/errorTestScript.py b/System/Tests/errorTestScript.py
index cb029d5..5f9312f 100644
--- a/System/pendulum/errorTestScript.py
+++ b/System/Tests/errorTestScript.py
@@ -9,7 +9,7 @@ from sys import exit
sys = System(angular_units = 'Radians')
-for x in range(0,10:
+for x in range(0,10):
angle, linear = sys.measure()
print("Angle: " + str(angle) + ", Linear: " + str(linear))
sys.add_results(linear, angle, angle)
diff --git a/System/pendulum/homework8.ipynb b/System/Tests/homework8.ipynb
index a9c28c9..a9c28c9 100644
--- a/System/pendulum/homework8.ipynb
+++ b/System/Tests/homework8.ipynb
diff --git a/System/pendulum/swingUp.py b/System/Tests/swingUp.py
index fb5d4c0..fb5d4c0 100644
--- a/System/pendulum/swingUp.py
+++ b/System/Tests/swingUp.py
diff --git a/System/pendulum/system_swingup_test.py b/System/Tests/system_swingup_test.py
index e13c7ca..e13c7ca 100644
--- a/System/pendulum/system_swingup_test.py
+++ b/System/Tests/system_swingup_test.py
diff --git a/System/pendulum/system_swingup_test_2.py b/System/Tests/system_swingup_test_2.py
index fc02ed6..fc02ed6 100644
--- a/System/pendulum/system_swingup_test_2.py
+++ b/System/Tests/system_swingup_test_2.py
diff --git a/System/pendulum/__init__.py b/System/pendulum/__init__.py
index 510ffea..ceec4b6 100644
--- a/System/pendulum/__init__.py
+++ b/System/pendulum/__init__.py
@@ -1,3 +1,3 @@
+from .system import System
from .motor import Motor
-from system import System
-from encoder import Encoder \ No newline at end of file
+from .encoder import Encoder \ No newline at end of file
diff --git a/System/pendulum/initialize_system.py b/System/pendulum/initialize_system.py
index 38b7134..c016203 100644
--- a/System/pendulum/initialize_system.py
+++ b/System/pendulum/initialize_system.py
@@ -1,6 +1,6 @@
# This file should be run on system startup. It will initialize the linear position to the center so that all tests originate from a proper position.
# The center is found by using the hardware limit switches
-from system import System
+from .system import System
import RPi.GPIO as GPIO
# Main program
diff --git a/System/pendulum/results.csv b/System/pendulum/results.csv
deleted file mode 100644
index ca22685..0000000
--- a/System/pendulum/results.csv
+++ /dev/null
@@ -1,252 +0,0 @@
-this is a test with speed 1
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:11:03.518250,3.638602,11.781250,1.000000
-this is a test with speed 2
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:11:10.747827,3.141593,0.000000,2.000000
-21:11:10.951560,3.141593,0.000000,2.000000
-21:11:11.155652,3.141593,0.000000,2.000000
-21:11:11.359968,3.141593,0.000000,2.000000
-21:11:11.564011,3.196816,10.648438,2.000000
-this is a test with speed 1
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:21:23.365529,3.061826,-12.347656,1.000000
-21:21:23.569516,3.061826,-12.347656,1.000000
-21:21:23.774907,3.061826,-12.291016,1.000000
-21:21:23.978789,3.074097,-12.234375,1.000000
-21:21:24.182513,3.098641,-11.951172,1.000000
-21:21:24.387526,3.172272,-11.328125,1.000000
-21:21:24.593523,3.190680,-10.535156,1.000000
-21:21:24.797276,3.135457,-9.628906,1.000000
-21:21:25.000997,3.092505,-8.666016,1.000000
-21:21:25.204894,3.123185,-7.589844,1.000000
-21:21:25.409312,3.178408,-6.457031,1.000000
-21:21:25.613246,3.178408,-5.494141,1.000000
-21:21:25.816969,3.129321,-4.248047,1.000000
-21:21:26.020770,3.098641,-2.888672,1.000000
-21:21:26.224634,3.117049,-1.642578,1.000000
-21:21:26.428394,3.160000,-0.453125,1.000000
-21:21:26.632123,3.160000,0.623047,1.000000
-21:21:26.836130,3.129321,1.416016,1.000000
-21:21:27.041016,3.123185,2.322266,1.000000
-21:21:27.245016,3.153864,3.398438,1.000000
-21:21:27.448770,3.172272,4.757812,1.000000
-21:21:27.652601,3.147729,6.003906,1.000000
-21:21:27.857510,3.123185,7.250000,1.000000
-21:21:28.061582,3.129321,8.212891,1.000000
-21:21:28.265318,3.153864,9.062500,1.000000
-21:21:28.469456,3.160000,9.798828,1.000000
-21:21:28.674342,3.166136,10.931641,1.000000
-this is a test with speed 2
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:21:40.385974,3.123185,-11.328125,2.000000
-21:21:40.589873,3.153864,-11.328125,2.000000
-21:21:40.793628,3.153864,-11.328125,2.000000
-21:21:40.997389,3.123185,-11.271484,2.000000
-21:21:41.201337,3.123185,-11.101562,2.000000
-21:21:41.405074,3.160000,-10.478516,2.000000
-21:21:41.608862,3.172272,-9.685547,2.000000
-21:21:41.812892,3.147729,-8.496094,2.000000
-21:21:42.017833,3.123185,-7.250000,2.000000
-21:21:42.226387,3.123185,-6.117188,2.000000
-21:21:42.430203,3.141593,-5.041016,2.000000
-21:21:42.634253,3.153864,-3.908203,2.000000
-21:21:42.838705,3.147729,-2.605469,2.000000
-21:21:43.042663,3.135457,-1.189453,2.000000
-21:21:43.246393,3.153864,0.396484,2.000000
-21:21:43.450282,3.153864,1.699219,2.000000
-21:21:43.654589,3.147729,3.171875,2.000000
-21:21:43.858462,3.117049,4.701172,2.000000
-21:21:44.062365,3.110913,6.003906,2.000000
-21:21:44.266291,3.147729,7.136719,2.000000
-21:21:44.470675,3.166136,8.156250,2.000000
-21:21:44.675230,3.160000,9.289062,2.000000
-21:21:44.879104,3.123185,10.308594,2.000000
-this is a test with speed 3
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:21:56.181311,3.129321,-11.667969,3.000000
-21:21:56.385221,3.135457,-11.667969,3.000000
-21:21:56.588969,3.135457,-11.611328,3.000000
-21:21:56.792985,3.147729,-11.328125,3.000000
-21:21:56.997731,3.172272,-10.705078,3.000000
-21:21:57.201605,3.166136,-9.515625,3.000000
-21:21:57.405341,3.153864,-7.986328,3.000000
-21:21:57.609332,3.129321,-6.400391,3.000000
-21:21:57.813877,3.117049,-4.984375,3.000000
-21:21:58.017821,3.141593,-3.455078,3.000000
-21:21:58.221548,3.153864,-1.585938,3.000000
-21:21:58.425285,3.153864,0.113281,3.000000
-21:21:58.629381,3.141593,1.642578,3.000000
-21:21:58.833311,3.141593,3.341797,3.000000
-21:21:59.037050,3.123185,5.097656,3.000000
-21:21:59.240776,3.123185,6.740234,3.000000
-21:21:59.445332,3.147729,8.156250,3.000000
-21:21:59.649453,3.153864,9.515625,3.000000
-21:21:59.853174,3.141593,10.875000,3.000000
-this is a test with speed 4
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:22:10.551392,3.074097,-11.667969,4.000000
-21:22:10.755403,3.166136,-11.611328,4.000000
-21:22:10.959199,3.209088,-11.611328,4.000000
-21:22:11.162979,3.141593,-11.611328,4.000000
-21:22:11.367035,3.067962,-11.667969,4.000000
-21:22:11.571220,3.092505,-11.667969,4.000000
-21:22:11.775098,3.172272,-26.167969,4.000000
-21:22:11.978903,3.190680,-26.111328,4.000000
-21:22:12.182761,3.129321,-26.167969,4.000000
-this is a test with speed 1
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:24:03.238594,3.049554,-10.988281,1.000000
-21:24:03.443363,3.319534,-11.384766,1.000000
-21:24:03.647160,3.460661,-11.384766,1.000000
-21:24:03.850915,3.252039,-11.328125,1.000000
-21:24:04.055110,3.055690,-10.421875,1.000000
-21:24:04.259089,3.147729,-8.439453,1.000000
-21:24:04.462815,3.294991,-7.080078,1.000000
-21:24:04.666720,3.294991,-6.287109,1.000000
-21:24:04.871045,3.209088,-5.210938,1.000000
-21:24:05.075400,3.166136,-3.738281,1.000000
-21:24:05.279280,3.215224,-1.812500,1.000000
-21:24:05.483051,3.270447,-0.056641,1.000000
-21:24:05.687202,3.258175,1.472656,1.000000
-21:24:05.891495,3.196816,3.171875,1.000000
-21:24:06.095450,3.172272,5.154297,1.000000
-21:24:06.299177,3.202952,6.853516,1.000000
-21:24:06.503022,3.227496,7.986328,1.000000
-21:24:06.707304,3.221360,8.779297,1.000000
-21:24:06.911174,3.209088,9.515625,1.000000
-21:24:07.115038,3.227496,10.535156,1.000000
-this is a test with speed 2
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:24:17.195756,3.288855,-26.621094,2.000000
-21:24:17.400051,3.233632,-26.621094,2.000000
-21:24:17.603796,3.160000,-26.564453,2.000000
-21:24:17.807579,3.258175,-25.261719,2.000000
-21:24:18.011603,3.313399,-23.505859,2.000000
-21:24:18.216375,3.202952,-22.373047,2.000000
-21:24:18.422944,3.086369,-21.523438,2.000000
-21:24:18.627284,3.166136,-20.900391,2.000000
-21:24:18.831221,3.331806,-19.937500,2.000000
-21:24:19.035149,3.362486,-18.521484,2.000000
-21:24:19.238927,3.196816,-16.708984,2.000000
-21:24:19.443200,3.067962,-14.953125,2.000000
-21:24:19.647538,3.153864,-13.650391,2.000000
-21:24:19.852128,3.319534,-12.404297,2.000000
-21:24:20.055988,3.325670,-11.214844,2.000000
-21:24:20.259682,3.209088,-9.572266,2.000000
-21:24:20.463588,3.110913,-7.873047,2.000000
-21:24:20.667910,3.160000,-6.626953,2.000000
-21:24:20.871916,3.270447,-5.607422,2.000000
-21:24:21.075676,3.301127,-4.474609,2.000000
-21:24:21.279456,3.209088,-3.341797,2.000000
-21:24:21.483292,3.129321,-2.208984,2.000000
-21:24:21.687757,3.123185,-2.039062,2.000000
-21:24:21.891745,3.245903,-2.039062,2.000000
-21:24:22.095769,3.325670,-2.039062,2.000000
-21:24:22.299703,3.258175,-2.095703,2.000000
-21:24:22.503702,3.202952,-2.095703,2.000000
-21:24:22.707592,3.270447,-2.095703,2.000000
-21:24:22.911564,3.276583,-2.208984,2.000000
-21:24:23.115698,3.264311,-3.681641,2.000000
-21:24:23.320113,3.307263,-6.060547,2.000000
-21:24:23.523990,3.368622,-8.835938,2.000000
-21:24:23.727764,3.423845,-12.177734,2.000000
-21:24:23.931581,3.479068,-14.896484,2.000000
-21:24:24.135508,3.491340,-17.162109,2.000000
-21:24:24.339394,3.331806,-17.445312,2.000000
-21:24:24.543121,3.184544,-17.388672,2.000000
-21:24:24.747104,3.141593,-17.388672,2.000000
-21:24:24.951503,3.209088,-17.388672,2.000000
-21:24:25.155448,3.282719,-17.388672,2.000000
-21:24:25.359181,3.258175,-17.388672,2.000000
-21:24:25.563220,3.184544,-17.445312,2.000000
-21:24:25.767602,3.160000,-17.388672,2.000000
-21:24:25.971902,3.221360,-17.388672,2.000000
-21:24:26.175822,3.270447,-17.388672,2.000000
-21:24:26.379473,3.239767,-17.445312,2.000000
-21:24:26.583204,3.184544,-17.388672,2.000000
-21:24:26.787312,3.178408,-17.388672,2.000000
-21:24:26.991191,3.227496,-17.388672,2.000000
-21:24:27.195040,3.258175,-17.388672,2.000000
-21:24:27.398920,3.233632,-17.445312,2.000000
-21:24:27.602646,3.190680,-17.388672,2.000000
-21:24:27.806773,3.196816,-17.445312,2.000000
-21:24:28.010824,3.227496,-17.445312,2.000000
-21:24:28.214705,3.239767,-17.388672,2.000000
-21:24:28.418434,3.215224,-17.445312,2.000000
-21:24:28.622173,3.196816,-17.445312,2.000000
-21:24:28.827388,3.209088,-17.445312,2.000000
-21:24:29.031949,3.227496,-17.388672,2.000000
-21:24:29.235813,3.227496,-17.388672,2.000000
-21:24:29.439567,3.215224,-17.388672,2.000000
-21:24:29.643433,3.209088,-17.445312,2.000000
-21:24:29.847229,3.221360,-17.388672,2.000000
-21:24:30.051008,3.221360,-17.388672,2.000000
-21:24:30.254897,3.221360,-17.445312,2.000000
-21:24:30.460323,3.215224,-17.445312,2.000000
-21:24:30.664998,3.215224,-17.445312,2.000000
-21:24:30.868735,3.215224,-17.388672,2.000000
-21:24:31.072555,3.221360,-17.388672,2.000000
-21:24:31.278097,3.221360,-17.388672,2.000000
-21:24:31.482317,3.215224,-17.388672,2.000000
-21:24:31.686053,3.221360,-17.388672,2.000000
-21:24:31.889814,3.215224,-17.445312,2.000000
-21:24:32.094156,3.215224,-17.445312,2.000000
-21:24:32.298057,3.215224,-17.445312,2.000000
-21:24:32.501811,3.215224,-17.445312,2.000000
-21:24:32.705567,3.209088,-17.558594,2.000000
-21:24:32.909636,3.123185,-19.031250,2.000000
-21:24:33.113681,3.129321,-20.957031,2.000000
-21:24:33.317471,3.258175,-22.882812,2.000000
-21:24:33.521209,3.331806,-24.808594,2.000000
-21:24:33.725343,3.270447,-26.224609,2.000000
-21:24:33.929347,3.135457,-27.414062,2.000000
-21:24:34.133069,3.141593,-28.263672,2.000000
-21:24:34.336813,3.270447,-28.830078,2.000000
-21:24:34.540822,3.350214,-28.773438,2.000000
-21:24:34.745675,3.368622,-27.074219,2.000000
-21:24:34.949791,3.233632,-24.242188,2.000000
-21:24:35.153530,3.061826,-21.353516,2.000000
-21:24:35.357278,3.037282,-19.824219,2.000000
-21:24:35.561108,3.209088,-18.748047,2.000000
-21:24:35.765374,3.362486,-17.785156,2.000000
-21:24:35.969290,3.301127,-16.935547,2.000000
-21:24:36.173039,3.080233,-16.539062,2.000000
-21:24:36.377081,3.049554,-16.425781,2.000000
-21:24:36.580936,3.239767,-16.425781,2.000000
-21:24:36.785009,3.380894,-16.425781,2.000000
-21:24:36.988996,3.294991,-16.482422,2.000000
-21:24:37.192991,3.104777,-16.425781,2.000000
-21:24:37.396751,3.074097,-16.425781,2.000000
-21:24:37.600523,3.239767,-16.425781,2.000000
-21:24:37.804401,3.362486,-16.425781,2.000000
-21:24:38.008162,3.276583,-16.425781,2.000000
-21:24:38.212000,3.110913,-16.425781,2.000000
-21:24:38.416104,3.098641,-16.425781,2.000000
-21:24:38.619845,3.252039,-16.425781,2.000000
-21:24:38.823609,3.344078,-16.425781,2.000000
-21:24:39.027425,3.258175,-16.425781,2.000000
-21:24:39.231822,3.117049,-16.425781,2.000000
-21:24:39.435720,3.117049,-16.425781,2.000000
-this is a test with speed 1
-timestamp,angle(Radians),position(inches),speed(percentage)
-21:26:03.992735,3.153864,-11.611328,1.000000
-21:26:04.196730,3.086369,-11.611328,1.000000
-21:26:04.400491,3.055690,-10.818359,1.000000
-21:26:04.604225,3.055690,-9.968750,1.000000
-21:26:04.807985,3.086369,-9.119141,1.000000
-21:26:05.011982,3.110913,-8.269531,1.000000
-21:26:05.215941,3.080233,-7.419922,1.000000
-21:26:05.419661,3.043418,-6.683594,1.000000
-21:26:05.623503,3.055690,-6.003906,1.000000
-21:26:05.827343,3.104777,-5.097656,1.000000
-21:26:06.032396,3.123185,-4.021484,1.000000
-21:26:06.236582,3.086369,-2.548828,1.000000
-21:26:06.440336,3.067962,-0.849609,1.000000
-21:26:06.644314,3.098641,1.019531,1.000000
-21:26:06.848124,3.110913,2.775391,1.000000
-21:26:07.051824,3.067962,4.701172,1.000000
-21:26:07.256424,3.055690,6.853516,1.000000
-21:26:07.460299,3.049554,8.269531,1.000000
-21:26:07.664164,3.055690,9.232422,1.000000
-21:26:07.867919,3.086369,10.195312,1.000000
diff --git a/System/requirements.txt b/System/requirements.txt
new file mode 100644
index 0000000..60001ac
--- /dev/null
+++ b/System/requirements.txt
@@ -0,0 +1,4 @@
+gym==0.22.0
+numpy==1.22.2
+setuptools==59.6.0
+torch==1.10.2