<?xml version="1.0" encoding="UTF-8" ?>
<sdf version='1.6'>
  <world name='default'>
    <include>
      <uri>model://ground_plane</uri>
    </include>
    <model name='light_model'>
      <static>1</static>
      <link name='cylinder'>
        <pose frame=''>0 0 0.25 0 -0 0</pose>
        <collision name='collision'>
          <geometry>
            <cylinder>
              <radius>0.25</radius>
              <length>0.5</length>
            </cylinder>
          </geometry>
        </collision>
        <visual name='visual'>
          <geometry>
            <cylinder>
              <radius>0.25</radius>
              <length>0.5</length>
            </cylinder>
          </geometry>
        </visual>
        <light name='light_source1' type='spot'>
          <pose frame=''>0.25 0 0.25 0 -0.7854 0</pose>
          <attenuation>
            <range>30</range>
            <linear>0.05</linear>
          </attenuation>
          <diffuse>1 0 0 1</diffuse>
          <specular>1 0 0 1</specular>
          <spot>
            <inner_angle>0.3</inner_angle>
            <outer_angle>0.35</outer_angle>
            <falloff>1</falloff>
          </spot>
          <direction>0 0 -1</direction>
        </light>
        <light name='light_source2' type='spot'>
          <pose frame=''>-0.25 0 0.25 0 0.7854 0</pose>
          <attenuation>
            <range>30</range>
            <linear>0.05</linear>
          </attenuation>
          <diffuse>0 1 0 1</diffuse>
          <specular>0 1 0 1</specular>
          <spot>
            <inner_angle>0.3</inner_angle>
            <outer_angle>0.35</outer_angle>
            <falloff>1</falloff>
          </spot>
          <direction>0 0 -1</direction>
        </light>
      </link>
      <link name='box'>
        <pose frame=''>0 0 0.75 0 -0 0</pose>
        <collision name='collision'>
          <geometry>
            <box>
              <size>0.5 0.5 0.5</size>
            </box>
          </geometry>
        </collision>
        <visual name='visual'>
          <geometry>
            <box>
              <size>0.5 0.5 0.5</size>
            </box>
          </geometry>
        </visual>
        <light name='light_source3' type='spot'>
          <pose frame=''>0 0.25 0.25 0.7854 -0 0</pose>
          <attenuation>
            <range>30</range>
            <linear>0.05</linear>
          </attenuation>
          <diffuse>0 0 1 1</diffuse>
          <specular>0 0 1 1</specular>
          <spot>
            <inner_angle>0.3</inner_angle>
            <outer_angle>0.35</outer_angle>
            <falloff>1</falloff>
          </spot>
          <direction>0 0 -1</direction>
        </light>
        <light name='light_source4' type='spot'>
          <pose frame=''>0 -0.25 0.25 -0.7854 0 0</pose>
          <attenuation>
            <range>30</range>
            <linear>0.05</linear>
          </attenuation>
          <diffuse>1 1 0 1</diffuse>
          <specular>1 1 0 1</specular>
          <spot>
            <inner_angle>0.3</inner_angle>
            <outer_angle>0.35</outer_angle>
            <falloff>1</falloff>
          </spot>
          <direction>0 0 -1</direction>
        </light>
      </link>
      <joint name='joint' type='fixed'>
        <parent>cylinder</parent>
        <child>box</child>
      </joint>
      <plugin name='light_control' filename='libFlashLightPlugin.so'>
        <enable>true</enable>
        <light>
          <id>cylinder/light_source1</id>
          <duration>0.1</duration>
          <interval>0.4</interval>
        </light>
        <light>
          <id>cylinder/light_source2</id>
          <duration>0.05</duration>
          <interval>0.05</interval>
          <color>0.5 1 0.8</color>
        </light>
        <light>
          <id>box/light_source3</id>
          <duration>1.0</duration>
          <interval>0.1</interval>
          <enable>false</enable>
        </light>
        <light>
          <id>box/light_source4</id>
          <block>
            <duration>0.5</duration>
            <interval>0.0</interval>
            <color>1 1 0</color>
          </block>
          <block>
            <duration>0.5</duration>
            <interval>0.0</interval>
            <color>0 1 1</color>
          </block>
          <block>
            <duration>0.5</duration>
            <interval>0.0</interval>
            <color>1 0 1</color>
          </block>
          <enable>true</enable>
        </light>
      </plugin>
    </model>
  </world>
</sdf>
