READING FROM KINECT:
In order to run Kinect and OSCeleton on your Mac, I followed Tohm Judson’s long walk through, there is no short ones… It was written a while ago so some of steps are no longer apply. Here are my notes when I install them again on my new Mac (08/15/11).
My MacBook Pro (Mac OSX 10.6.8, 2.4GHz Intel Core i5, 4GB DDR3)
1. I didn’t install CMAKE and it works fine.
2. MacPorts SnowLeopard installer.
3. OpenNI: link to download OpenNI has changed to here.
4. NITE: link to download NITE has changed to here.*
5. I don’t have the avin2…>NITE>Data folder so there is no 3 files to copy from. Instead (important), open all 3 XML files inside of Nite-….>Data folder and change the value of the attribute “key” inside of the License syntax to 0KOIk2JeIBYClPWVnMoRKn5cdY4=
The line of code should look like this in all 3 XMLs:
<License vendor=”PrimeSense” key=”0KOIk2JeIBYClPWVnMoRKn5cdY4=”/>
6. pbox2d library errors: if there are errors, 99% is because of the latest version of pbox2d library. The OSCeletion example is based on an earlier version of pbox2d, a lot of function names are changed for the newer one. Replace the latest library with the old one above will fix the problem.
*If the link breaks again, go to http://www.openni.org, on the menu bar go to Download/OpenNI Modules, then choose “OpenNI Compliant Middleware Binaries”, then “Latest Unstable”, there pick the latest NITE version for Mac OSX.
OUTPUT TO NXT:
I use Jorge Cardoso’s NXTComm library to communicate with Lego NXT Brick.
The file tree on the website is a little bit messed up for me. In order to make it work for Processing 1.5.1, this is what I did:
1. Unzip and change the folder name to “NXTComm”
2. Open the folder and create a new folder named “library”
3. Drag NXTComm.jar into the newly created library folder.
4. Drag the entire NXTComm folder into Documents/Processing/libraries/
Ignore the RXTXcomm.jar, Processing 1.5.1 has serial library built in already.
There is an example using this library on Diego Baca’s NXT website. The example uses a library called SpringGUI, it is no where to be found. I commented out everything relates to SpringGUI in the code, then it works. I also experience some delay on the response, solved by commenting out unused port readings in the code. Since I am only using NXT’s motor ports, these two commands are all I need:
nxt.motorForward(portNumber, speed);
and
nxt.motorHandBrake(portNumber);
portNumber: 0, 1, 2
speed: -100 to 100 (directional)