Kinect Motor Control (Linux)

kinectmotorcontrol is a Linux command line program to control the Kinect motor using the OpenNI driver. As such, you must have the OpenNI driver installed and working (Linux version requires a patch). I do not do much error checking in my code and assume your Kinect and it’s drivers are already working properly. My code is based on the code found here:

https://skydrive.live.com/?cid=E0070FB8ECF9015F&id=E0070FB8ECF9015F!13558&sc=documents

Which in turn is based on the code found here:

https://groups.google.com/forum/#!msg/openni-dev/T_CeVW_d8ig/dsBKONIpNyQJ

You can get my compiled program here:

kinectmotorcontrol.tar.gz

Or, compile it yourself (recommended):

kinectmotorcontrol_source.tar.gz

Program Usage:

kinectmotorcontrol [degree, reset, up, down, status]

Degree Integer between -31 and 31 to tilt the Kinect to.
Reset Tilts the Kinect to the degree of zero.
Up Tilts the Kinect up by six degrees.
Down Tilts the Kinect down by six degrees.
Status Retrieves the current degree of the Kinect.

NOTE: If the value for degree does not change by at least six from the previous value, the Kinect may ignore the new value and the motor position will not change. Degree values returned are approximate and may be incorrect.

This software is distributed “AS IS”, without warranty or implied warranty. By using this software you agree that the distributor and it’s creator is not liable for any damages or loss of data that may occur.

Known Bugs:

  • kinectmotorcontrol will sometimes freeze when sending commands too close together.
  • Entering a value that is not predefined, (ie. abcdef) will reset the Kinect to degree zero.

One final note:

If you run into permission errors dealing with libusb, run the program as root or install the SensorKinect module from avin. Another option, if you know how to create udev rules, is to create a rule that allows the Kinect’s Vendor ID to be accessed by your user or group.

Type “kinectmotorcontrol –help” for help.

This software will not be maintained.

Comments are closed.