Skip to content

Commit 489d38c

Browse files
swarms command
1 parent 3fcf7db commit 489d38c

File tree

7 files changed

+347
-7
lines changed

7 files changed

+347
-7
lines changed

.vscode/settings.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,26 @@
1313
"/home/edison/vision_ws/devel/lib/python2.7/dist-packages",
1414
"/opt/ros/kinetic/lib/python2.7/dist-packages",
1515
"/home/userx/anaconda3/lib/python3.5/site-packages"
16-
]
16+
],
17+
"python.analysis.extraPaths": [
18+
"/home/edison/vanttec_ws/devel/lib/python2.7/dist-packages",
19+
"/home/edison/vanttec_uuv_ws/devel/lib/python2.7/dist-packages",
20+
"/home/edison/student_ws/devel/lib/python2.7/dist-packages",
21+
"/home/edison/turtle_ws1/devel/lib/python2.7/dist-packages",
22+
"/home/edison/turtlebot3_ws/devel/lib/python2.7/dist-packages",
23+
"/home/edison/turtle_ws/devel/lib/python2.7/dist-packages",
24+
"/home/edison/niryo_ws/devel/lib/python2.7/dist-packages",
25+
"/home/edison/vanttec_usv_ws/devel/lib/python2.7/dist-packages",
26+
"/home/edison/catkin_ws/devel/lib/python2.7/dist-packages",
27+
"/home/edison/intel_ws/devel/lib/python2.7/dist-packages",
28+
"/home/edison/vision_ws/devel/lib/python2.7/dist-packages",
29+
"/opt/ros/kinetic/lib/python2.7/dist-packages",
30+
"/home/userx/anaconda3/lib/python3.5/site-packages"
31+
],
32+
"files.associations": {
33+
"*.dae": "3dformat",
34+
"*.ipp": "cpp",
35+
"condition_variable": "cpp",
36+
"thread": "cpp"
37+
}
1738
}

uv_worlds/models/lake/model.sdf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</script>
3333
</material>
3434
</visual>
35-
35+
3636
<collision name="lake_bottom">
3737
<pose>0 0 0 0 0 0</pose>
3838
<geometry>

