Friday, November 11, 2011

nullPointerException Exhibition at PJ Olivier

The crazy days of installation and setup, opening and examiners have passed. Here are some photos. The show runs till 25 November and is open on weekdays from 9:00 - 16:00.

Sunday, November 06, 2011

tests and installation

As an initial preparation I went through each of the pieces and tried to think which parameters would be different in the gallery space. Since I wasn't sure which pc's I could use and they all vary in speed and the screen resolution wasn't completely clear either, the number of particles in each piece needed to be variable. More particles = fuller screen but slower response. I made these parameters variable so I could read them from a file. This means I can tune the installation in the space without doing a recompile.

To get final measurements of the screen sizes and for general sanity I did a pre-install test run.

As part of the installation process I made 6 identical usb disks which will auto boot into ubuntu and have all the kinect drivers installed and have the pieces on each disk. This will make the installation easier because I can borrow PCs from people and just pop the disk in and run up the work.

Prepare packing lists and order wood for the screens. Visit the gallery space again and measure and marked where everything has to go. Pack and early Saturday morning started the installation.
Lessons learnt: You can never have enough extension cables. USB cabling is difficult if you want the pc hidden and the sensor in an optimal position; need powered hubs and active USB extension. Bring food.

Saturday, October 08, 2011

Sunday, October 02, 2011

memory leaks begone

With the help of Valgrind and some judicious code commenting not unlike a binary search I have tracked down the memory leaks in my code. Why is this important? If my code leaks memory it will crash eventually and installations in a gallery shouldn't crash.

The first graph shows the memory foot print over night taken at 60 second intervals. The spikes happen when the software detects someone there. The second graph shows a more complicated piece that detects users and hand movements. This is a preliminary test but it is looking promising. In this case the spikes are people detected and hand movements. It releases the memory again if it forgets about a user but this only happens after a while.

Here is the bash script I used to record the memory samples: It takes 2 parameters the sleep interval and the process id.

