Include Multiple Light Sources in .world file

asked 2014-07-10 16:14:45 -0500

K. Zeng gravatar image

Right now, I'm trying to edit a world file so that it includes several light sources upon launch. I based my custom light source on the Sun model's SDF file minus the <pose> tags. This is what my .world file looks like:

<?xml version="1.0" ?>
<sdf version="1.4">
  <world name="default">
    <!-- Light sources -->
    <include>
      <uri>model://odg_light_source</uri>
      <name>odg_light_source</name>
      <pose>0.8 -2 5 0 0 0</pose>
    </include>
    <include>
      <uri>model://odg_light_source</uri>
      <name>odg_light_source_0</name>
      <pose>1 -4 5 0 0 0</pose>
    </include>
    <!-- A ground plane -->
    <include>
      <uri>model://ground_plane</uri>
    </include>
  </world>
</sdf>

Even though I specified the pose to spawn in and different names for each light source, the .world file only spawns 1 light source at (0, 0, 0) upon launch. Is there a way to fix these two issues (can only spawn 1 light at only at the origin)? Any help would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

What version of gazebo are you using? We have fixed some bugs related to lights recently in the latest version of gazebo.

scpeters gravatar imagescpeters ( 2014-07-10 20:05:34 -0500 )edit

Gazebo 2.22 in conjunction with ROS Indigo.

K. Zeng gravatar imageK. Zeng ( 2014-07-11 12:38:36 -0500 )edit