-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcalibration.html
More file actions
executable file
·343 lines (302 loc) · 14 KB
/
Copy pathcalibration.html
File metadata and controls
executable file
·343 lines (302 loc) · 14 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>VR Tracker - Calibration</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/datepicker3.css" rel="stylesheet">
<link href="css/bootstrap-table.css" rel="stylesheet">
<link href="css/styles.css" rel="stylesheet">
<link href="css/styles2.css" rel="stylesheet">
<!--Icons-->
<script src="js/lumino.glyphs.js"></script>
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#sidebar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#"><span>VR Tracker</span> Master Control <i>(v1.4.2)</i></a>
</div>
</div><!-- /.container-fluid -->
</nav>
<div class="col-sm-3 col-lg-2 sidebar">
<ul class="nav menu">
<li><a href="dashboard.html"><svg class="glyph stroked dashboard-dial"><use xlink:href="#stroked-dashboard-dial"></use></svg> Dashboard</a></li>
<li class="active"><a href="calibration.html"><svg class="glyph stroked table"><use xlink:href="#stroked-gear"></use></svg> Calibration</a></li>
<li><a href="visualizer.html"><svg class="glyph stroked calendar"><use xlink:href="#stroked-eye"></use></svg> Visualizer</a></li>
<li><a href="https://vrtracker.xyz/bug-report/"><svg class="glyph stroked clipboard with paper"><use xlink:href="#stroked-clipboard-with-paper"/></svg> Report Bug</a></li>
</ul>
</div><!--/.sidebar-->
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
<div class="row">
<ol class="breadcrumb">
<li><a href="#"><svg class="glyph stroked home"><use xlink:href="#stroked-home"></use></svg></a></li>
<li class="active">Calibration</li>
</ol>
</div><!--/.row-->
</div>
<div class="col-sm-9 col-sm-offset-3 col-lg-10 col-lg-offset-2 main">
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Calibration Tool</h1>
<div class="alert bg-danger update-info" id="update-state-fail" role="alert" >
<svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Your system need to be updated !
<p align="center" style="color:white;" ></p>
</div>
<div class="alert bg-success update-info" id="update-state" role="alert" >
<svg class="glyph stroked checkmark"><use xlink:href="#stroked-checkmark"></use></svg> Your system is up to date !
<p align="center" style="color:white;"></p>
</div>
</div>
</div><!--/.row-->
<div class="row">
<div class="col-md-6">
</div>
</div>
<div class="row">
<div class="col-md-6">
<!-- <div class="panel panel-default">
<div class="panel-heading">Connect to the Gateway</div>
<div class="panel-body" >
- Plug-in your Gateway (it can take a few minutes to start)</br>- Connect to "VR Tracker Gateway" Wifi (password "vrtracker")</br>- Once you see the message "Successfully connected to the Gateway !" go to the next step ;)
</div>
</div> -->
<div class="alert bg-danger" id="ws_failed_alert" role="alert">
<svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Connection to the Gateway Failed <a href="#" style="font-style: italic; color: #fff; ">(help)</a> <a href="#" class="pull-right"><span class="glyphicon glyphicon-remove"></span></a>
</div>
<div class="alert bg-success" id="ws_success_alert" role="alert">
<svg class="glyph stroked checkmark"><use xlink:href="#stroked-checkmark"></use></svg> Connected to the Gateway !
</div>
<div class="panel panel-default">
<div class="panel-heading">Select the Cameras to Calibrate</div>
<div class="panel-body" >
<table class="tableau" id="available-cameras" style="margin-top: 15px;">
<tr class="header">
<th style="width:15%;">Camera</th>
<th style="width:15%;">MAC address</th>
<th style="width:30%;">Current Position</th>
<th style="width:40%; text-align:center;" class="count" >Associated point(s)</th>
</tr>
<tr id="tableMessage">
<th id="noCameraConnectedMessage" colspan="2" >There is no camera connected</th>
</tr>
</table>
</div>
</div>
<div>
<p align="center" style="margin-top: 1px">
<button style="width:50%; margin-bottom: 10px" type="submit" class="btn btn-primary" id="calibrationBtn" onclick="startCalibration()" style="margin-left: 10px;">Validate Camera Selection</button>
</p>
<div align="center" style="margin-top: 1px">
<button style="width:50%; " type="submit" class="btn btn-primary" id="auto-calibration-btn" onclick="autoCalibration()">Auto Calibration </button>
</div>
<div align="center" style="margin-top: 1px">
<button style="width:50%; " type="submit" class="btn btn-primary" id="next-calibration-btn" onclick="nextCalibration()">Next Calibration </button>
</div>
<div align="center" style="margin-top: 1px; margin-bottom: 3px;">
<button style="width:50%; display: none;" type="submit" class="btn btn-primary" id="stop-auto-calibration-btn" onclick="stopAutoCalibration()">Stop Auto Calibration </button>
</div>
<div align="center" style="margin-top: 1px">
<button style="width:50%; display: none;" type="submit" class="btn btn-primary" id="add-reference-btn" onclick="AddReferencePoints()">Add Reference Points</button>
</div>
</div>
<div class="panel panel-default" id="add-3D-point-panel" style="display:none; margin-top: 3px">
<div class="panel-heading">Tag 3D world coordinates</div>
<div class="panel-body" >
<div class="row">
<div class="col-md-6">
<div class="form-group">
<label>X</label>
<input class="form-control" id="x-coordinate" placeholder="x coordinate in meters">
</div>
<div class="form-group">
<label>Y</label>
<input class="form-control" id="y-coordinate" placeholder="y coordinate in meters">
</div>
<div class="form-group">
<label>Z</label>
<input class="form-control" id="z-coordinate" placeholder="z coordinate in meters">
</div>
</div>
<div class="col-md-6">
<label>multiple coordinates</label>
<textarea class="form-control" rows="8" id="multiple-coordinates" placeholder="enter the points separated by ; And the coordinates separated by , Ex:1,1,1;2,2,2;"></textarea>
</div>
</div>
<div class="row" id="generator" style="display:none">
<div class="panel-heading">Point Generator</div>
<div class="col-md-4">
<div class="form-group">
<label>Xmin</label>
<input class="form-control" id="x-min" placeholder="x coordinate in meters">
</div>
<div class="form-group">
<label>Xmax</label>
<input class="form-control" id="x-max" placeholder="x coordinate in meters">
</div>
<div class="form-group">
<label>X step</label>
<input class="form-control" id="x-step" placeholder="x coordinate in meters">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Ymin</label>
<input class="form-control" id="y-min" placeholder="y coordinate in meters">
</div>
<div class="form-group">
<label>Ymax</label>
<input class="form-control" id="y-max" placeholder="y coordinate in meters">
</div>
<div class="form-group">
<label>Y step</label>
<input class="form-control" id="z-step" placeholder="x coordinate in meters">
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label>Zmin</label>
<input class="form-control" id="z-min" placeholder="z coordinate in meters">
</div>
<div class="form-group">
<label>Zmax</label>
<input class="form-control" id="z-max" placeholder="z coordinate in meters">
</div>
<div class="form-group">
<label>Z step</label>
<input class="form-control" id="z-step" placeholder="x coordinate in meters">
</div>
</div>
<div align="center" style="padding-bottom: 10px">
<button class="btn btn-warning" id="generate-coordinate" onclick="generateCoordinate()" disabled>Add new point calibration</button>
</div>
</div>
</div>
<div align="center" style="padding-bottom: 10px">
<button class="btn btn-warning" id="add-coordinate" onclick="addNewPointCalibration()" disabled>Add new point calibration</button>
</div>
</div>
<div class="panel panel-default" id="add-3D-point-list" style="display:none;">
<div class="panel-heading">Cameras</div>
<div class="panel-body" >
<table class="tableau" id="points-camera">
<tr class="header">
<th style="width:40%; height=100%;">Camera point3D</th>
<th style="width:30%;">Cameras tracked</th>
<th style="width:30%;"></th>
</tr>
</table>
</div>
</div>
<div class="alert bg-warning" id="not-enough-3d" role="alert" style="display: none;">
<svg class="glyph stroked empty-message"><use xlink:href="#stroked-empty-message"></use></svg> At least 4 points must be entered, <u>and seen by each camera</u> !
</div>
<div class="alert bg-success" id="enough-3d" role="alert" style="display: none;">
<svg class="glyph stroked checkmark"><use xlink:href="#stroked-checkmark"></use></svg> Enough points have been entered but remember, the more the better ;)
</div>
<div>
<p align="center" style="margin-top: 1px">
<button style="width:50%; margin-bottom: 10px; opacity:0; display: none;" class="btn btn-primary" id="enterCalibViewBtn" onclick="handleKeySpace()" >Enter Calibration View</button>
</p>
</div>
<div align="center" style="margin-top: 1px">
<button style="width:50%; display: none;" type="submit" class="btn btn-danger" id="stop-calibration-btn" onclick="stopCalibration()">Exit Calibration </button>
</div>
<div class="alert bg-success" id="calibration-finished" role="alert" style="display:none;">
<svg class="glyph stroked checkmark"><use xlink:href="#stroked-checkmark"></use></svg> YOUR CALIBRATION IS FINISHED !!!
</div>
<div id="stop-calibration-btn" style="display:none;">
<p align="center" style="margin-top: 1px">
<button style="width:50%; margin-left: 10px;" type="submit" class="btn btn-danger" onclick="stopCalibration()">Stop Calibration </button>
</p>
</div>
</div>
<div class="col-md-3" >
<div class="panel panel-info" style="position:fixed; margin-right: 4`0px;">
<div class="panel-heading">
<strong>Info Panel</strong>
</div>
<div class="panel-body">
<p id="info-text">Welcome to VR Tracker calibrating tool ! This will guide you through the calibration process. Note that this has to be done every time you move the cameras. </br>1. First plug-in your Gateway </br>2. Connect to "VR Tracker Gateway" Wifi (password is "vrtracker") </br>3. Once you see the message "Successfully connected" Go to the next step !</p>
</div>
</div>
</div>
</div><!--/.row-->
<div class="row">
<div class="col-lg-12" id="after-calibration-display" style="display:none;">
<div class="panel panel-default">
<div class="panel-heading">Cameras</div>
<div class="panel-body">
<div class="icon-grid" id="cameras-grid">
</div>
</div>
<div class="row" style="align:right;">
<div align="center" style="margin-top: 1px; padding-bottom:5px; display:none" id="validation-btns">
<button type="submit" class="btn btn-primary" onclick="validateCalibration(false)" style="margin-right: 10px;">Discard Calibration</button>
<button type="submit" class="btn btn-info" onclick="validateCalibration(true)" style="margin-left: 5px;">Save Calibration</button>
</div>
</div>
</div>
</div>
</div><!--/.row-->
</div>
<div id="messageScreen" class="panel panel-default">
<div class="alert bg-danger" id="calibration-failed" role="alert">
<svg class="glyph stroked cancel"><use xlink:href="#stroked-cancel"></use></svg> Calibration point Not Found !
</div>
<div class="alert bg-warning" id="calibration-inprocess" role="alert">
<svg class="glyph stroked hourglass"><use xlink:href="#stroked-hourglass"/></svg> Detecting calibration point...
</div>
<div class="alert bg-success" id="calibration-success" role="alert">
<svg class="glyph stroked checkmark"><use xlink:href="#stroked-checkmark"></use></svg> Calibration point Found !
</div>
<div id="calibrationMessage">Move the Tag to this Position and Hit Space : </div>
<div id="fullScreenMessage">Next Calibration Point : </div>
<div align="center" style=" margin: auto; margin-bottom: 4px;" >
<button type="submit" class="btn btn-md" id="next-point-btn" onclick="moveToNextPoint()">Next Point</button>
<button type="submit" class="btn btn-md" id="calibrate-btn" onclick="calibrate()">Calibrate</button>
</div>
<div id="cross">
<a class="quit-view" onclick="masquerAffichageMessage()">×</a>
</div>
</div>
<div id="cover" > </div>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/chart.min.js"></script>
<script src="js/chart-data.js"></script>
<script src="js/easypiechart.js"></script>
<script src="js/easypiechart-data.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/bootstrap-table.js"></script>
<script>
!function ($) {
$(document).on("click","ul.nav li.parent > a > span.icon", function(){
$(this).find('em:first').toggleClass("glyphicon-minus");
});
$(".sidebar span.icon").find('em:first').addClass("glyphicon-plus");
}(window.jQuery);
$(window).on('resize', function () {
if ($(window).width() > 768) $('#sidebar-collapse').collapse('show')
})
$(window).on('resize', function () {
if ($(window).width() <= 767) $('#sidebar-collapse').collapse('hide')
})
</script>
<script src="js/calibration.js"></script>
<script src="js/parser.js"></script>
<script src="js/keyboard.js"></script>
<script src="js/save.js"></script>
</body>
</html>