uv_worlds/worlds/swarms.world

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
<?xml version="1.0"?>
2+
<sdf version="1.5">
3+
<world name="default">
4+
<physics name="default_physics" default="true" type="ode">
5+
<max_step_size>0.002</max_step_size>
6+
<real_time_factor>1</real_time_factor>
7+
<real_time_update_rate>500</real_time_update_rate>
8+
<ode>
9+
<solver>
10+
<type>quick</type>
11+
<iters>50</iters>
12+
<sor>0.5</sor>
13+
</solver>
14+
</ode>
15+
</physics>
16+
<scene>
17+
<ambient>0.01 0.01 0.01 1.0</ambient>
18+
<sky>
19+
<clouds>
20+
<speed>12</speed>
21+
</clouds>
22+
</sky>
23+
<shadows>1</shadows>
24+
</scene>
25+
<!-- Origin placed somewhere in the middle of the Bodensee (Germany) -->
26+
<spherical_coordinates>
27+
<latitude_deg>47.6278771</latitude_deg>
28+
<longitude_deg>9.334553</longitude_deg>
29+
</spherical_coordinates>
30+
31+
<!-- Global light source -->
32+
<light type="directional" name="sun1">
33+
<pose>50 0 150 0 0 0</pose>
34+
<diffuse>1 1 1 1</diffuse>
35+
<specular>.1 .1 .1 1</specular>
36+
<direction>0.3 0.3 -1</direction>
37+
<cast_shadows>true</cast_shadows>
38+
</light>
39+
40+
<!-- Global light source -->
41+
<include>
42+
<uri>model://sun</uri>
43+
</include>
44+
45+
<!-- Virtual NED frame -->
46+
<include>
47+
<uri>model://ned_frame</uri>
48+
<pose>0 0 0 0 0 0</pose>
49+
</include>
50+
51+
<!-- Bounding box with sea surface -->
52+
<include>
53+
<uri>model://lake</uri>
54+
<pose>0 0 0 0 0 0</pose>
55+
</include>
56+
<!--
57+
<model name="boat1">
58+
<pose> 0 0 0 0 0 0</pose>
59+
<include>
60+
<uri>model://boat1</uri>
61+
</include>
62+
</model>
63+
<model name="boat2">
64+
<pose> 0 -5 0 0 0 1.57</pose>
65+
<include>
66+
<uri>model://boat2</uri>
67+
</include>
68+
</model>
69+
<model name="boat3">
70+
<pose> 5 -5 0 0 0 3.14</pose>
71+
<include>
72+
<uri>model://boat3</uri>
73+
</include>
74+
</model>
75+
<model name="drone4">
76+
<pose> 5 0 0 0 0 4.71</pose>
77+
<include>
78+
<uri>model://drone4</uri>
79+
</include>
80+
</model>
81+
<model name="drone5">
82+
<pose> 6 0 0 0 0 0</pose>
83+
<include>
84+
<uri>model://drone5</uri>
85+
</include>
86+
</model>
87+
<model name="drone6">
88+
<pose> 6 2 0 0 0 0</pose>
89+
<include>
90+
<uri>model://drone6</uri>
91+
</include>
92+
</model>
93+
<model name="drone7">
94+
<pose> 8 0 0 0 0 0</pose>
95+
<include>
96+
<uri>model://drone7</uri>
97+
</include>
98+
</model>
99+
<model name="drone8">
100+
<pose> 8 2 0 0 0 0</pose>
101+
<include>
102+
<uri>model://drone8</uri>
103+
</include>
104+
</model>
105+
<model name="drone9">
106+
<pose> 12 0 0 0 0 0</pose>
107+
<include>
108+
<uri>model://drone9</uri>
109+
</include>
110+
</model>
111+
<model name="drone10">
112+
<pose> 12 2 0 0 0 0</pose>
113+
<include>
114+
<uri>model://drone10</uri>
115+
</include>
116+
</model>
117+
<model name="drone11">
118+
<pose> 14 0 0 0 0 0</pose>
119+
<include>
120+
<uri>model://drone11</uri>
121+
</include>
122+
</model>
123+
<model name="drone12">
124+
<pose> 14 2 0 0 0 0</pose>
125+
<include>
126+
<uri>model://drone12</uri>
127+
</include>
128+
</model> -->
129+
130+
</world>
131+
</sdf>
132+

