.. _alfacetracker-api: ALFaceTracker API ================= :ref:`Overview` | :ref:`alredballtracker-api` | ALFaceTracker API | :ref:`trackers-sample` Method list ----------- .. cpp:class:: ALFaceTrackerProxy * Methods: * :cpp:func:`ALFaceTrackerProxy::getPosition` * :cpp:func:`ALFaceTrackerProxy::isActive` * :cpp:func:`ALFaceTrackerProxy::isNewData` * :cpp:func:`ALFaceTrackerProxy::setWholeBodyOn` * :cpp:func:`ALFaceTrackerProxy::startTracker` * :cpp:func:`ALFaceTrackerProxy::stopTracker` .. seealso:: * :ref:`Methods inherited from ALModule ` Methods ------- .. cpp:function:: std::vector ALFaceTrackerProxy::getPosition() Returns the [x, y, z] position of the face in SPACE_TORSO. This is done assuming an average face size, so it might not be very accurate. This invalidates the isNewData field of the tracker. See :cpp:func:`ALFaceTrackerProxy::isNewData` for more details. :return: An Array containing the face position [x, y, z]. .. cpp:function:: bool ALFaceTrackerProxy::isActive() Return true if the face Tracker is running. :return: true if the face Tracker is running. .. cpp:function:: bool ALFaceTrackerProxy::isNewData() Return true if a new face was detected since the last getPosition(). :return: true if a new face was detected since the last getPosition(). .. cpp:function:: void ALFaceTrackerProxy::setWholeBodyOn(const bool& pWholeBodyOn) if true, the tracking will be through a Whole Body Process. :param pWholeBodyOn: The whole Body state .. cpp:function:: void ALFaceTrackerProxy::startTracker() Start the tracker by Subscribing to Event FaceDetected from :ref:`alfacedetection` module. Then Wait Event FaceDetected from ALFaceDetection module. And finally send information to motion for head tracking. NOTE : Stiffness of Head must be set to 1.0 to move! .. cpp:function:: void ALFaceTrackerProxy::stopTracker() Stop the tracker by Unsubscribing to Event FaceDetected from ALFaceDetection module.