-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathindex.html
164 lines (148 loc) · 7.9 KB
/
index.html
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
<!DOCTYPE html>
<!--
This file is part of the ros_webconsole package (https://github.com/rbonghi/ros_webconsole or http://rnext.it).
Copyright (c) 2019 Raffaello Bonghi.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Page css -->
<link rel="stylesheet" href="css/index.css" />
<!-- jQuery Mobile -->
<link rel="stylesheet" href="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css" />
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<!-- ROS libs -->
<script type="text/javascript" src="https://static.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/roslibjs/current/roslib.min.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/EaselJS/current/easeljs.min.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/ros2djs/current/ros2d.min.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/threejs/current/three.min.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/threejs/current/STLLoader.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/threejs/current/ColladaLoader.js"></script>
<script type="text/javascript" src="https://static.robotwebtools.org/ros3djs/current/ros3d.js"></script>
<!-- Load page controller -->
<script type="text/javascript" src="js/js-yaml.min.js"></script>
<script type="text/javascript" src="js/nav2d.js"></script>
<script type="text/javascript" src="js/loadcenter.js"></script>
<script type="text/javascript" src="js/pages.js"></script>
<script type="text/javascript" src="js/ros_controller.js"></script>
<script type="text/javascript" src="js/Viewer3D.js"></script>
<script type="text/javascript" src="js/Viewer2D.js"></script>
<script type="text/javascript">
// Load all scripts and css
loadcenter(function() {
// Run the document only when de DOM is ready and the callback with the json file in loaded
// reference:
// https://demos.jquerymobile.com/1.2.1/docs/api/events.html
$(document).on("pageinit", function() {});
// Single initialization maps
$(document).ready(function () {
// Load size page
var size = pages.size();
// Initialize ros controller
var ros = new ros_controller.connection({
server: (window.location.hostname.includes('github.io')) ? '' : window.location.hostname,
protocol: (window.location.hostname.includes('github.io')) ? 'http:' : location.protocol
});
// Load Configuration controller
var config = new pages.configuration(ros);
// Init3D map controller
var map3D = new Viewer3D.Map3D(ros, size);
// Init2D map controller
var map2D = new Viewer2D.Map2D(ros, size);
// Build Navigation bar menu
pages.controller(map2D, map3D);
});
})
</script>
</head>
<body>
<div data-role="page" id="map">
<div data-role="panel" id="panel-config" data-theme="a" data-display="push" data-position="left" data-swipe-close="false">
<div id="view3D-menu">
<h3 class="ui-bar ui-bar-a ui-corner-all">Viewer 3D</h3>
<div class="ui-body ui-body-a ui-corner-all">
<div class="ui-field-contain">
<label for="view3D-frame">Frame:</label><input data-mini="true"type="search" name="frame" id="view3D-frame" value="">
</div>
<ul data-role="listview" data-filter="true" data-filter-reveal="true" data-filter-placeholder="Add view..." data-inset="true" id="view3D-element"></ul>
<div data-role="collapsibleset" data-content-theme="a" data-iconpos="right" id="view3D-list"></div>
</div>
</div>
<div id="view2D-menu">
<h3 class="ui-bar ui-bar-a ui-corner-all">Viewer 2D</h3>
<div class="ui-body ui-body-a ui-corner-all">
<label for="view2D-frame">Frame:</label><input data-mini="true"type="search" name="frame" id="view2D-frame" value="">
</div>
</div>
<div data-role="collapsible" data-iconpos="right" id="ros-server">
<h3 id="ros-server-status">Status</h3>
<label for="ros-url" class="ui-hidden-accessible">ws://</label><input type="text" data-clear-btn="true" name="ros-url" id="ros-url" data-mini="true" value="" placeholder="localhost">
<a href="#ros-server-refresh" id="ros-server-refresh" class="ui-btn ui-shadow ui-corner-all ui-icon-recycle ui-btn-icon-left">Refresh</a>
</div>
<fieldset class="ui-grid-a">
<div class="ui-block-a"><a href="#config" class="ui-btn ui-shadow ui-corner-all ui-icon-edit ui-btn-icon-left" data-rel="dialog" data-transition="pop">Edit</a></div>
<div class="ui-block-b"><a href="#config-save" class="ui-btn ui-shadow ui-corner-all ui-icon-action ui-btn-icon-left">Export</a></div>
</fieldset>
<a href="#debug" class="ui-btn ui-shadow ui-corner-all ui-icon-info ui-btn-icon-left">Debug</a>
</div>
<div data-role="panel" id="panel-drive" data-theme="a" data-display="push" data-position="right" data-swipe-close="false"></div>
<div data-role="header" data-theme="a" data-position-fixed="true">
<a href="#panel-config" class="ui-btn ui-btn-left ui-icon-gear ui-btn-icon-notext ui-corner-all">Config</a>
<a href="#panel-drive" class="ui-btn ui-btn-right ui-icon-star ui-btn-icon-notext ui-corner-all">Drive</a>
</div>
<div role="main" data-theme="a" class="ui-content">
<div id="view3D" class="map"></div>
<div id="view2D" class="map"></div>
</div>
<div data-role="footer" data-theme="a" data-position-fixed="true">
<div data-role="controlgroup" data-type="horizontal" data-mini="true">
<a href="#map" id="map-type" class="ui-btn ui-corner-all">2D</a>
<a href="#" class="ui-btn ui-corner-all ui-icon-navigation ui-btn-icon-notext">Icon only</a>
<a href="#" class="ui-btn ui-corner-all ui-icon-location ui-btn-icon-notext">Icon only</a>
</div>
</div>
</div>
<!-- Debug page -->
<div data-role="page" id="debug">
<div data-role="header" data-theme="a" data-position-fixed="true">
<h1>Debug</h1>
</div>
<div role="main" data-theme="a" class="ui-content">
<div class="ui-grid-b ui-responsive">
<div class="ui-block-a"><div class="ui-body ui-body-d" id="debug-nodes">Nodes</div></div>
<div class="ui-block-b"><div class="ui-body ui-body-d">Topics</div></div>
</div>
</div>
<div data-role="footer" data-theme="a" data-position-fixed="true">
<a href="#map" data-rel="back" class="ui-btn ui-shadow ui-corner-all ui-btn-inline ui-icon-back ui-btn-icon-left">Back</a>
</div>
</div>
<!-- Configuration page -->
<div data-role="page" id="config">
<div data-role="header" data-theme="b">
<h1>Configuration</h1>
</div>
<div role="main" class="ui-content">
<label for="config-area" class="ui-hidden-accessible">Configuration:</label>
<textarea cols="40" rows="8" name="config-area" id="config-area" data-autogrow="false"></textarea>
</div>
<div data-role="footer">
<a href="#map" data-rel="back" class="ui-btn ui-shadow ui-corner-all ui-btn-inline ui-icon-back ui-btn-icon-left">Back</a>
<a href="#config-save" class="ui-btn ui-shadow ui-corner-all ui-icon-action ui-btn-icon-left">Export</a>
</div>
</div>
</body>
</html>