if [ $# -lt 2 ]
  echo "This script needs at least 2 command-line arguments: sleep interval and process id."
  exit 1
while true; do
   #echo "infinite loops [ hit CTRL+C to stop]"
   ps --no-heading -o rss $2 
   sleep $1

I created the graphs by feeding the script results into gnuplot.

Thursday, September 22, 2011

Tuesday, September 13, 2011

null pointer exception - work in progress

null pointer exception from Maia Gr on Vimeo.

ideas and intentions are converted into code
code runs on machines
people interact the code and the machines

code runs too quickly to see
code hides
code can be understood for a short while by some people and then they forget and have to reread it

the kinect can only see me sometimes
I can move too quickly for the kinect to see
I can hide behind the door

documentation of 4 software pieces coded in openframeworks and using the kinect with OpenNI and PrimeSense drivers on ubuntu 10.04

Thursday, September 08, 2011

making sense of it all -or- what was I saying again?

Attempt at structuring my ideas and figuring out what I want to say and how the different works connect to each other.

Thursday, July 21, 2011

Standalone flash disk install

Techy almost no image blogpost alert!

These are really just notes to remind me of how I did it but it may be useful to someone. I apologise in advance for the vague bits. Also too this recipe only works for people who run Ubuntu :D.

I am looking for a way to run an openframeworks project on a machine in an easy non final way which will allow me to borrow PCs from people and give them back without changing anything. Since my dev environment is ubuntu I chose lubuntu a lightweight ubuntu with a smaller memory map. Using the lubuntu live disk iso, I modified the iso to have everything I need to run my project. The result a flashdisk which will autorun my project when the pc boots from the disk. In my case my projects need the kinect so the installation is as simple as plug usb stick and kinect into pc and boot.

In recipe style here is what it took to get the disk:

  • 1 Flash disk 1Gig is enough
  • lbuntu iso file
  • your compiled openframeworks project, the bin directory and the lib directory no source needed
  • if you openframeworks project needs other libraries make a list of those that can be installed and make a tarball of those you need to install by hand. This is usually not necessary if you use openframeworks extension which include the libraries.
  • A list of other package your project needs.
  • a start.desktop file (see further down the post for an example)
  • a script  (see further down the post for an example)
  • Ubuntu Customisation Kit or UCK you can get it by searching for uck in the software centre or typing sudo apt-get install uck

Remastering of the iso:

  1. start uck
  2. choose only the language packs you need
  3. when asked if you want to customise more say yes
  4. follow the prompts and at some point you'll get three options. choose option 1: start package manager

Modifying packages:

  1. At this point you are root on the filesystem that will be squashed in the iso. see chroot for more info if you need to know how this works. So adding packages and removing packages with the package manager started by uck will not change your computer but only the packages in your iso. 
  2. Remove Ubiquity (ubiquity provides install icon on desktop and more)
  3. Add whatever packages you need e.g. build-essential if you are planning on building anything.
  4. Close the package manager when you are finished.
  5. At the three options prompt choose 2: open a terminal

Terminal edits:

  1. Now a terminal opens and you are again dropped into the file system in the iso as root. You can see this by typing whoami it should say root. Now you can do any modifications you need.
  2. Get the files you need by typing sftp username@localhost You need to use your username. If it asks security questions say yes and type in your password.
  3. Navigate to the place where the tarball is in you ingredients using pwd, cd and ls
  4. get the file by typing get filename.tar.gz
  5. exit to leave sftp
  6. Do whatever else you need. I moved the tarball to /tmp extracted it using tar -xvf filename.tar.gz then I moved my openframeworks project folder into /usr/share e.g. /usr/share/myapp
  7. Make a file in the /usr/shar/myapp which contains the following two lines: cd /usr/share/myapp/bin and ./myapp
  8. make the executable chmod 755 /usr/share/myapp/
  9. Make a .desktop file in  /etc/xdg/autostart see this example where it says /root/ replace /usr/share/myapp/
  10. remove all unsused files you copied in or unpacked with sftp to make the final image smaller
  11. clean up the unused packages by typing : apt-get autoremove
  12. leave the terminal by typing: exit
  13. Again you see the 3 options choose option 3: continue
  14. uck will now make a new .iso file for you.

You can test the iso in virtual box or make a usb disk using the usb creator which comes with ubuntu

Final tweaks:

  1. Once you have the usb disk plug it in and look for the syslinux.cfg file in syslinux on the disk.
  2. Edit it and change the timeout to say 10 which means 10 1/10ths of a second which makes it jump over the menu quickly.
  3. remove disk and plug into unsuspecting pc and boot up. 
  4. After the first run remember to switch the screensaver off, I still have to figure out how to do this in the default settings.


Some notes:

  • Some PCs have problems with live disk booting of 11.04 notably Acers which have a backlighting issue.
  • It would be good to figure out how to do the screensaver changes as default.
  • Works better if you make your project run fullscreen.
  • I can run the uck process multiple times on the built iso in this way incrementally changing things.
  • I still need to figure out how to remove other unneeded things such as bluetooth detecion and wifi detection which slows down the startup.
  • When removing packages make sure it isn't going to remove lubuntu-desktop. 

More info:
uck tutorial
uck documentation

Thursday, May 19, 2011

user detection and physics particles part 4

Now the particles change their alpha value depending on how close they are to the attracting point and also starting to change the text that the particles show when they are not over a person. Also a version that reads it's own code and uses it as text input.

Sunday, May 15, 2011

user detection and physics particles part 3

The particles now no longer need calibration pose or skeleton, they just swarm to the centre of mass of the closest viewer. If someone moves in front of you the particles will change allegiance.

Friday, May 06, 2011

AfrikaBurn 2011 Life Drawing

One of the highlights of my AfrikaBurn experience this year as a one hour life drawing session. Melissa and Roulé created a space, organised models and provided boards, paper, clips, charcoal and ink. The poses were between 2min and 5min. More images in the album.

Thursday, April 21, 2011

Postgraduate symposium presentation at Wits Engineering department

Here is the presentation I prepared for the post graduate symposium at the Wits Engineering department.

Friday, April 08, 2011

Hackinect wednesday solonoid tests

TheHacksaws have been busy. Different solonoids and a kinect tapping away merrily. Thanks Andrew and Dino for exploring and recording what you did. There's a video on Andrew's blog.

Saturday, March 26, 2011

user detection and physics particles part 2

velopeople test from Maia Gr on Vimeo.
The particles change to reveal attribute values when over a user and are attracted to the right hand but repelled by the left. OpenNI, NITE, openframeworks, ubuntu

Monday, March 21, 2011

Hackinect wednesday

We have a weekly playdate, and this is what we do. The meeting is in Johannesburg but I attend on skype.  No solonoids or synths were hurt in the making of Andrew's the video. It has taken a bit of library and search path hackery and more to get all the OpenNI and NITE and TUIO bits to work together but we build on the shoulders of giants. More detail on Andrew's blog.

Friday, February 25, 2011

Kinect OpenNI NITE

skeleton tracking

Hand tracking
Using this recipe:

Just the sample code but at least I have all the libs matching up and talking to the Kinect. Now to get it all sorted in openframeworks.

Thursday, February 03, 2011

Friday, January 28, 2011


Kinect arrived this morning. Here you see the freekinect test program running on my ubuntu box. On the right is the webcam view and from the left image you can see how far things are away from the kinect. red is closer blue is further away. Worked like this out of the box. Just installed the opensource drivers. Hmmm now what will I do with the data I get from the device ....

Friday, January 14, 2011

kinect open

Colour and depth-sensing lenses
Voice microphone array
Tilt motor for sensor adjustment
Fully compatible with existing Xbox 360 consoles

Field of View
Horizontal field of view: 57 degrees
Vertical field of view: 43 degrees
Physical tilt range: ± 27 degrees
Depth sensor range: 1.2m - 3.5m

Data Streams
320x240 16-bit depth @ 30 frames/sec
640x480 32-bit colour@ 30 frames/sec
16-bit audio @ 16 kHz

and a wiki to sort out drivers and tools to work on ubuntu amongst other things