58 lines
1.5 KiB
HTML
58 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<script type="text/javascript" src="../roslib.min.js"></script>
|
|
<script src="../js/three.js"></script>
|
|
<script src="../js/three.js-dev/examples/js/controls/OrbitControls.js"></script>
|
|
<script src="../js/three.js-dev/examples/js/libs/stats.min.js"></script>
|
|
<script src="../js/three.js-dev/examples/js/libs/dat.gui.min.js"></script>
|
|
<script src="../eventemitter2.min.js"></script>
|
|
<script src="../ros3djs/ros3d.js"></script>
|
|
|
|
<script>
|
|
/**
|
|
* Setup all visualization elements when the page is loaded.
|
|
*/
|
|
function init() {
|
|
// Connect to ROS.
|
|
var ros = new ROSLIB.Ros({
|
|
url : 'ws://localhost:9190'
|
|
});
|
|
|
|
// Create the main viewer.
|
|
var viewer = new ROS3D.Viewer({
|
|
divID : 'map',
|
|
width : 800,
|
|
height : 600,
|
|
antialias : true
|
|
});
|
|
|
|
// Setup the marker client.
|
|
var gridClient = new ROS3D.OccupancyGridClient({
|
|
ros : ros,
|
|
rootObject : viewer.scene
|
|
});
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body onload="init()">
|
|
<!--
|
|
<h1>Simple Map Example</h1>
|
|
<p>
|
|
Run the following commands in the terminal then refresh this page. This will load a map from the
|
|
<tt>ros-groovy-rail-maps</tt>
|
|
package.
|
|
</p>
|
|
<ol>
|
|
<li><tt>roscore</tt></li>
|
|
<li><tt>rosrun map_server map_server /opt/ros/groovy/share/rail_maps/maps/ilab.pgm
|
|
0.05</tt></li>
|
|
<li><tt>roslaunch rosbridge_server rosbridge_websocket.launch</tt></li>
|
|
</ol>
|
|
-->
|
|
<div id="map"></div>
|
|
</body>
|
|
</html>
|