Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3895da

Browse files
90 degree error but wanna save latest rev
1 parent 86db5c9 commit e3895da

File tree

1 file changed

+71
-32
lines changed

1 file changed

+71
-32
lines changed

Prototype_2_Electric_Boogalooo.ipynb

Lines changed: 71 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"colab": {
66
"provenance": [],
77
"mount_file_id": "1YJfEK8zha4PfUk2yP9y-XbO4vtmn83gE",
8-
"authorship_tag": "ABX9TyOqwpNhw3eY++8XOsP1KDzU",
8+
"authorship_tag": "ABX9TyOoSdmIwcnRtNDwE6FOVEpE",
99
"include_colab_link": true
1010
},
1111
"kernelspec": {
@@ -180,16 +180,11 @@
180180
" # Then figure out what angle you need to calculate\n",
181181
" # Arm, Grip, Back, Arms by Side, Leg, Hip Angle, Calf\n",
182182
" if row[0] == 'Arm':\n",
183-
" print('right', ((self.right_shoulder.visibility + self.right_elbow.visibility + self.right_wrist.visibility) / 3), 'left', ((self.left_shoulder.visibility + self.left_elbow.visibility + self.left_wrist.visibility) / 3))\n",
184183
" if ((self.right_shoulder.visibility + self.right_elbow.visibility + self.right_wrist.visibility) / 3) > ((self.left_shoulder.visibility + self.left_elbow.visibility + self.left_wrist.visibility) / 3): # Finds the better side and uses that for angles\n",
185-
" print('a')\n",
186184
" working_angle = self.angle(self.right_shoulder, self.right_elbow, self.right_wrist)\n",
187185
" else:\n",
188-
" print('b')\n",
189186
" working_angle = self.angle(self.left_shoulder, self.left_elbow, self.left_wrist)\n",
190187
" print(working_angle)\n",
191-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
192-
" return \"Arm Joints Not Visible\"\n",
193188
" if working_angle < int(row[1]): # See if the angle is within bounds\n",
194189
" return \"Try Straightening Your Arm Somewhat\"\n",
195190
" if working_angle > int(row[2]):\n",
@@ -200,8 +195,6 @@
200195
" working_angle = self.angle(self.right_elbow, self.right_wrist, self.right_thumb)\n",
201196
" else:\n",
202197
" working_angle = self.angle(self.left_elbow, self.left_wrist, self.left_thumb)\n",
203-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
204-
" return \"Wrist Joints Not Visible\"\n",
205198
" if working_angle < int(row[1]):\n",
206199
" return \"Try Straightening Your Wrist Somewhat\"\n",
207200
" if working_angle > int(row[2]):\n",
@@ -213,8 +206,6 @@
213206
" working_angle = self.angle(self.right_shoulder, self.right_hip, self.right_knee)\n",
214207
" else:\n",
215208
" working_angle = self.angle(self.left_shoulder, self.left_hip, self.left_knee)\n",
216-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
217-
" return \"Hip Joints Not Visible\"\n",
218209
" if working_angle < int(row[1]):\n",
219210
" return \"Try Straightening Your Hip Somewhat\"\n",
220211
" if working_angle > int(row[2]):\n",
@@ -225,8 +216,6 @@
225216
" working_angle = self.angle(self.right_elbow, self.right_shoulder, self.right_hip)\n",
226217
" else:\n",
227218
" working_angle = self.angle(self.left_elbow, self.left_shoulder, self.left_hip)\n",
228-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
229-
" return \"Arm/Hip Joints Not Visible\"\n",
230219
" if working_angle < int(row[1]):\n",
231220
" return \"Try Spreading Your Arms Out More\"\n",
232221
" if working_angle > int(row[2]):\n",
@@ -237,8 +226,6 @@
237226
" working_angle = self.angle(self.right_hip, self.right_knee, self.right_ankle)\n",
238227
" else:\n",
239228
" working_angle = self.angle(self.left_hip, self.left_knee, self.left_ankle)\n",
240-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
241-
" return \"Leg Joints Not Visible\"\n",
242229
" if working_angle < int(row[1]):\n",
243230
" return \"Try Straightening Your Legs More\"\n",
244231
" if working_angle > int(row[2]):\n",
@@ -249,8 +236,6 @@
249236
" working_angle = self.angle(self.right_ankle, self.right_heel, self.right_foot_index)\n",
250237
" else:\n",
251238
" working_angle = self.angle(self.left_ankle, self.left_heel, self.left_foot_index)\n",
252-
" if str(working_angle) == 'nan': # Check to see if angle is actually present\n",
253-
" return \"Calf Joints Not Visible\"\n",
254239
" if working_angle < int(row[1]):\n",
255240
" return \"Try Pointing Your Feet More (Tiptoe position)\"\n",
256241
" if working_angle > int(row[2]):\n",
@@ -261,7 +246,7 @@
261246
"metadata": {
262247
"id": "RHyJwan8acCz"
263248
},
264-
"execution_count": 19,
249+
"execution_count": 22,
265250
"outputs": []
266251
},
267252
{
@@ -478,11 +463,11 @@
478463
"id": "GHzmhoO6Jc50",
479464
"colab": {
480465
"base_uri": "https://localhost:8080/",
481-
"height": 285
466+
"height": 1000
482467
},
483-
"outputId": "ee33d84b-a2ee-4c6c-d329-2b36543ff424"
468+
"outputId": "097010c7-cdfd-4860-d1b6-cb01c4b68245"
484469
},
485-
"execution_count": 16,
470+
"execution_count": 23,
486471
"outputs": [
487472
{
488473
"name": "stdout",
@@ -613,19 +598,73 @@
613598
"output_type": "stream",
614599
"name": "stdout",
615600
"text": [
616-
"right 0.5081661157310009 left 0.4834045519431432\n",
617-
"a\n",
618-
"0.3836904078580625 0.5041786653681622 0.6335727706386282\n",
619-
"-1.4347784071275053e-16\n",
601+
"90.0\n",
620602
"Try Straightening Your Arm Somewhat\n",
621-
"right 0.5045340520640215 left 0.480838676293691\n",
622-
"a\n",
623-
"0.41954266260476114 0.5695087721777218 0.707358669511351\n",
624-
"0.0\n",
625-
"right 0.5034001295765241 left 0.4951862966020902\n",
626-
"a\n",
627-
"0.39034791696895443 0.5047606067738446 0.6380868016443386\n",
628-
"0.0\n"
603+
"90.00000000000001\n",
604+
"90.0\n",
605+
"90.0\n",
606+
"90.0\n",
607+
"90.00000000000001\n",
608+
"90.0\n",
609+
"90.0\n",
610+
"90.0\n",
611+
"90.0\n",
612+
"90.0\n",
613+
"90.0\n",
614+
"90.0\n",
615+
"90.0\n",
616+
"90.0\n",
617+
"90.0\n",
618+
"90.00000000000001\n",
619+
"90.0\n",
620+
"90.0\n",
621+
"90.0\n",
622+
"90.0\n",
623+
"90.0\n",
624+
"90.0\n",
625+
"90.0\n",
626+
"90.0\n",
627+
"90.00000000000001\n",
628+
"89.99999999999999\n",
629+
"90.0\n",
630+
"90.0\n",
631+
"89.99999999999999\n",
632+
"90.0\n",
633+
"89.99999999999999\n",
634+
"90.00000000000001\n",
635+
"90.0\n",
636+
"89.99999999999999\n",
637+
"90.0\n",
638+
"90.0\n",
639+
"90.00000000000001\n",
640+
"90.00000000000001\n",
641+
"89.99999999999999\n",
642+
"90.0\n",
643+
"90.00000000000001\n",
644+
"90.00000000000001\n",
645+
"90.00000000000001\n",
646+
"90.0\n",
647+
"90.00000000000001\n",
648+
"90.0\n",
649+
"90.00000000000001\n",
650+
"90.0\n",
651+
"90.0\n",
652+
"90.00000000000001\n",
653+
"90.0\n",
654+
"90.0\n",
655+
"90.0\n",
656+
"90.0\n",
657+
"90.0\n",
658+
"90.0\n",
659+
"90.0\n",
660+
"90.0\n",
661+
"90.0\n",
662+
"90.00000000000001\n",
663+
"90.0\n",
664+
"90.0\n",
665+
"90.00000000000001\n",
666+
"90.0\n",
667+
"90.00000000000001\n"
629668
]
630669
}
631670
]

0 commit comments

Comments
 (0)