vanttec_usv

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit 1b3c108f26bae0e14a7616973d1ab66b317d5551
1+
Subproject commit 6eaa55693974c5f2231992547a8d564a3ba20b1c
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
<launch>
2+
<!-- We resume the logic in empty_world.launch, changing only the name of the world to be launched -->
3+
<include file="$(find gazebo_ros)/launch/empty_world.launch">
4+
<arg name="world_name" value="$(find uv_worlds)/worlds/swarms.world"/>
5+
<!-- more default parameters can be changed here -->
6+
</include>
7+
<!-- Debug flag -->
8+
<arg name="debug" default="0"/>
9+
<arg name="mode" default="vtec_s3_default"/>
10+
<arg name="world_frame" default="world"/>
11+
<!-- Boat1 -->
12+
<!-- Vehicle's namespace -->
13+
<arg name="namespace" default="boat1"/>
14+
<!-- Vehicle's initial pose -->
15+
<arg name="x" default="0"/>
16+
<arg name="y" default="0"/>
17+
<arg name="z" default="0"/>
18+
<arg name="roll" default="0"/>
19+
<arg name="pitch" default="0"/>
20+
<arg name="yaw" default="0"/>
21+
<group ns="$(arg namespace)">
22+
<param name="robot_description"
23+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace)" />
24+
25+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
26+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
27+
args="-urdf -x $(arg x) -y $(arg y) -z $(arg z) -R $(arg roll) -P $(arg pitch) -Y $(arg yaw) -model $(arg namespace) -param /$(arg namespace)/robot_description"/>
28+
29+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
30+
31+
<!-- Publish robot model for ROS -->
32+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
33+
<param name="robot_description" value="/$(arg namespace)/robot_description" />
34+
</node>
35+
</group>
36+
<!-- Boat2 -->
37+
<!-- Vehicle's namespace -->
38+
<arg name="namespace2" default="boat2"/>
39+
<!-- Vehicle's initial pose -->
40+
<arg name="x2" default="-2"/>
41+
<arg name="y2" default="2"/>
42+
<arg name="z2" default="0"/>
43+
<arg name="roll2" default="0"/>
44+
<arg name="pitch2" default="0"/>
45+
<arg name="yaw2" default="0"/>
46+
<group ns="$(arg namespace2)">
47+
<param name="robot_description"
48+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace2)" />
49+
50+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
51+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
52+
args="-urdf -x $(arg x2) -y $(arg y2) -z $(arg z2) -R $(arg roll2) -P $(arg pitch2) -Y $(arg yaw2) -model $(arg namespace2) -param /$(arg namespace2)/robot_description"/>
53+
54+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
55+
56+
<!-- Publish robot model for ROS -->
57+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
58+
<param name="robot_description" value="/$(arg namespace2)/robot_description" />
59+
</node>
60+
</group>
61+
<!-- Boat3 -->
62+
<!-- Vehicle's namespace -->
63+
<arg name="namespace3" default="boat3"/>
64+
<!-- Vehicle's initial pose -->
65+
<arg name="x3" default="-2"/>
66+
<arg name="y3" default="-2"/>
67+
<arg name="z3" default="0"/>
68+
<arg name="roll3" default="0"/>
69+
<arg name="pitch3" default="0"/>
70+
<arg name="yaw3" default="0"/>
71+
<group ns="$(arg namespace3)">
72+
<param name="robot_description"
73+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace3)" />
74+
75+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
76+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
77+
args="-urdf -x $(arg x3) -y $(arg y3) -z $(arg z3) -R $(arg roll3) -P $(arg pitch3) -Y $(arg yaw3) -model $(arg namespace3) -param /$(arg namespace3)/robot_description"/>
78+
79+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
80+
81+
<!-- Publish robot model for ROS -->
82+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
83+
<param name="robot_description" value="/$(arg namespace3)/robot_description" />
84+
</node>
85+
</group>
86+
<!-- Boat4 -->
87+
<!-- Vehicle's namespace -->
88+
<arg name="namespace4" default="boat4"/>
89+
<!-- Vehicle's initial pose -->
90+
<arg name="x4" default="-4"/>
91+
<arg name="y4" default="2"/>
92+
<arg name="z4" default="0"/>
93+
<arg name="roll4" default="0"/>
94+
<arg name="pitch4" default="0"/>
95+
<arg name="yaw4" default="0"/>
96+
<group ns="$(arg namespace4)">
97+
<param name="robot_description"
98+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace4)" />
99+
100+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
101+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
102+
args="-urdf -x $(arg x4) -y $(arg y4) -z $(arg z4) -R $(arg roll4) -P $(arg pitch4) -Y $(arg yaw4) -model $(arg namespace4) -param /$(arg namespace4)/robot_description"/>
103+
104+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
105+
106+
<!-- Publish robot model for ROS -->
107+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
108+
<param name="robot_description" value="/$(arg namespace4)/robot_description" />
109+
</node>
110+
</group>
111+
<!-- Boat5 -->
112+
<!-- Vehicle's namespace -->
113+
<arg name="namespace5" default="boat5"/>
114+
<!-- Vehicle's initial pose -->
115+
<arg name="x5" default="-4"/>
116+
<arg name="y5" default="-2"/>
117+
<arg name="z5" default="0"/>
118+
<arg name="roll5" default="0"/>
119+
<arg name="pitch5" default="0"/>
120+
<arg name="yaw5" default="0"/>
121+
<group ns="$(arg namespace5)">
122+
<param name="robot_description"
123+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace5)" />
124+
125+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
126+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
127+
args="-urdf -x $(arg x5) -y $(arg y5) -z $(arg z5) -R $(arg roll5) -P $(arg pitch5) -Y $(arg yaw5) -model $(arg namespace5) -param /$(arg namespace5)/robot_description"/>
128+
129+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
130+
131+
<!-- Publish robot model for ROS -->
132+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
133+
<param name="robot_description" value="/$(arg namespace5)/robot_description" />
134+
</node>
135+
</group>
136+
<!-- Boat6 -->
137+
<!-- Vehicle's namespace -->
138+
<arg name="namespace6" default="boat6"/>
139+
<!-- Vehicle's initial pose -->
140+
<arg name="x6" default="-6"/>
141+
<arg name="y6" default="2"/>
142+
<arg name="z6" default="0"/>
143+
<arg name="roll6" default="0"/>
144+
<arg name="pitch6" default="0"/>
145+
<arg name="yaw6" default="0"/>
146+
<group ns="$(arg namespace6)">
147+
<param name="robot_description"
148+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace6)" />
149+
150+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
151+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
152+
args="-urdf -x $(arg x6) -y $(arg y6) -z $(arg z6) -R $(arg roll6) -P $(arg pitch6) -Y $(arg yaw6) -model $(arg namespace6) -param /$(arg namespace6)/robot_description"/>
153+
154+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
155+
156+
<!-- Publish robot model for ROS -->
157+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
158+
<param name="robot_description" value="/$(arg namespace6)/robot_description" />
159+
</node>
160+
</group>
161+
<!-- Boat7 -->
162+
<!-- Vehicle's namespace -->
163+
<arg name="namespace7" default="boat7"/>
164+
<!-- Vehicle's initial pose -->
165+
<arg name="x7" default="-6"/>
166+
<arg name="y7" default="-2"/>
167+
<arg name="z7" default="0"/>
168+
<arg name="roll7" default="0"/>
169+
<arg name="pitch7" default="0"/>
170+
<arg name="yaw7" default="0"/>
171+
<group ns="$(arg namespace7)">
172+
<param name="robot_description"
173+
command="$(find xacro)/xacro --inorder '$(find vtec_s3_description)/robots/$(arg mode).xacro' debug:=$(arg debug) namespace:=$(arg namespace7)" />
174+
175+
<!-- Run a python script to the send a service call to gazebo_ros to spawn a URDF robot -->
176+
<node name="urdf_spawner" pkg="gazebo_ros" type="spawn_model" respawn="false" output="screen"
177+
args="-urdf -x $(arg x7) -y $(arg y7) -z $(arg z7) -R $(arg roll7) -P $(arg pitch7) -Y $(arg yaw7) -model $(arg namespace7) -param /$(arg namespace7)/robot_description"/>
178+
179+
<!-- A joint state publisher plugin already is started with the model, no need to use the default joint state publisher -->
180+
181+
<!-- Publish robot model for ROS -->
182+
<node name="robot_state_publisher" pkg="robot_state_publisher" type="robot_state_publisher" respawn="true" output="screen">
183+
<param name="robot_description" value="/$(arg namespace7)/robot_description" />
184+
</node>
185+
</group>
186+
187+
</launch>

