1 | initial version |
Hi,
try adding this to the world file, not to the robot:
<?xml version="1.0"?>
<gazebo version="1.0">
<world name="default">
...
<light type="directional" name="my_light" cast_shadows="false">
<origin pose="0 0 30 0 0 0"/>
<diffuse rgba=".9 .9 .9 1"/>
<specular rgba=".1 .1 .1 1"/>
<attenuation range="20"/>
<direction xyz="0 0 -1"/>
</light>
...
</world>
</gazebo>
I would also suggest that you switch to a newer version of gazebo ( v1.3 which comes with groovy or installing v1.5 from source), that way you could get more help in future problems, because I don't think version 1.0 is used by a lot of people.
Cheers, Andrei
2 | No.2 Revision |
Hi,
try adding this to the world file, not to the robot:
<?xml version="1.0"?>
<gazebo version="1.0">
<world name="default">
...
<light type="directional" name="my_light" cast_shadows="false">
<origin pose="0 0 30 0 0 0"/>
<diffuse rgba=".9 .9 .9 1"/>
<specular rgba=".1 .1 .1 1"/>
<attenuation range="20"/>
<direction xyz="0 0 -1"/>
</light>
...
</world>
</gazebo>
I would also suggest that you switch to a newer version of gazebo ( v1.3 which comes with groovy or installing v1.5 from source), that way you could get more help in future problems, because I don't think version 1.0 is used by a lot of people.
!!!UPDATE!!!
If you are going to switch to groovy you could add light sources the following way:
Add to the .world file:
<?xml version="1.0" ?>
<sdf version="1.3">
<world name="my_world">
...
<!--the light source created in the world file-->
<light type="directional" name="my_light">
<pose>0 0 30 0 0 0</pose>
<diffuse>.9 .9 .9 1</diffuse>
<specular>.1 .1 .1 1</specular>
<attenuation>
<range>20</range>
</attenuation>
<direction>0 0 -1</direction>
<cast_shadows>true</cast_shadows>
</light>
...
<!-- OR import the light source from an external sdf model -->
<!-- you should find the 'sun' models in ~./gazebo folder -->
<include>
<uri>model://sun</uri>
<pose>0.3 0.2 5.0 0 0 0</pose>
</include>
...
</world>
</sdf>
Cheers, Andrei