forest_navigating_uav/worldgen/templates/world_base.sdf
 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
<?sdf version="1.0" ?>
<sdf version="1.8">
  <world name="{world_name}">
    <physics name="1ms" type="ignored">
      <max_step_size>{max_step_size}</max_step_size>
      <real_time_factor>{real_time_factor}</real_time_factor>
    </physics>

    <plugin filename="gz-sim-physics-system"
            name="gz::sim::systems::Physics" />

    <plugin filename="gz-sim-user-commands-system"
            name="gz::sim::systems::UserCommands" />

    <plugin filename="gz-sim-scene-broadcaster-system"
            name="gz::sim::systems::SceneBroadcaster" />
    
    <!-- Despite the obvious above, adding sensor support-->
    <plugin filename="gz-sim-sensors-system"
            name="gz::sim::systems::Sensors">
      <render_engine>ogre2</render_engine>
    </plugin>

    <light type="directional" name="sun">
      <cast_shadows>{cast_shadows}</cast_shadows>
      <pose>{light_pose}</pose>
      <diffuse>{light_diffuse}</diffuse>
      <specular>{light_specular}</specular>
      <attenuation>
        <range>{light_range}</range>
        <constant>{light_constant}</constant>
        <linear>{light_linear}</linear>
        <quadratic>{light_quadratic}</quadratic>
      </attenuation>
      <direction>{light_direction}</direction>
    </light>

    <!-- Ground plane scaled to world size -->
    <model name="ground_plane">
      <static>true</static>
      <link name="link">
        <collision name="collision">
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>{ground_size} {ground_size}</size>
            </plane>
          </geometry>
        </collision>
        <visual name="visual">
          <geometry>
            <plane>
              <normal>0 0 1</normal>
              <size>{ground_size} {ground_size}</size>
            </plane>
          </geometry>
          <material>
            <ambient>0.3 0.5 0.3 1</ambient>
            <diffuse>0.3 0.5 0.3 1</diffuse>
            <specular>0 0 0 1</specular>
          </material>
        </visual>
      </link>
    </model>

  <!-- Randomly generated includes -->
{include_blocks}

  </world>
</sdf>