Mocap controller ================ **Controller for the motion of the human avatar, using the ASUS Xtion** Read the positions of the different joints at: head, neck, shoulders, torso, elbows, hands, hips, knees and feet And apply those positions to the control points (Empty's) of the armature .. cssclass:: properties morse-section Configuration parameters for Mocap controller --------------------------------------------- *No configurable parameter.* .. cssclass:: fields morse-section Data fields ----------- This actuator reads these datafields at each simulation step: - ``head_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Head position - ``neck_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Neck position - ``left_hand_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Left Hand position - ``right_hand_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Right Hand position - ``left_elbow_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Left elbow position - ``right_elbow_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Right elbow position - ``left_shoulder_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Left shoulder position - ``right_shoulder_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Right shoulder position - ``left_hip_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Left hip position - ``right_hip_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Right hip position - ``left_foot_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Left foot position - ``right_foot_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) Right foot position - ``torso_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) torso position - ``left_knee_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) left knee position - ``right_knee_position`` (vec3, initial value: ``[0.0, 0.0, 0.0]``) right knee position *Interface support:* - :tag:`pocolibs` as `NIUT_HUMAN_LIST `_ (:py:mod:`morse.middleware.pocolibs.actuators.niut.NiutPoster`) .. cssclass:: services morse-section Services for Mocap controller ----------------------------- - ``get_properties()`` (blocking) Returns the properties of a component. - Return value a dictionary of the current component's properties - ``set_property(prop_name, prop_val)`` (blocking) Modify one property on a component - Parameters - ``prop_name``: the name of the property to modify (as shown the documentation) - ``prop_val``: the new value of the property. Note that there is no checking about the type of the value so be careful - Return value nothing - ``get_configurations()`` (blocking) Returns the configurations of a component (parsed from the properties). - Return value a dictionary of the current component's configurations .. 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 * # adds a default robot (the MORSE mascott!) robot = Morsy() # creates a new instance of the actuator mocapcontrol = MocapControl() # place your component at the correct location mocapcontrol.translate(, , ) mocapcontrol.rotate(, , ) robot.append(mocapcontrol) # define one or several communication interface, like 'socket' mocapcontrol.add_interface() env = Environment('empty') .. cssclass:: files morse-section Other sources of examples +++++++++++++++++++++++++ - `Source code <../../_modules/morse/actuators/mocap_control.html>`_ - `Unit-test <../../_modules/base/mocap_control_testing.html>`_ *(This page has been auto-generated from MORSE module morse.actuators.mocap_control.)*