October 2011 Archives

Kinect Rover, MAX/MSP & Midi Triggers

| No Comments | No TrackBacks
"just in the nick of time, failure"

One evening a friend asked if i'd be attending a musical event.  I guffawed and said, "of course not!"  The next day, I checked the site and noticed that my name had been attached to the event as someone who would: operate a robot through the catalyst of kinect.  Well, I hadn't recalled "officially" signing up for this, but with a week to go, proceeded in a focused manner.

The first step was finding Ryan Challinor's synapse for OS X 10.6.  Synapse takes the kinect and provides UDP output/input.  This includes a cool monitor window, as well as skeleton tracking.  The only hard part part for me, was upgrading to OS X snow leopard, which I'd resisted due to the number of "wonky industrial" programs I have on my machine.  

After that, it was a short manner of using the udpsend/receive objects to port everything into MAX/msp.  With that done, the sky is the limit.  But for my purposes, I just ensured that I could track the skeleton based on hits, or by "constant tracking" (in which you must prompt for the kinect data every two seconds or so).  i'll attach the patch for those interested.

The robot itself is nothing fantastic.  Its a simple bot built off of an arduino pro 5V, sparkfun motor controller, and an 802.11b based xbee for data tx/rx, and a super cheap 2.4ghz wireless camera with audio.  It beeps too, and has had a few varieties of sensor interfaced :)

In short order, the Kinect outputs data to MAX/MSP, which then uses the serial object to access the CPU's xbee, which transmits data back and forth with the xbee modem on the rover.  The rover arduino interprets the commands, and then moves.  In this way, kinect gestures could be used to control the robot!  Also, you can see where you're going, via the rover's wireless camera.

BUT IT BROKE ONE HOUR PRIOR TO THE EVENT!

Rather, I broke it by violating a simple rule:  ALWAYS USE A PROTECTIVE DIODE!  So with everything broken, the rover would not work for the evening.  Instead I augmented the patch so that gestures would play a midi piano; stepping right increased the scale, stepping left decreased the scale.  The nice bit was that the users got to see the skeleton version of themselves.  The sad thing, is that I found out how shotty the midi interface on my sampler is (as I tried to do this first and could only get sporadic results!)

The attached patch will take synapse data and make it more usable in the max/msp environment.  It's an earlier version, and is certainly ugly.  You'll need to program the col object with the lines of text posted after the patch. 

MAX PATCH:

<pre><code>
----------begin_max5_patcher----------
4729.3oc4cs0biiar9YO+JPbcdXlS40F23sb1JmJUk+AI47RxVtnjfr3ZIR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tbLVWGzw
PmnDVefGzOgXxGIkvUmHG0ORx6A9hw8GemVt8o5zCVFxIYUTuV8M+PcSudAN
uVoSuV4L+PkRuVcO+PEUuiCnXGW2yu7XF54o7YiJgS7TAMrshetKNtzP08+q
7kzbelp3qGuwSzb22rgSZrocZaylHJHrG1tIucqlb5sYxaj0rklTuOSTkviS
0to2ahBaMPMfzDJZBRUnfv56421np.uQfpPFoJ+QfpLxACBFVpJDaEGLZDnJ
ibvP3HPUF4fgnAlp7sgCFRFApxLGjNBTkYN3.quJBZEGLXDnJybvvQfpLyAG
X8UhDlyLGLBMBTkQNXDdDnJibvnAVekHzNl4f9gi.UYjC5GMBTkYKYF3YmEt
G1BNHcDnJybPuQfpLxA8GXKjE9VxBNHbDnJybPzHPUl4fCrtcuHa3fd9i.UY
jC5ELBTkQNn2.OiC0pUS3gFApxLGDNBTkQNHcXmcVpdLx.QcjcECBMEZhlfC
OMEXfl7iFdZx2DMEN7zjmIZJX3oIpIZxe3oIhIZxa3oISJy8oCOMYRU9Q1bM
HzjIE493Q.mLFZjgcYxd1fSvIGIIOMbFxn0X0xqfCrw4XqV19.aCE1JanvCr
8lVFsM+IIUMr11IK0IloJz.6iJHdBJri7lf5EhrJtjng0CUQ1v9hF30FCsZ7
GDNAYevg03kiAgIA+KvlfJGMr.kUACYfiPSjms3Dd3Dnrwcm3g0CdX6L8bfi
vsUlHL4rPeX0DPCldYclGZ5QSTazD3MvRSSvLFzyehx6LqIXXmtyJhJXXUYF
PrFnFx0EOEW+BwF8AHh+HPUlmGdXcatczj2HfTFCtGcLjpHFoJzzyshCrJcj
c5zo9i.UYN3rQi.UYNYRHi.UYTV2OXDnJpwD5ZfcBafUSAFPmd5EBvi.+yyX
JURGApx2HUAGApJvXBDOF5PCMRUigbUjQo8gNEvsJfCQCc5xaiOEv8JLH7+3
e+k+C.e5.AC
-----------end_max5_patcher-----------
</code></pre>

-------------------------------------------

joints.txt:
1, /torso_trackjointpos 1;
2, /head_trackjointpos 1;
3, /leftknee_trackjointpos 1;
4, /leftfoot_trackjointpos 1;
5, /leftelbow_trackjointpos 1;
6, /lefthand_trackjointpos 1;
7, /rightknee_trackjointpos 1;
8, /rightfoot_trackjointpos 1;
9, /rightelbow_trackjointpos 1;
10, /righthand_trackjointpos 1;




Enhanced by Zemanta

Cheapo PIR

| No Comments | No TrackBacks
"the hard way"

First off, if you ever need to install 20 Passive IR detection modules, with alarms, then don't do this.  The basic set-up is the zilog ePir, a SST relay, and a piezo buzzer.  The Zilog unit is awesome.  Aside from being a $12 dollar MCU with PIR and Fresnel lens, it also has a serial interface, left/right detection, and among other things, ready to go custom settings.  

Another thing about this project is that the components are less than $30, per unit, including the chassis.  When compared to the price of a commercial PIR, the price is quite nice.   The bad thing is they're labor intensive.

So why did i do this?  I've often worked with commercial PIR units and felt that they weren't suited to the needs of my projects.  In this manner, we were able to get the kind've detection results we wanted, in a very tunable way. 

Enhanced by Zemanta

Glass as Speaker Cone

| No Comments | No TrackBacks

"thanks bob!"

In college, there was a professor who well, taught me that you can do anything, but you need to do it yourself--specifically with electronics and audio.  Anyhow, one day he took an induction driver (pretty much a speaker without a cone), and turned a wall into a speaker.  Many years later, I was reminded of Bob Bielecki's demonstration (all of them really), and decided it would be a nice solution for an upcoming project:  transmitting audio through glass!  Displayed here is a proof of concept mock-up, with gaffers tape holding the driver on instead of cold-weld adhesive.  Eagle eyes might spot a Programmable Logic Controller, a PIR, and a solid-state audio repeater/amplifier.

Enhanced by Zemanta

About this Archive

This page is an archive of entries from October 2011 listed from newest to oldest.

September 2011 is the previous archive.

November 2011 is the next archive.

Find recent content on the main index or look in the archives to find all content.