-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtester.py
More file actions
73 lines (56 loc) · 2.34 KB
/
tester.py
File metadata and controls
73 lines (56 loc) · 2.34 KB
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
73
from ctypes import *
open("tracker.so", "rb")
lib = CDLL("tracker.so")
track = lib.Tracker_new()
lib.getUserSkeletonHeadX.restype = c_float
lib.getUserSkeletonHeadY.restype = c_float
lib.getUserSkeletonHeadZ.restype = c_float
lib.getUserSkeletonNeckX.restype = c_float
lib.getUserSkeletonNeckY.restype = c_float
lib.getUserSkeletonNeckZ.restype = c_float
lib.getUserSkeletonL_ShX.restype = c_float
lib.getUserSkeletonL_ShY.restype = c_float
lib.getUserSkeletonL_ShZ.restype = c_float
lib.getUserSkeletonR_ShX.restype = c_float
lib.getUserSkeletonR_ShY.restype = c_float
lib.getUserSkeletonR_ShZ.restype = c_float
lib.getUserSkeletonL_ElbowX.restype = c_float
lib.getUserSkeletonL_ElbowY.restype = c_float
lib.getUserSkeletonL_ElbowZ.restype = c_float
lib.getUserSkeletonR_ElbowX.restype = c_float
lib.getUserSkeletonR_ElbowY.restype = c_float
lib.getUserSkeletonR_ElbowZ.restype = c_float
lib.getUserSkeletonL_HandX.restype = c_float
lib.getUserSkeletonL_HandY.restype = c_float
lib.getUserSkeletonL_HandZ.restype = c_float
lib.getUserSkeletonR_HandX.restype = c_float
lib.getUserSkeletonR_HandY.restype = c_float
lib.getUserSkeletonR_HandZ.restype = c_float
lib.getUserSkeletonTorsoX.restype = c_float
lib.getUserSkeletonTorsoY.restype = c_float
lib.getUserSkeletonTorsoZ.restype = c_float
lib.getUserSkeletonL_HipX.restype = c_float
lib.getUserSkeletonL_HipY.restype = c_float
lib.getUserSkeletonL_HipZ.restype = c_float
lib.getUserSkeletonR_HipX.restype = c_float
lib.getUserSkeletonR_HipY.restype = c_float
lib.getUserSkeletonR_HipZ.restype = c_float
lib.getUserSkeletonL_KneeX.restype = c_float
lib.getUserSkeletonL_KneeY.restype = c_float
lib.getUserSkeletonL_KneeZ.restype = c_float
lib.getUserSkeletonR_KneeX.restype = c_float
lib.getUserSkeletonR_KneeY.restype = c_float
lib.getUserSkeletonR_KneeZ.restype = c_float
lib.getUserSkeletonL_FootX.restype = c_float
lib.getUserSkeletonL_FootY.restype = c_float
lib.getUserSkeletonL_FootZ.restype = c_float
lib.getUserSkeletonR_FootX.restype = c_float
lib.getUserSkeletonR_FootY.restype = c_float
lib.getUserSkeletonR_FootZ.restype = c_float
while(True):
lib.loop(track)
if lib.getUsersCount(track) > 0:
headX = lib.getUserSkeletonHeadX(track, 0)
headY = lib.getUserSkeletonHeadY(track, 0)
headZ = lib.getUserSkeletonHeadZ(track, 0)
print str(headX) + " " + str(headY) + " " + str(headZ)