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_t 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_t lineNumber) const
 Set error information associated with a C library call that set an error to the "errno" global variable. More...
 
virtual void SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated from the nivision Imaq API. More...
 
virtual void SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
virtual void SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const
 Set the current error information associated with this sensor. More...
 
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. More...
 

Static Public Member Functions

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

Additional Inherited Members

- Static Public Attributes inherited from SensorBase
static const uint32_t kSystemClockTicksPerMicrosecond = 40
 
static const uint32_t kDigitalChannels = 14
 
static const uint32_t kAnalogChannels = 8
 
static const uint32_t kAnalogModules = 2
 
static const uint32_t kDigitalModules = 2
 
static const uint32_t kSolenoidChannels = 8
 
static const uint32_t kSolenoidModules = 2
 
static const uint32_t kPwmChannels = 10
 
static const uint32_t kRelayChannels = 8
 
static const uint32_t kChassisSlots = 8
 
- Protected Member Functions inherited from SensorBase
void AddToSingletonList ()
 
- Protected Member Functions inherited from ErrorBase
 ErrorBase ()
 Initialize the instance status to 0 for now.
 
- 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 64 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 74 of file Kinect.cpp.

Kinect * Kinect::GetInstance ( )
static

Get the one and only Kinect object

Returns
pointer to a Kinect

Definition at line 43 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 54 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 103 of file Kinect.cpp.

uint32_t 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 120 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 87 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 137 of file Kinect.cpp.


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

Generated on Sat Apr 26 2014 12:26:46 for WPILibC++ by doxygen 1.8.6