ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Need spooky lighting in gazebo

asked 2011-07-19 09:56:28 -0500

andrew-unit gravatar image

updated 2011-07-19 10:15:19 -0500

Hello, I'm trying to make a spooky scene in gazebo, but I can't figure out how to add spot lights in gazebo world files. I can't seem to find a good example. I see some old examples from, for example, , but all of the spot light examples are commented out. I'm trying to build a spot light that is about 3 meters off the ground and ends up casting a cone of light that is about 1 meter or less in diameter on the floor. Any suggestions would be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-09-07 05:46:28 -0500

nkoenig gravatar image

If you are using the unstable version of gazebo:

<light type="spot" name="spot" cast_shadows="false">
  <origin pose="0 0 3 0 0 0"/>
  <diffuse rgba="0 1 0 1"/>
  <specular rgba=".2 .2 .2 1"/>
  <attenuation range="10" constant="0.2" linear="0.01" quadratic="0.0"/>
  <direction xyz="0 0 -1"/>
  <spot inner_angle="0.1" outer_angle="0.5" falloff="1.2"/>

if you are using Diamondback or Electric:

<model:renderable name="spot">
  <xyz>0.0 0 3</xyz>

    <direction>0 0 -1</direction>
    <diffuseColor>0.0 0.0 1.0</diffuseColor>
    <specularColor>0.0 0.0 0.1</specularColor>
    <attenuation>.1 0.0 0.0</attenuation>
    <spotCone>8.0 10.0 2.0</spotCone> 
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-07-19 09:56:28 -0500

Seen: 673 times

Last updated: Sep 07 '11