[Kinect PIC] Kinect Chapter 6.   The Tilt Motor, LED, and Accelerometer

 

This chapter was previously labelled as "NUI Chapter 16".

 

The Kinect is more than just a collection of cameras, as the picture on the right shows.

Up to now, I've focused on the color and IR sensors, but this chapter is about the less important, but still useful, tilt motor, status LED, and accelerometer.

These controls should be managed by OpenNI's "Kinect Motor" driver, but it doesn't currently support them. A popular alternative is to install the "Xbox NUI Motor" driver from the OpenKinect libfreenect library. The steps involved in this are clearly explained in Den Delimarky's DZone article "Kinect drivers can be inter-changed for experimentation purposes". The principle drawback is the need to deal with both OpenNI and OpenKinect on one machine, and their Java wrappers, just to access a few additional functions. Also, some wrappers don't actually include methods for accessing the tilt motor, LED, and accelerometer.

My approach is (arguably) simpler and more flexible. I'll utilize libusb-win32 to create my own driver for the Kinect motor, and then communicate with it using libusbjava. It's simpler because I've already used libusb-win32 and libusbjava twice before (for the missile launcher in NUI chapter 4 and the robot arm in NUI chapter 6). It's more flexible because I get to choose what features to include in my MotorCommunicator class.

If you haven't looked at chapters 4 and 6, then it's worthwhile reading at least the early sections of chapter 4 which introduce USB and its support in Java.

 

Downloads


Navigation:


Dr. Andrew Davison
E-mail: ad@fivedots.coe.psu.ac.th
Back to my home page