Light
=====


**A simple point light**


This actuator is a simple On/Off light. Based on `SPOT
<http://wiki.blender.org/index.php/Doc:2.6/Manual/Lighting/Lamps/Spot>`_ light.

Properties
----------

-  Emit in +X
-  Spot size = 90°
-  Distance = 10m
-  Energy: On = 1.0; Off = 0.0



.. cssclass:: properties morse-section

Configuration parameters for light
----------------------------------

*No configurable parameter.*

.. cssclass:: fields morse-section

Data fields
-----------


This actuator reads these datafields at each simulation step:

- ``emit`` (bool, initial value: ``True``)
	On/Off light switch

*Interface support:*

- :tag:`yarp`  as yarp::Bottle (:py:mod:`morse.middleware.yarp_datastream.YarpReader`)
- :tag:`ros`  as BoolReader (:py:mod:`morse.middleware.ros.light.BoolReader`)
- :tag:`socket`  as straight JSON deserialization (:py:mod:`morse.middleware.socket_datastream.SocketReader`)


.. cssclass:: services morse-section

Services for Light
------------------

*This component does not expose any service.*

.. cssclass:: examples morse-section

Examples
--------


The following example shows how to use this component in a *Builder* script:

.. code-block:: python


    from morse.builder import *

    robot = ATRV()

    # creates a new instance of the actuator
    light = Light()

    # place your component at the correct location
    light.translate(<x>, <y>, <z>)
    light.rotate(<rx>, <ry>, <rz>)
    
    robot.append(light)

    # define one or several communication interface, like 'socket'
    light.add_interface(<interface>)

    env = Environment('empty')
    

.. cssclass:: files morse-section

Other sources of examples
+++++++++++++++++++++++++

- `Source code <../../_modules/morse/actuators/light.html>`_
- `Unit-test <../../_modules/base/light_testing.html>`_




*(This page has been auto-generated from MORSE module morse.actuators.light.)*
