Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You need to put a light inside your world, as @chapulina told.

Please try to insert a custom light inside your world, like this one:

<light type="spot" name="test_light">
    <pose>0 0 0 0 0 0</pose>
    <diffuse>1 1 1 0.5</diffuse>
    <specular>.1 .1 .1 1</specular>
    <attenuation>
        <range>10</range>
        <linear>0.5</linear>
        <constant>0.8</constant>
        <quadratic>0.01</quadratic>
    </attenuation>
    <cast_shadows>true</cast_shadows>
</light>

After this, try using the gazebo tag inside your robot (you missed the gazebo tag):

<gazebo>
    <plugin name="attach_light" filename="libAttachLightPlugin.so">
        <link>
            <link_name>${namespace}/light${suffix}_link</link_name>
            <light>
                <pose>${light_pose}</pose>
                <light_name>${light_name}</light_name>
            </light>
        </link>
    </plugin>
</gazebo>

That worked fine by me. Note that I was succeeded only after I updated Gazebo to the 7.14 version.