-
Notifications
You must be signed in to change notification settings - Fork 0
/
TeamUSDataProcessingFinal2020.py
72 lines (57 loc) · 3.02 KB
/
TeamUSDataProcessingFinal2020.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Lee Bradley, Martha Gizaw, Nate Winneg
# Engineering Physics Capstone Project
# Unstable Seniors: Data Processing
# May 2020
# Import the libraries below
from DebugSubroutinesTeamUS import PlotThigh, PlotCalf, PlotFoot, PlotLegRaising
# Turn on/off the following debug variables to control which human feature to
# look at.
debugThigh = False # Change to True if you wish to visualize the thigh data.
debugCalf = False # Change to True if you wish to visualize the calf data.
debugFoot = False # Change to True if you wish to visualize the foot data.
debugLeg = False # Change to True if you wish to visualize the raising leg data.
# Initialize the following variables as empty arrays.
xRoll = []
yRoll = []
xPitch = []
yPitch = []
xYaw = []
yYaw = []
xQuatW = []
yQuatW = []
xQuatX = []
yQuatX = []
xQuatY = []
yQuatY = []
xQuatZ = []
yQuatZ = []
netAngleChange = []
pointsMinMax = []
# Call the subroutines by turning on only one debug value for any human feature.
if (debugThigh == True) and (debugCalf == False) and (debugFoot == False) and (debugLeg == False):
thigh = PlotThigh()
thigh.euler_angle_thigh(xRoll, yRoll, xPitch, yPitch, xYaw, yYaw)
thigh.quaternion_thigh(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ)
thigh.dot_product_thigh(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ, netAngleChange)
thigh.euler_combo_thigh(xRoll, yRoll, yPitch, yYaw, yQuatY, yQuatZ)
elif (debugThigh == False) and (debugCalf == True) and (debugFoot == False) and (debugLeg == False):
calf = PlotCalf()
calf.euler_angle_calf(xRoll, yRoll, xPitch, yPitch, xYaw, yYaw)
calf.quaternion_calf(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ)
calf.dot_product_calf(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ, netAngleChange)
calf.euler_combo_calf(xRoll, yRoll, yPitch, yYaw, yQuatY, yQuatZ)
elif (debugThigh == False) and (debugCalf == False) and (debugFoot == True) and (debugLeg == False):
foot = PlotFoot()
foot.euler_angle_foot(xRoll, yRoll, xPitch, yPitch, xYaw, yYaw)
foot.quaternion_foot(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ)
foot.dot_product_foot(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ, netAngleChange)
foot.euler_combo_foot(xRoll, yRoll, yPitch, yYaw, yQuatY, yQuatZ)
elif (debugThigh == False) and (debugCalf == False) and (debugFoot == False) and (debugLeg == True):
leg = PlotLegRaising()
leg.leg_quat_analysis(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ)
leg.leg_net_angles(xQuatW, yQuatW, xQuatX, yQuatX, xQuatY, yQuatY, xQuatZ, yQuatZ, netAngleChange, pointsMinMax)
else:
print("Sorry, but you would rather want to look at the plots one human" +
" feature at a time and explain them before moving on. Please turn" +
" off or turn on any of the debug variables provided to you, and" +
" have only one of them turned on to plot the desired data.")