23#ifndef _PLUGINS_OPENNI_USERTRACKER_THREAD_H_
24#define _PLUGINS_OPENNI_USERTRACKER_THREAD_H_
26#include "utils/version.h"
28#include <aspect/blackboard.h>
29#include <aspect/blocked_timing.h>
30#include <aspect/clock.h>
31#include <aspect/configurable.h>
32#include <aspect/logging.h>
33#include <core/threading/thread.h>
34#include <core/utils/lockptr.h>
35#include <plugins/openni/aspect/openni.h>
37#include <XnCppWrapper.h>
41class HumanSkeletonInterface;
42class HumanSkeletonProjectionInterface;
45class SharedMemoryImageBuffer;
66 void pose_start(XnUserID
id,
const char *pose_name);
67 void pose_end(XnUserID
id,
const char *pose_name);
88 typedef std::map<XnUserID, UserInfo> UserMap;
90 void update_user(XnUserID
id, UserInfo &user);
91 void update_com(XnUserID
id, UserInfo &user);
94 xn::UserGenerator * user_gen_;
95 xn::DepthGenerator *depth_gen_;
97 xn::SceneMetaData * scene_md_;
98 xn::SkeletonCapability *skelcap_;
100 XnCallbackHandle user_cb_handle_;
101#if XN_VERSION_GE(1, 3, 2, 0)
102 XnCallbackHandle pose_start_cb_handle_;
103 XnCallbackHandle pose_end_cb_handle_;
104 XnCallbackHandle calib_start_cb_handle_;
105 XnCallbackHandle calib_complete_cb_handle_;
107 XnCallbackHandle pose_cb_handle_;
108 XnCallbackHandle calib_cb_handle_;
111 char calib_pose_name_[32];
112 bool skel_need_calib_pose_;
117 size_t label_bufsize_;
OpenNI User Tracker Thread.
void calibration_end(XnUserID id, bool success)
Notify of calibration end.
virtual void init()
Initialize the thread.
void new_user(XnUserID id)
Notify of new user.
virtual ~OpenNiUserTrackerThread()
Destructor.
virtual void loop()
Code to execute in the thread.
void pose_end(XnUserID id, const char *pose_name)
Notify of pose detection end.
OpenNiUserTrackerThread()
Constructor.
void pose_start(XnUserID id, const char *pose_name)
Notify of detected pose.
virtual void run()
Stub to see name in backtrace for easier debugging.
void calibration_start(XnUserID id)
Notify of calibration start.
void lost_user(XnUserID id)
Notify of lost user.
virtual void finalize()
Finalize the thread.
Thread aspect to access to BlackBoard.
Thread aspect to use blocked timing.
Thread aspect that allows to obtain the current time from the clock.
Thread aspect to access configuration data.
HumanSkeletonInterface Fawkes BlackBoard Interface.
HumanSkeletonProjectionInterface Fawkes BlackBoard Interface.
Thread aspect to log output.
Thread aspect to get access to the OpenNI context.
Thread class encapsulation of pthreads.
Shared memory image buffer.
Fawkes library namespace.