forked from selena-groh/tuftstelepresence
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
91 lines (84 loc) · 4.47 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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Telepresence TurtleBot</title>
<link rel="icon" type="image/jpeg" href="res/raphael-shell.png">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link rel="stylesheet" href="css/custbootstrap.min.css">
<link rel="stylesheet" href="css/style.css">
<!-- <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" />
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.0/cosmo/bootstrap.min.css">
-->
</head>
<body onload="init()">
<nav class="navbar navbar-expand-lg navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="#">Telepresence TurtleBot</a>
</div>
<ul class="nav navbar-nav">
<li><a>Comp50AIR - Selena Groh, Serena Thoma, & Trung Truong - April 2018</a></li>
</ul>
</div>
</nav>
<div class="container">
<div class="row">
<div class="col" id="teleop">
<div>
<div id="connector">
<h2>Connect to TurtleBot</h2>
<span>TurtleBot's IP Address and Port: </span>
<input type="text" id="ip" placeholder="<ip_address>:<port>">
<button class="btn btn-primary" type="submit" onclick="updateIP()" value="Connect">Connect</button>
</div>
<h2>TurtleBot Status</h2>
<p id='status'><strong>STATUS: DISCONNECTED</strong></p>
<div id="battery-indicator" style="display: none">
<span id='level'>Battery Level: </span>
<div class="progress">
<div class="progress-bar" id='battery' role="progressbar" style="width:0%"></div>
</div>
</div>
<h2>Instructions</h2>
<ol>
<li><strong>On the TurtleBot</strong>, run the following commands in separate terminals:
<ul>
<li><code>roscore</code></li>
<li><code>roslaunch tbot2_launch tbot2.launch</code></li>
<li><code>roslaunch rosbridge_server rosbridge_websocket.launch</code></li>
<li><code>roslaunch tbot2_launch amcl_navigation.launch ssl:=true certfile:=/home/turtlebot/server_cert.pem keyfile:=/home/turtlebot/server_key.pem authenticate:=false</code>
<ul>
<li>Optional: add <code>map_file:=/path/to/map/file.yaml</code> to specify a map file</li>
<li>This command will launch an <a href="http://wiki.ros.org/rviz">rviz</a> window. Tell the TurtleBot its current position by entering a 2D Pose Estimate.</li>
</ul></li>
<li><code>rosrun robot_pose_publisher robot_pose_publisher</code></li>
</ul>
</li>
<li><strong>On this webpage</strong>, enter IP Address and Port Number in the format <code>0.0.0.0:0000</code>. Default port is <code>9090</code>.
<ul>
<li>If this doesn't connect, try navigating to https://ip:port/</li>
</ul>
</li>
<li>Click "Connect".</li>
<li>If the status says "CONNECTED," you have successfully connected to the TurtleBot's webserver. Else, something has gone wrong.</li>
</ol>
</div>
</div>
<div class="col" id="map">
<h2>TurtleBot's Map</h2>
<p id="no-map-loaded">There is currently no map loaded.</p>
</div>
</div>
</div>
<script src="https://static.robotwebtools.org/EventEmitter2/current/eventemitter2.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/nav2djs/current/nav2d.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.23/jquery-ui.min.js"></script>
<script src="https://static.robotwebtools.org/keyboardteleopjs/current/keyboardteleop.js"></script>
<script src="https://static.robotwebtools.org/roslibjs/current/roslib.js"></script>
<script src="scripts/main.js"></script>
</body>
</html>