Control Kinect Motor in TD?

Hi all,
wondering whether anyone has insight regarding controlling the Kinect V1 motor?
When I was using the kinect in openFrameworks, I had the ability to control the built in motor in the kinect through the openNI2 library.
Is this doable in TD?

Thanks in advance!
M

Hi @mkhayata

there is a way - i don’t have a kinect here to test it and you have to use tscript instead of python:

kinecttilt -d degrees nodes

Controls the tilt of the Kinect sensor selected by the specified nodes. The tilt is expressed in degrees and is relative to gravity. That means that a tilt of 0 is horizontal to the ground, not horizontal to the surface the sensor is sitting on (which may not be flat). The Kinect sensor tilt motor is not intended to be used for continuous motion and will start ignoring commands for a while if asked to move too much (more than 15 times in 20 seconds usually).

Options:

  • -d The degrees of tilt to set to the sensor(s) to. A negative number will aim it downwards.

Cheers
Markus

3 Likes

Brilliant!
Thank you @snaut , will test this and report back here ASAP!

M

1 Like

Apologies for the late update on this! Got busy with non Kinect related projects.
Here’s how it works:

  1. Open up the Textport (Alt + T) or through the top menu (Dialogs > Textport).

  2. Specify that you want to use Tscript instead of Python. (Click the Python logo on the top left of the Textport, it should change to a ‘T’ logo.)

  3. Type in the tilt command: kinecttilt -d 30 /project1/kinect1

This should tilt your Kinect 30 degrees upwards. As the documentation states, negative numbers will tilt the device downwards.

“/project1” is my project container and “kinect1” is the Kinect CHOP.

Take care, and thanks again @snaut !

1 Like