-
Notifications
You must be signed in to change notification settings - Fork 9
/
main.py
87 lines (77 loc) · 3.78 KB
/
main.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
import sys
from PyQt5.QtWidgets import QApplication
from mGesf.MainWindow import MainWindow
from utils.decaWave_utils.DecaUWB_interface import UWBSensorInterface
from utils.iwr6843_utils.mmWave_interface import MmWaveSensorInterface
from utils.decaWave_utils import DecaUWB_interface
from utils.leap_utils.LeapInterface import LeapInterface
if __name__ == '__main__':
'''
User defined variables
'''
# path to which you wish to save the recorded data
data_path = '/Users/neneko/desktop/testData'
# AoP configs
# configFileName = 'profiles/aop/profile_rp_basic.cfg' # use your config file
# configFileName = 'profiles/aop/2fps_rdHeatmap.cfg'
# configFileName = 'profiles/aop/3fps_rd_heatmap.cfg'
# configFileName = 'profiles/aop/25fps_rdHeatmap.cfg'
# configFileName = 'profiles/aop/30fps_rdHeatmap.cfg'
# configFileName = 'profiles/aop/aop_azitest_withRD.cfg'
# configFileName = 'profiles/aop/aop_azitest_withoutRD.cfg'
# configFileName = 'mGesf/profiles/aop/30fps_azi_rd.cfg'
# ISK configs
# configFileName = 'profiles/isk/2D/3fps_rd_heatmap.cfg'
# configFileName = 'profiles/isk/2D/5fps_rd_heatmap.cfg'
# configFileName = 'profiles/isk/2D/15fps_rd_heatmap.cfg'
# configFileName = 'profiles/isk/2D/30fps_rd_heatmap_clutterRemoved.cfg'
# configFileName = 'profiles/isk/2D/30fps_rd_heatmap.cfg'
# configFileName = 'profiles/isk/2D/25fps_rd_heatmap.cfg'
# configFileName = 'profiles/isk/3D/5fps_rd.cfg'
# number of range bins for mmWave sensor
num_range_bin = 8
# ports for AoP
# dataPortName = 'COM8' # set this to your standard port (data)
# userPortName = 'COM9' # set this to your enhanced port (user)
'''
Uncomment these lines if you have IWR6843 AoP
ports for ISK
dataPortName = 'COM9' # set this to your standard port
userPortName = 'COM8' # set this to your num_range_bin port
_mmw_interface = MmWaveSensorInterface(num_range_bin=num_range_bin)
'''
# _mmw_interf ace = None
_mmw_interface = MmWaveSensorInterface(num_range_bin=num_range_bin)
'''
Uncomment these lines if you have DecaWave UWB device
ports for ISK
_uwb_interface_anchor = UWBSensorInterface('Anchor', 520)
_uwb_interface_tag = UWBSensorInterface('Tag', 520)
'''
_uwb_interface_anchor = None
_uwb_interface_tag = None
_leap_interface = LeapInterface()
'''
Uncomment these lines if you have xeThruX4 hardware
from utils.XeThru_utils.xeThruX4_interface import xeThruX4SensorInterface
_xeThruX4SensorInterface = xeThruX4SensorInterface()
'''
# _xeThruX4SensorInterface = None
from utils.XeThru_utils.xeThruX4_interface import xeThruX4SensorInterface
_xeThruX4SensorInterface = xeThruX4SensorInterface()
'''
Start of the application script (do not change this part unless you know what you're doing)
'''
# TODO _uwb_interface = DecaUWBInterface(framerate=, exe_path=, uport=)
'''
setup system constants
refresh_interval every x ms, use 33 when in simulation mode, use 1 when connected to sensors
'''
refresh = 1
app = QApplication(sys.argv)
window = MainWindow(mmw_interface=_mmw_interface, leap_interface=_leap_interface,
uwb_interface_anchor=_uwb_interface_anchor, uwb_interface_tag=_uwb_interface_tag,
xeThruX4SensorInterface=_xeThruX4SensorInterface,
refresh_interval=refresh, data_path=data_path)
app.exec_()
print('Resuming Console Interaction.')