Human Posture (kinect version)
==============================


This sensor collects the positions of the bones in the human armature
for the file ``$MORSE_ROOT/data/robots/mocap_human.blend``.

It stores the position and orientation of the general armature
object, as well as the local rotation of each individual bone. The
rotation angles are given in radians. It exports the same interface than the
:doc:`human posture sensor <../sensors/human_posture>`, but some
joints are not reflected by the Kinect, and so they stay to their
initial values.

This sensor will only work for the ``mocap_human.blend`` model, as it
uses a specific naming convention for each of the bones.

You can also check to general documentation of the :doc:`human
component <../others/human>`.

.. image:: ../../../media/human_joints.png
  :align: center
  :width: 600


.. cssclass:: properties morse-section

Configuration parameters for human posture (kinect version)
-----------------------------------------------------------

*No configurable parameter.*

.. cssclass:: fields morse-section

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


This sensor exports these datafields at each simulation step:

- ``timestamp`` (float, initial value: ``0.0``)
	number of milliseconds in simulated time
- ``x`` (float, initial value: ``0.0``)
	global X position of the armature in the scene, in meter
- ``y`` (float, initial value: ``0.0``)
	global Y position of the armature in the scene, in meter
- ``z`` (float, initial value: ``0.0``)
	global Z position of the armature in the scene, in meter
- ``yaw`` (float, initial value: ``0.0``)
	rotation angle with respect to the Z axis, in radian
- ``pitch`` (float, initial value: ``0.0``)
	rotation angle with respect to the Z axis, in radian
- ``roll`` (float, initial value: ``0.0``)
	rotation angle with respect to the Z axis, in radian
- ``empty1`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``empty2`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``empty3`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``empty4`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``empty5`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``empty6`` (float, initial value: ``0.0``)
	(no documentation available yet)
- ``dof_12`` (float, initial value: ``0.0``)
	rotation around the X axis for the torso, in radian
- ``dof_13`` (float, initial value: ``0.0``)
	rotation around the Y axis for the torso, in radian
- ``dof_14`` (float, initial value: ``0.0``)
	rotation around the Z axis for the torso, in radian
- ``dof_15`` (float, initial value: ``0.0``)
	rotation around the Z axis for the head, in radian
- ``dof_16`` (float, initial value: ``0.0``)
	rotation around the Y axis for the head, in radian
- ``dof_17`` (float, initial value: ``0.0``)
	rotation around the X axis for the head, in radian
- ``dof_18`` (float, initial value: ``0.0``)
	rotation around the X axis for the right shoulder, in radian
- ``dof_19`` (float, initial value: ``0.0``)
	rotation around the Y axis for the right shoulder, in radian
- ``dof_20`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right shoulder, in radian
- ``dof_21`` (float, initial value: ``0.0``)
	elongation of the right arm, in meter (not computed)
- ``dof_22`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right elbow, in radian
- ``dof_23`` (float, initial value: ``0.0``)
	R_POINT (not computed)
- ``dof_24`` (float, initial value: ``0.0``)
	rotation around the X axis for the right wrist, in radian               (not computed)
- ``dof_25`` (float, initial value: ``0.0``)
	rotation around the Y axis for the right wrist, in radian               (not computed)
- ``dof_26`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right write, in radian               (not computed
- ``dof_27`` (float, initial value: ``0.0``)
	rotation around the X axis for the left shoulder, in radian
- ``dof_28`` (float, initial value: ``0.0``)
	rotation around the Y axis for the left shoulder, in radian
- ``dof_29`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left shoulder, in radian
- ``dof_30`` (float, initial value: ``0.0``)
	elongation of the left arm, in meter (not computed)
- ``dof_31`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left elbow, in radian
- ``dof_32`` (float, initial value: ``0.0``)
	L_POINT (not computed)
- ``dof_33`` (float, initial value: ``0.0``)
	rotation around the X axis for the left wrist, in radian              (not computed)
- ``dof_34`` (float, initial value: ``0.0``)
	rotation around the Y axis for the left wrist, in radian             (not computed)
- ``dof_35`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left wrist, in radian              (not computed)
- ``dof_36`` (float, initial value: ``0.0``)
	rotation around the X axis for the right hip, in radian
- ``dof_37`` (float, initial value: ``0.0``)
	rotation around the Y axis for the right hip, in radian
- ``dof_38`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right hip, in radian
- ``dof_39`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right knee, in radian
- ``dof_40`` (float, initial value: ``0.0``)
	rotation around the X axis for the right ankle, in radian              (not computed)
- ``dof_41`` (float, initial value: ``0.0``)
	rotation around the Y axis for the right ankle, in radian              (not computed)
- ``dof_42`` (float, initial value: ``0.0``)
	rotation around the Z axis for the right ankle, in radian              (not compued)
- ``dof_43`` (float, initial value: ``0.0``)
	rotation around the X axis for the left hip, in radian
- ``dof_44`` (float, initial value: ``0.0``)
	rotation around the Y axis for the left hip, in radian
- ``dof_45`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left hip, in radian
- ``dof_46`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left knee, in radian
- ``dof_47`` (float, initial value: ``0.0``)
	rotation around the X axis for the left ankle, in radian               (not computed)
- ``dof_48`` (float, initial value: ``0.0``)
	rotation around the Y axis for the left ankle, in radian               (not computed)
- ``dof_49`` (float, initial value: ``0.0``)
	rotation around the Z axis for the left ankle, in radian               (not computed)

*Interface support:*

(attention, no interface support!)

.. cssclass:: services morse-section

Services for Human Posture (kinect version)
-------------------------------------------

- ``get_properties()`` (blocking)
    Returns the properties of a component.
    
    
  - Return value

    a dictionary of the current component's properties  

- ``get_configurations()`` (blocking)
    Returns the configurations of a component (parsed from the properties).
    
    
  - Return value

    a dictionary of the current component's configurations  

- ``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 examples show 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
    humanposture = HumanPosture()

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

    env = Environment('empty')
    

.. cssclass:: files morse-section

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

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




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