-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrobots_tunnel_practice_2-4.launch
203 lines (184 loc) · 9.04 KB
/
robots_tunnel_practice_2-4.launch
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<?xml version="1.0"?>
<launch>
<!-- Spawn your team here. -->
<arg name="anchor_name" default="Base" />
<arg name="x1_name" default="X1" />
<arg name="x2_name" default="X2" />
<arg name="x3_name" default="X3" />
<arg name="x4_name" default="X4" />
<arg name="b1_name" default="B01" />
<arg name="b2_name" default="B02" />
<arg name="b3_name" default="B03" />
<arg name="b4_name" default="B04" />
<arg name="b5_name" default="B05" />
<arg name="b6_name" default="B06" />
<arg name="b7_name" default="B07" />
<arg name="b8_name" default="B08" />
<!-- Spawn Anchor -->
<!-- We need to use a different model but for now using the X2 model -->
<group ns="$(arg anchor_name)">
<include file="$(find x2_description)/launch/description.launch">
<arg name="robot_namespace" value="$(arg anchor_name)" />
</include>
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model"
args="-urdf -model $(arg anchor_name) -param robot_description -x 1 -y 0 -z 0.1" />
<include file="$(find x2_control)/launch/control.launch">
<arg name="robot_namespace" value="$(arg anchor_name)" />
</include>
</group>
<!-- Spawn Beacons -->
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b1_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-5"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b2_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-4"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b3_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-3"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b4_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-2"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b5_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-2"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b6_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-2"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b7_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-2"/>
<arg name="z" value="0.1"/>
</include>
<include file="$(env HOME)/marble/scripts/beacon.launch">
<arg name="robot_namespace" value="$(arg b8_name)"/>
<arg name="x" value="-2"/>
<arg name="y" value="-2"/>
<arg name="z" value="0.1"/>
</include>
<!-- Spawn X1 -->
<include file="$(find x1_gazebo)/launch/spawn_x1.launch">
<arg name="robot_namespace" value="$(arg x1_name)"/>
<arg name="x" value="13"/>
<arg name="y" value="0.5"/>
<arg name="z" value="0.2"/>
<arg name="yaw" value="0"/>
</include>
<!-- Spawn X2 -->
<include file="$(find x1_gazebo)/launch/spawn_x1.launch">
<arg name="robot_namespace" value="$(arg x2_name)"/>
<arg name="x" value="13"/>
<arg name="y" value="-0.5"/>
<arg name="z" value="0.2"/>
<arg name="yaw" value="0"/>
</include>
<!-- Spawn X3 -->
<include file="$(find x1_gazebo)/launch/spawn_x1.launch">
<arg name="robot_namespace" value="$(arg x3_name)"/>
<arg name="x" value="11"/>
<arg name="y" value="0.5"/>
<arg name="z" value="0.2"/>
<arg name="yaw" value="0"/>
</include>
<!-- Spawn X4 -->
<include file="$(find x1_gazebo)/launch/spawn_x1.launch">
<arg name="robot_namespace" value="$(arg x4_name)"/>
<arg name="x" value="11"/>
<arg name="y" value="-0.5"/>
<arg name="z" value="0.2"/>
<arg name="yaw" value="0"/>
</include>
<!-- <group ns="$(arg x2_name)"> -->
<!-- <include file="$(find x2_description)/launch/description.launch"> -->
<!-- <arg name="robot_namespace" value="$(arg x2_name)" /> -->
<!-- </include> -->
<!-- <node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" -->
<!-- args="-urdf -model $(arg x2_name) -param robot_description -x 0 -y 1 -z 0.2" /> -->
<!-- <include file="$(find x2_control)/launch/control.launch"> -->
<!-- <arg name="robot_namespace" value="$(arg x2_name)" /> -->
<!-- </include> -->
<!-- </group> -->
<!-- X3 quadcopter -->
<!-- <group ns="$(arg x3_name)">
<include file="$(find x3_description)/launch/spawn_x3.launch">
<arg name="mav_name" value="X3" />
<arg name="x" value="-1"/>
<arg name="y" value="-1"/>
<arg name="z" value="0.1"/>
</include> -->
<!-- Spawn a position controller -->
<!-- <node name="lee_position_controller_node" pkg="rotors_control" type="lee_position_controller_node">
<rosparam command="load" file="$(find rotors_gazebo)/resource/lee_controller_iris.yaml" />
<rosparam command="load" file="$(find rotors_gazebo)/resource/iris.yaml" />
<remap from="odometry" to="odometry_sensor1/odometry" />
</node> -->
<!-- Give robot_descriptom parameter and joint states, publish TF frames -->
<!-- <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<node name="robot_state_publisher_fixed" pkg="robot_state_publisher" type="robot_state_publisher">
<remap from="joint_states" to="fixed/joint_states" />
</node> -->
<!-- Convert cmd_vel into pose command so as to provide the same interface -->
<!-- <node name="cmdvel_transform" pkg="subt_example" type="cmdvel_converter.py" args="/X3/odometry_sensor1/pose /X3/cmd_vel /X3/command/pose"/>
</group> -->
<!-- X4 quadcopter -->
<!-- <group ns="$(arg x4_name)">
<include file="$(find x4_description)/launch/spawn_x4.launch">
<arg name="mav_name" value="X4" />
<arg name="x" value="-2"/>
<arg name="y" value="-1"/>
<arg name="z" value="0.1"/>
</include> -->
<!-- Spawn a position controller -->
<!-- <node name="lee_position_controller_node" pkg="rotors_control" type="lee_position_controller_node">
<rosparam command="load" file="$(find rotors_gazebo)/resource/lee_controller_neo11.yaml" />
<rosparam command="load" file="$(find rotors_gazebo)/resource/neo11.yaml" />
<remap from="odometry" to="odometry_sensor1/odometry" />
</node> -->
<!-- Give robot_descriptom parameter and joint states, publish TF frames -->
<!-- <node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" />
<node name="robot_state_publisher_fixed" pkg="robot_state_publisher" type="robot_state_publisher">
<remap from="joint_states" to="fixed/joint_states" />
</node> -->
<!-- Convert cmd_vel into pose command so as to provide the same interface -->
<!-- <node name="cmdvel_transform" pkg="subt_example" type="cmdvel_converter.py" args="/X4/odometry_sensor1/pose /X4/cmd_vel /X4/command/pose"/>
</group> -->
<!-- Competitor's control nodes -->
<node name="$(arg anchor_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg anchor_name) $(arg anchor_name)" />
<node name="$(arg b1_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b1_name) $(arg b1_name)" />
<node name="$(arg b2_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b2_name) $(arg b2_name)" />
<node name="$(arg b3_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b3_name) $(arg b3_name)" />
<node name="$(arg b4_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b4_name) $(arg b4_name)" />
<node name="$(arg b5_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b5_name) $(arg b5_name)" />
<node name="$(arg b6_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b6_name) $(arg b6_name)" />
<node name="$(arg b7_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b7_name) $(arg b7_name)" />
<node name="$(arg b8_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg b8_name) $(arg b8_name)" />
<node name="$(arg x1_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg x1_name) $(arg x1_name)" />
<node name="$(arg x2_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg x2_name) $(arg x2_name)" />
<node name="$(arg x3_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg x3_name) $(arg x3_name)" />
<node name="$(arg x4_name)_control" pkg="subt_example" type="subt_example_node" args="$(arg x4_name) $(arg x4_name)" />
<!-- Teleop node -->
<arg name="joy_dev" default="/dev/input/js0" />
<include file="$(find subt_example)/launch/teleop.launch">
<arg name="joy_dev" default="$(arg joy_dev)" />
<arg name="robot_config" value="$(find subt_example)/config/robot_config.yaml"/>
</include>
</launch>