agent.launch 4.31 KB
Newer Older
1
2
3
<launch>

	<!-- INPUT ARGUMENT OF THE AGENT's ID -->
beuchatp's avatar
beuchatp committed
4
	<arg name="agentID" default="$(optenv DFALL_DEFAULT_AGENT_ID)" />
5

6
7
8
	<!-- INPUT ARGUMENT OF THE COORDINATOR's ID -->
	<arg name="coordID" default="$(optenv DFALL_DEFAULT_COORD_ID)" />

9
10
11
	<!-- INPUT ARGUMENT FOR LAUNCHING A GUI OR NOT -->
	<arg name="withGUI" default="true" />

beuchatp's avatar
beuchatp committed
12
13
	<!-- Example of how to use the value in agentID -->
    <!-- <param name="param" value="$(arg agentID)"/> -->
14

15
    <!-- Example of how to specify the agentID from command line -->
16
    <!-- roslaunch dfall_pkg agentID:=1 -->
17

18
    <group ns="$(eval 'agent' + str(agentID).zfill(3))">
19
20
21

		<!-- CRAZY RADIO -->
		<node
22
			pkg    = "dfall_pkg"
23
24
25
26
			name   = "CrazyRadio"
			output = "screen"
			type   = "CrazyRadio.py"
			>
27
			<rosparam command="load" file="$(find dfall_pkg)/param/BatteryMonitor.yaml" />
28
29
		</node>

30
		<!-- FLYING AGENT CLIENT -->
31
		<node
32
			pkg    = "dfall_pkg"
33
			name   = "FlyingAgentClient"
34
			output = "screen"
35
			type   = "FlyingAgentClient"
36
			>
beuchatp's avatar
beuchatp committed
37
			<param name="agentID" value="$(arg agentID)" />
38
			<param name="coordID" value="$(arg coordID)" />
39
40
		</node>

41
42
		<!-- BATTERY MONITOR -->
		<node
43
			pkg    = "dfall_pkg"
44
45
46
47
48
49
			name   = "BatteryMonitor"
			output = "screen"
			type   = "BatteryMonitor"
			>
		</node>

50
51
		<!-- DEFAULT CONTROLLER -->
		<node
52
			pkg    = "dfall_pkg"
53
54
55
56
57
58
			name   = "DefaultControllerService"
			output = "screen"
			type   = "DefaultControllerService"
			>
		</node>

59
60
		<!-- SAFE CONTROLLER -->
		<node
61
			pkg    = "dfall_pkg"
62
63
64
65
66
67
68
69
			name   = "SafeControllerService"
			output = "screen"
			type   = "SafeControllerService"
			>
		</node>

		<!-- DEMO CONTROLLER -->
		<node
70
			pkg    = "dfall_pkg"
71
72
73
74
75
			name   = "DemoControllerService"
			output = "screen"
			type   = "DemoControllerService"
			>
		</node>
76
77
78

		<!-- STUDENT CONTROLLER -->
		<node
79
			pkg    = "dfall_pkg"
80
81
82
83
84
85
			name   = "StudentControllerService"
			output = "screen"
			type   = "StudentControllerService"
			>
		</node>

86
87
		<!-- REMOTE CONTROLLER -->
		<node
88
			pkg    = "dfall_pkg"
89
90
91
92
93
94
			name   = "RemoteControllerService"
			output = "screen"
			type   = "RemoteControllerService"
			>
		</node>

95
96
		<!-- TUNING CONTROLLER -->
		<node
97
			pkg    = "dfall_pkg"
98
99
100
101
102
103
			name   = "TuningControllerService"
			output = "screen"
			type   = "TuningControllerService"
			>
		</node>

104
105
		<!-- PICKER CONTROLLER -->
		<node
106
			pkg    = "dfall_pkg"
107
108
109
110
111
112
			name   = "PickerControllerService"
			output = "screen"
			type   = "PickerControllerService"
			>
		</node>

113
114
115
116
117
118
119
120
121
		<!-- TEMPLATE CONTROLLER -->
		<node
			pkg    = "dfall_pkg"
			name   = "TemplateControllerService"
			output = "screen"
			type   = "TemplateControllerService"
			>
		</node>

122
123
124
125
126
127
128
129
130
		<!-- TEST MOTORS CONTROLLER -->
		<node
			pkg    = "dfall_pkg"
			name   = "TestMotorsControllerService"
			output = "screen"
			type   = "TestMotorsControllerService"
			>
		</node>

131
132
		<!-- PARAMETER SERVICE -->
		<node
133
			pkg    = "dfall_pkg"
134
135
136
137
138
			name   = "ParameterService"
			output = "screen"
			type   = "ParameterService"
			>
			<param name="type"     type="str"  value="agent" />
139
			<param name="agentID"  value="$(arg agentID)" />
140
141
			<rosparam
				command = "load"
142
143
				file    = "$(find dfall_pkg)/param/FlyingAgentClientConfig.yaml"
				ns      = "FlyingAgentClientConfig"
144
			/>
145
			<rosparam
146
				command = "load"
147
				file    = "$(find dfall_pkg)/param/BatteryMonitor.yaml"
148
				ns      = "BatteryMonitor"
149
			/>
150
			<rosparam
151
				command = "load"
152
				file    = "$(find dfall_pkg)/param/SafeController.yaml"
153
154
				ns      = "SafeController"
			/>
155
156
			<rosparam
				command = "load"
157
				file    = "$(find dfall_pkg)/param/RemoteController.yaml"
158
159
				ns      = "RemoteController"
			/>
160
161
			<rosparam
				command = "load"
162
				file    = "$(find dfall_pkg)/param/TuningController.yaml"
163
164
				ns      = "TuningController"
			/>
165
166
			<rosparam
				command = "load"
167
				file    = "$(find dfall_pkg)/param/PickerController.yaml"
168
169
				ns      = "PickerController"
			/>
170
171
172
173
174
			<rosparam
				command = "load"
				file    = "$(find dfall_pkg)/param/TemplateController.yaml"
				ns      = "TemplateController"
			/>
175
176
		</node>

177

178
		<!-- AGENT GUI (aka. the "student GUI") -->
179
180
		<group if="$(arg withGUI)">
			<node
181
				pkg    = "dfall_pkg"
182
				name   = "FlyingAgentGUI"
183
				output = "screen"
184
				type   = "FlyingAgentGUI"
185
186
187
				>
				<param name="type"     type="str"  value="agent" />
				<param name="agentID"  value="$(arg agentID)" />
188
189
			</node>
		</group>
190
191
192
193
		
	</group>

</launch>