Kinect
======


This sensor emulates the kinect output, ie both a depth image and an rgba image.


.. cssclass:: properties morse-section

Configuration parameters for kinect
-----------------------------------

*No configurable parameter.*

.. cssclass:: fields morse-section

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


This sensor exports these datafields at each simulation step:

- ``depth`` (memoryview, initial value: ``none``)
	See doc:`depth camera documentation <../sensors/depth_camera>`               for field **image**
- ``video`` (buffer, initial value: ``none``)
	See :doc:`video camera documentation <../sensors/video_camera>`               for field **image**

*Interface support:*

- :tag:`ros`  as XYZRGBPublisher (:py:mod:`morse.middleware.ros.kinect.XYZRGBPublisher`)


.. cssclass:: services morse-section

Services for Kinect
-------------------

- ``get_local_data()`` (blocking)
    Returns the current data stored in the sensor.
    
    
  - Return value

    a dictionary of the current sensor's data 



.. 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 sensor
    kinect = Kinect()

    # place your component at the correct location
    kinect.translate(<x>, <y>, <z>)
    kinect.rotate(<rx>, <ry>, <rz>)
    
    robot.append(%(var)s)
    
    # define one or several communication interface, like 'socket'
    kinect.add_interface(<interface>)

    env = Environment('empty')
    

.. cssclass:: files morse-section

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

- `Source code <../../_modules/morse/sensors/kinect.html>`_
- `Unit-test <../../_modules/base/kinect_testing.html>`_




*(This page has been auto-generated from MORSE module morse.sensors.kinect.)*
