-
Notifications
You must be signed in to change notification settings - Fork 1
/
test.htm
54 lines (48 loc) · 1.43 KB
/
test.htm
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<script src="http://cdn.robotwebtools.org/threejs/current/three.min.js"></script>
<script src="http://cdn.robotwebtools.org/ColladaAnimationCompress/current/ColladaLoader2.js"></script>
<script src="http://cdn.robotwebtools.org/threejs/current/STLLoader.js"></script>
<script src="http://cdn.robotwebtools.org/EventEmitter2/current/eventemitter2.min.js"></script>
<script src="http://cdn.robotwebtools.org/roslibjs/current/roslib.min.js"></script>
<script src="http://cdn.robotwebtools.org/ros3djs/current/ros3d.min.js"></script>
<script>
function init() {
var ros = new ROSLIB.Ros({
url : 'ws://demo.robotwebtools.org:9090'
});
var viewer = new ROS3D.Viewer({
divID : 'urdf',
width : window.innerWidth,
height : window.innerHeight,
antialias : true,
background: '#002233'
});
viewer.addObject(new ROS3D.Grid({
color:'#0181c4',
cellSize: 0.5,
num_cells: 20
}));
var tfClient = new ROSLIB.TFClient({
ros : ros,
angularThres : 0.01,
transThres : 0.01,
rate : 10.0,
fixedFrame: '/base_link'
});
new ROS3D.UrdfClient({
ros : ros,
tfClient : tfClient,
path : 'http://resources.robotwebtools.org/',
rootObject : viewer.scene,
loader : ROS3D.COLLADA_LOADER_2
});
}
</script>
</head>
<body onload="init()">
<div id="urdf"></div>
</body>
</html>