Skip to content

Commit ed11223

Browse files
committed
Gazebo: update rover playpen model and add example world
1. Make some models static - Do not force the fire-hydrant model to be static - Make all items in the rover playpen model static to improve performance - Add rover playpen world (no robot models as these are to be dynamically spawned in) 2. Add ENU axes and modify mode pose - Correct pose to account for difference between Gazebo ENU and ArduPilot NED frames - Add axes to aid orienting model and robots 3. Migration from Ignition to Gazebo. Signed-off-by: Rhys Mainwaring <[email protected]>
1 parent d97e2e9 commit ed11223

File tree

4 files changed

+127
-28
lines changed

4 files changed

+127
-28
lines changed

Gazebo/models/fire_hydrant/model.sdf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?xml version="1.0" ?>
22
<sdf version="1.5">
33
<model name="fire_hydrant">
4-
<static>true</static>
54
<link name="link">
65
<collision name="body_collision">
76
<pose>0 0 0.45 0 0 0</pose>

Gazebo/models/rover_playpen/model.sdf

Lines changed: 33 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -188,69 +188,79 @@
188188
<include>
189189
<!-- <uri>https://fuel.gazebosim.org/1.0/OpenRobotics/models/Construction Barrel</uri> -->
190190
<uri>model://construction_barrel</uri>
191-
<name>Construction Barrel</name>
192-
<pose>-5.8477 6.65935 0 0 -0 0</pose>
191+
<name>construction barrel</name>
192+
<static>1</static>
193+
<pose>-5.8477 6.65935 0 0 0 0</pose>
193194
</include>
194-
195195

196196
<include>
197197
<uri>model://construction_barrel</uri>
198-
<name>Construction Barrel_0</name>
199-
<pose>-4.77864 6.69017 0 0 -0 0</pose>
198+
<name>construction barrel 1</name>
199+
<static>1</static>
200+
<pose>-4.77864 6.69017 0 0 0 0</pose>
200201
</include>
201202

202203
<include>
203204
<uri>model://construction_barrel</uri>
204-
<name>Construction Barrel_1</name>
205-
<pose>-3.70543 6.70547 0 0 -0 0</pose>
205+
<name>construction barrel 2</name>
206+
<static>1</static>
207+
<pose>-3.70543 6.70547 0 0 0 0</pose>
206208
</include>
207209

208210
<include>
209211
<uri>model://construction_barrel</uri>
210-
<name>Construction Barrel_2</name>
211-
<pose>-2.64657 6.70111 0 0 -0 0</pose>
212+
<name>construction barrel 3</name>
213+
<static>1</static>
214+
<pose>-2.64657 6.70111 0 0 0 0</pose>
212215
</include>
213216

214217
<include>
215218
<uri>model://construction_barrel</uri>
216-
<name>Construction Barrel_3</name>
217-
<pose>-5.85728 5.61427 0 0 -0 0</pose>
219+
<name>construction barrel 4</name>
220+
<static>1</static>
221+
<pose>-5.85728 5.61427 0 0 0 0</pose>
218222
</include>
219223

220224
<include>
221225
<uri>model://construction_barrel</uri>
222-
<name>Construction Barrel_4</name>
223-
<pose>-5.85482 4.59002 0 0 -0 0</pose>
226+
<name>construction barrel 5</name>
227+
<static>1</static>
228+
<pose>-5.85482 4.59002 0 0 0 0</pose>
224229
</include>
225230

226231
<include>
227232
<uri>model://construction_barrel</uri>
228-
<name>Construction Barrel_5</name>
229-
<pose>-5.83657 3.55284 0 0 -0 0</pose>
233+
<name>construction barrel 6</name>
234+
<static>1</static>
235+
<pose>-5.83657 3.55284 0 0 0 0</pose>
230236
</include>
231237

232238
<include>
233239
<uri>model://construction_barrel</uri>
234-
<name>Construction Barrel_6</name>
235-
<pose>6.61681 -1.82026 0 0 -0 0</pose>
240+
<name>construction barrel 7</name>
241+
<static>1</static>
242+
<pose>6.61681 -1.82026 0 0 0 0</pose>
236243
</include>
237244

238245
<include>
239246
<uri>model://construction_barrel</uri>
240-
<name>Construction Barrel_7</name>
241-
<pose>4.21069 -6.40863 0 0 -0 0</pose>
247+
<name>construction barrel 8</name>
248+
<static>1</static>
249+
<pose>4.21069 -6.40863 0 0 0 0</pose>
242250
</include>
243251

244252
<include>
245253
<uri>model://construction_barrel</uri>
246-
<name>Construction Barrel_8</name>
247-
<pose>-4.76366 -6.5527 0 0 -0 0</pose>
254+
<name>construction barrel 9</name>
255+
<static>1</static>
256+
<pose>-4.76366 -6.5527 0 0 0 0</pose>
248257
</include>
249258