vtec_s3_description/launch/upload.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@
4343
<arg name="namespace" value="$(arg namespace)"/>
4444
</include> -->
4545
<!-- Enable camera gazebo plugin-->
46-
<include file="$(find realsense_gazebo_plugin)/launch/depth_proc.launch">
47-
</include>
46+
<!--<include file="$(find realsense_gazebo_plugin)/launch/depth_proc.launch">
47+
</include>-->
4848
<!-- check if you are simulating robot with gazebo -->
4949
<arg name="gazebo" default="false" />
5050
<group unless="$(arg gazebo)">

vtec_s3_description/urdf/sensors.xacro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646
</VLP-16>
4747

4848
<!-- Realsense R200 -->
49-
<xacro:realsense_camera namespace="${namespace}" parent_link="${namespace}/base_link" suffix="">
49+
<!--<xacro:realsense_camera namespace="${namespace}" parent_link="${namespace}/base_link" suffix="">
5050
<origin xyz="0.52 0 0.22" rpy="0 0 0"/>
51-
</xacro:realsense_camera>
51+
</xacro:realsense_camera>-->
5252

5353
<!-- Mount a camera -->
5454
<!-- <xacro:default_camera namespace="${namespace}" parent_link="${namespace}/base_link" suffix="">

0 commit comments

Comments
 (0)