-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
31 lines (29 loc) · 716 Bytes
/
Copy pathmain.js
File metadata and controls
31 lines (29 loc) · 716 Bytes
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
// main.js
import rosConnection from './rosConnection.js';
import actionClient from './actionClient.js';
import visualizeModel from './visualizeModel.js';
import camera from './camera.js';
import map from './map.js';
import teleop from './teleop.js';
var app = new Vue({
el: '#app',
// I use mixin to import the methods and data from the other files
mixins: [
rosConnection,
actionClient,
visualizeModel,
camera,
map,
teleop
],
mounted() {
this.interval = setInterval(() => {
if (this.ros != null && this.ros.isConnected) {
this.ros.getNodes((data) => { }, (error) => { })
}
}, 10000)
},
beforeDestroy() {
clearInterval(this.interval);
},
});