forked from marvinferber/node-red-contrib-ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathros.html
93 lines (86 loc) · 3.02 KB
/
ros.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
<script type="text/javascript">
RED.nodes.registerType('ros-subscribe',{
category: 'input',
color: '#fef5ff',
defaults: {
server: {type:"ros-server"},
topicname: {value: ""}
},
inputs:0,
outputs:1,
paletteLabel: 'ros sub',
icon: "icon.png",
label: function() {
return this.topicname||"ros subscribe";
}
});
</script>
<script type="text/x-red" data-template-name="ros-subscribe">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-user"></i> ROS Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-topicname"><i class="icon-tag"></i> Topic</label>
<input type="text" id="node-input-topicname" placeholder="/mytopic">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType('ros-publish',{
category: 'output',
color: '#fef5ff',
defaults: {
server: {type:"ros-server"},
topicname: {value: ""},
msgtype: {value: "std_msgs/String"}
},
inputs:1,
outputs:0,
align: 'right',
paletteLabel: 'ros pub',
icon: "icon.png",
label: function() {
return this.topicname||"ros publish";
}
});
</script>
<script type="text/x-red" data-template-name="ros-publish">
<div class="form-row">
<label for="node-input-server"><i class="fa fa-user"></i> ROS Server</label>
<input type="text" id="node-input-server">
</div>
<div class="form-row">
<label for="node-input-topicname"><i class="icon-tag"></i> Topic</label>
<input type="text" id="node-input-topicname" placeholder="/mytopic">
</div>
<div class="form-row">
<label for="node-input-msgtype"><i class="fa fa-dot-circle-o"></i> Type</label>
<select id="node-input-msgtype">
<option value="std_msgs/String">std_msgs/String</option>
<option value="std_msgs/Int16">std_msgs/Int16</option>
<option value="std_msgs/Int32">std_msgs/Int32</option>
<option value="geometry_msgs/Twist">geometry_msgs/Twist</option>
<option value="geometry_msgs/InteractiveMarkerFeedback">geometry_msgs/InteractiveMarkerFeedback</option>
</select>
</div>
</script>
<script type="text/x-red" data-help-name="ros-subscribe">
<p>A node that subscribe to ROS bridge websocket server</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('ros-server',{
category: 'config',
defaults: {
url: {value:"wss://bennu.magic.ubc.ca:9000/rosws",required:true}
},
label: function() {
return this.url;
}
});
</script>
<script type="text/x-red" data-template-name="ros-server">
<div class="form-row">
<label for="node-config-input-url"><i class="icon-bookmark"></i> Url</label>
<input type="text" id="node-config-input-url">
</div>
</script>