250259
<include>
251260
<uri>model://construction_barrel</uri>
252-
<name>Construction Barrel_9</name>
253-
<pose>6.33891 4.79707 0 0 -0 0</pose>
261+
<name>construction barrel 10</name>
262+
<static>1</static>
263+
<pose>6.33891 4.79707 0 0 0 0</pose>
254264
</include>
255265

256266
</model>

Gazebo/worlds/rover_playpen.sdf

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
<?xml version="1.0" ?>
2+
<sdf version="1.6">
3+
<world name="rover_playpen">
4+
<plugin filename="gz-sim-physics-system"
5+
name="gz::sim::systems::Physics">
6+
</plugin>
7+
<plugin filename="gz-sim-sensors-system"
8+
name="gz::sim::systems::Sensors">
9+
<render_engine>ogre2</render_engine>
10+
</plugin>
11+
<plugin filename="gz-sim-scene-broadcaster-system"
12+
name="gz::sim::systems::SceneBroadcaster">
13+
</plugin>
14+
<plugin filename="gz-sim-user-commands-system"
15+
name="gz::sim::systems::UserCommands">
16+
</plugin>
17+
<plugin filename="gz-sim-imu-system"
18+
name="gz::sim::systems::Imu">
19+
</plugin>
20+
21+
<scene>
22+
<ambient>1.0 1.0 1.0</ambient>
23+
<background>0.8 0.8 0.8</background>
24+
<sky></sky>
25+
</scene>
26+
27+
<light type="directional" name="sun">
28+
<cast_shadows>true</cast_shadows>
29+
<pose>0 0 10 0 0 0</pose>
30+
<diffuse>0.8 0.8 0.8 1</diffuse>
31+
<specular>0.6 0.6 0.6 1</specular>
32+
<direction>-0.5 0.1 -0.9</direction>
33+
</light>
34+
35+
<!-- ENU axes -->
36+
<model name="axes">
37+
<static>1</static>
38+
<link name="link">
39+
<visual name="r">
40+
<pose>5 0 0.1 0 0 0</pose>
41+
<geometry>
42+
<box>
43+
<size>10 0.01 0.01</size>
44+
</box>
45+
</geometry>
46+
<material>
47+
<ambient>1 0 0 1</ambient>
48+
<diffuse>1 0 0 1</diffuse>
49+
<emissive>1 0 0 1</emissive>
50+
<specular>0.5 0.5 0.5 1</specular>
51+
</material>
52+
</visual>
53+
<visual name="g">
54+
<pose>0 5 0.1 0 0 0</pose>
55+
<geometry>
56+
<box>
57+
<size>0.01 10 0.01</size>
58+
</box>
59+
</geometry>
60+
<material>
61+
<ambient>0 1 0 1</ambient>
62+
<diffuse>0 1 0 1</diffuse>
63+
<emissive>0 1 0 1</emissive>
64+
<specular>0.5 0.5 0.5 1</specular>
65+
</material>
66+
</visual>
67+
<visual name="b">
68+
<pose>0 0 5.1 0 0 0</pose>
69+
<geometry>
70+
<box>
71+
<size>0.01 0.01 10</size>
72+
</box>
73+
</geometry>
74+
<material>
75+
<ambient>0 0 1 1</ambient>
76+
<diffuse>0 0 1 1</diffuse>
77+
<emissive>0 0 1 1</emissive>
78+
<specular>0.5 0.5 0.5 1</specular>
79+
</material>
80+
</visual>
81+
</link>
82+
</model>
83+
84+
<include>
85+
<pose>0 0 0 0 0 1.570796</pose>
86+
<uri>model://rover_playpen</uri>
87+
</include>
88+
89+
</world>
90+
</sdf>

Gazebo/worlds/wildthumper_playpen.sdf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
<?xml version="1.0" ?>
22
<sdf version="1.7">
33
<world name="wildthumper_playpen">
4-
<plugin filename="libgz-sim-physics-system.so"
4+
<plugin filename="gz-sim-physics-system"
55
name="gz::sim::systems::Physics">
66
</plugin>
7-
<plugin filename="libgz-sim-user-commands-system.so"
7+
<plugin filename="gz-sim-user-commands-system"
88
name="gz::sim::systems::UserCommands">
99
</plugin>
10-
<plugin filename="libgz-sim-scene-broadcaster-system.so"
10+
<plugin filename="gz-sim-scene-broadcaster-system"
1111
name="gz::sim::systems::SceneBroadcaster">
1212
</plugin>
13-
<plugin filename="libgz-sim-imu-system.so"
13+
<plugin filename="gz-sim-imu-system"
1414
name="gz::sim::systems::Imu">
1515
</plugin>
1616

0 commit comments

Comments
 (0)