Now you can download a copy of these docs so you can use them offline! Download now

#include <Kinect.h>

Inheritance diagram for Kinect:
Collaboration diagram for Kinect:

Classes

struct  Point4

Public Types

enum  SkeletonTrackingState { kNotTracked, kPositionOnly, kTracked }
enum  SkeletonQuality { kClippedRight = 1, kClippedLeft = 2, kClippedTop = 4, kClippedBottom = 8 }

Public Member Functions

int GetNumberOfPlayers ()
Point4 GetFloorClipPlane ()
Point4 GetGravityNormal ()
Skeleton GetSkeleton (int skeletonIndex=1)
Point4 GetPosition (int skeletonIndex=1)
UINT32 GetQuality (int skeletonIndex=1)
SkeletonTrackingState GetTrackingState (int skeletonIndex=1)
- Public Member Functions inherited from SensorBase
 SensorBase ()
virtual ~SensorBase ()
- Public Member Functions inherited from ErrorBase
virtual ErrorGetError ()
 Retrieve the current error. Get the current error information associated with this sensor.
virtual const ErrorGetError () const
virtual void SetErrnoError (const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable.
virtual void SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated from the nivision Imaq API.
virtual void SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated with this sensor.
virtual void SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const
 Set the current error information associated with this sensor.
virtual void CloneError (ErrorBase *rhs) const
virtual void ClearError () const
 Clear the current error information associated with this sensor.
virtual bool StatusIsFatal () const
 Check if the current error code represents a fatal error.

Static Public Member Functions

static KinectGetInstance ()
- Static Public Member Functions inherited from SensorBase
static void DeleteSingletons ()
static UINT32 GetDefaultAnalogModule ()
static UINT32 GetDefaultDigitalModule ()
static UINT32 GetDefaultSolenoidModule ()
static bool CheckAnalogModule (UINT8 moduleNumber)
static bool CheckDigitalModule (UINT8 moduleNumber)
static bool CheckPWMModule (UINT8 moduleNumber)
static bool CheckRelayModule (UINT8 moduleNumber)
static bool CheckSolenoidModule (UINT8 moduleNumber)
static bool CheckDigitalChannel (UINT32 channel)
static bool CheckRelayChannel (UINT32 channel)
static bool CheckPWMChannel (UINT32 channel)
static bool CheckAnalogChannel (UINT32 channel)
static bool CheckSolenoidChannel (UINT32 channel)
- Static Public Member Functions inherited from ErrorBase
static void SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber)
static void SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber)
static ErrorGetGlobalError ()

Additional Inherited Members

- Static Public Attributes inherited from SensorBase
static const UINT32 kSystemClockTicksPerMicrosecond = 40
static const UINT32 kDigitalChannels = 14
static const UINT32 kAnalogChannels = 8
static const UINT32 kAnalogModules = 2
static const UINT32 kDigitalModules = 2
static const UINT32 kSolenoidChannels = 8
static const UINT32 kSolenoidModules = 2
static const UINT32 kPwmChannels = 10
static const UINT32 kRelayChannels = 8
static const UINT32 kChassisSlots = 8
- Protected Member Functions inherited from SensorBase
void AddToSingletonList ()
- Protected Attributes inherited from ErrorBase
Error m_error
- Static Protected Attributes inherited from ErrorBase
static SEM_ID _globalErrorMutex = semMCreate(SEM_Q_PRIORITY | SEM_DELETE_SAFE | SEM_INVERSION_SAFE)
static Error _globalError

Detailed Description

Handles raw data input from the FRC Kinect Server when used with a Kinect device connected to the Driver Station. Each time a value is requested the most recent value is returned. See Getting Started with Microsoft Kinect for FRC and the Kinect for Windows SDK API reference for more information

Definition at line 24 of file Kinect.h.

Member Function Documentation

Kinect::Point4 Kinect::GetFloorClipPlane ( )

Get the floor clip plane as defined in the Kinect SDK

Returns
The floor clip plane

Definition at line 63 of file Kinect.cpp.

Kinect::Point4 Kinect::GetGravityNormal ( )

Get the gravity normal from the kinect as defined in the Kinect SDK

Returns
The gravity normal (w is ignored)

Definition at line 73 of file Kinect.cpp.

Kinect * Kinect::GetInstance ( )
static

Get the one and only Kinect object

Returns
pointer to a Kinect

Definition at line 42 of file Kinect.cpp.

int Kinect::GetNumberOfPlayers ( )

Get the number of tracked players on the Kinect

Returns
the number of players being actively tracked

Definition at line 53 of file Kinect.cpp.

Kinect::Point4 Kinect::GetPosition ( int  skeletonIndex = 1)

Get the current position of the skeleton

Parameters
skeletonIndexthe skeleton to read from
Returns
the current position as defined in the Kinect SDK (w is ignored)

Definition at line 102 of file Kinect.cpp.

UINT32 Kinect::GetQuality ( int  skeletonIndex = 1)

Get the quality of the skeleton. Quality masks are defined in the SkeletonQuality enum

Parameters
skeletonIndexthe skeleton to read from
Returns
the quality value as defined in the Kinect SDK

Definition at line 119 of file Kinect.cpp.

Skeleton Kinect::GetSkeleton ( int  skeletonIndex = 1)

Get the skeleton data Returns the detected skeleton data from the kinect as defined in the Kinect SDK

Parameters
skeletonIndexWhich of (potentially 2) skeletons to return. This is ignored in this implementation and only a single skeleton is supported for the FRC release default gesture interpretation.
Returns
The current version of the skeleton object.

Definition at line 86 of file Kinect.cpp.

Kinect::SkeletonTrackingState Kinect::GetTrackingState ( int  skeletonIndex = 1)

Get the TrackingState of the skeleton. Tracking states are defined in the SkeletonTrackingState enum

Parameters
skeletonIndexthe skeleton to read from
Returns
the tracking state value as defined in the Kinect SDK

Definition at line 136 of file Kinect.cpp.


The documentation for this class was generated from the following files:

Generated on Tue Feb 5 2013 00:55:10 for WPILibC++ by doxygen 1.8.1.2