Addiing light models in ros-fuerte
I was working for sometime in electric and I used the following light.urdf to spawn the model of light in gazebo.
<?xml version="1.0" ?>
<robot name="light_livingroom" xmlns:xi="http://www.w3.org/2001/XInclude"
<link name="bulb_livingroom">
<inertial>
<mass value="1" />
<com xyz="7.6 4.2 1.5" />
<inertia ixx="1" ixy="0.0" ixz="0.0" iyy="1" iyz="0.0" izz="1" />
</inertial>
<visual>
<origin xyz="7.6 4.2 1.5" rpy="0 0 0" /> <!-- definition of the visual postion of the object!! -->
<geometry>
<sphere radius="0.0001" />
</geometry>
</visual>
<collision>
<origin xyz="7.6 4.2 1.5" rpy="0 0 0" />
<geometry>
<sphere radius="0.0001" />
</geometry>
</collision>
</link>
<gazebo reference="bulb_livingroom">
<model:renderable name="light_livingroom">
<xyz>7.6 4.2 1.5</xyz>
<static>true</static>
<light>
<type>point</type>
<diffuseColor>0.1 0.1 0.1</diffuseColor>
<specularColor>.01 .01 .01</specularColor>
<attenuation>0.1 0.1 0.0001</attenuation>
<range>4</range>
</light>
</model:renderable>
</gazebo>
</robot>
When I try to spawn the same file in gazebo fuerte. The bulb model seens to oscillate under the ground. I tried replacing the content replacing model content with this
<gazebo reference="bulb_livingroom">
<light type="directional" name="light_livingroom" cast_shadows="false">
<origin pose="7.6 4.2 1.5 0 0 0"/>
<diffuse rgba=".9 .9 .9 1"/>
<specular rgba=".1 .1 .1 1"/>
<attenuation range="20"/>
<direction xyz="0 0 -1"/>
</light>
</gazebo>
Now, the bulb goes to (7.6, 4.2, 1.5) but no light comes out. Is my code wrong ? and is there a way to spawn custom light models in gazebo-fuerte ? Could someone give me a sample snippet if possible ?
Thanks.
With what gazebo version are you working?
I am using ros-fuerte. I guess it is gazebo 1.0.2. I see a folder named gazebo-1.0.2 inside gazebo/gazebo/share.