This experiment has got three parts. 1. Front end : This is the web part done with html5 and javascript libraries(Processing js the one I have used). 2. Back end Processing(java flavour) installed with openni and OSC libraries to capture the hand movements and send them as OSC signals. 3 .OSC-Web This is used as connector between the above two parts. Setting up of OSC-Web pre requisities node.js socket.io Node JS installation Here we are installing node globally for all users. Execute following commands. cd /usr/local/src sudo mkdir node cd node sudo wget http://nodejs.org/dist/v0.6.17/node-v0.6.17.tar.gz sudo tar -xzvf node-v0.6.17.tar.gz We now need to enter the extracted directory and configure the code. cd node-v0.6.17 sudo ./configure Normally it ends up successfully. Otherwise some missing libraries like g++, openssl-devel are to be installed. Then execute the make commands. sudo make sudo make install This will result in the commands node and npm been installed into the /usr/local/bin directory Now check versions of node js and npm node -v npm -v Refer http://davidtsadler.com/archives/2012/05/06/installing-node-js-on-ubuntu/ for more details. Socket.io installation Install socket.io from using following command. npm install socket.io This will create a node_modules folder with a sub directory socket.io. OSC-Web installation git clone git://github.com/automata/osc-web.git (Install git using apt-get install git if it is not installed.) This will create a osc-web folder. Now move node_modules and osc-web folder to localhost(/var/www) with appropriate permission. To start the server cd osc-web node bridge.js (server program that connects the program that emits osc signal and the web program that receives these signals ) Usually this gives node module missing errors. These missing node modules are to be installed into node_modules folder (/var/www @ the peer level of osc-web folder). These missing modules are version specific and may vary from version to version. For that leave the current folder and cd to node_modules folder. cd node_modules. npm install <missing libraries> eg: npm install node-osc Step 1 Now run the sever(bridge.js ) again. node bridge.js Most probably it will be running successfully. Step 2 Now run the web application from local host, which should contain a socket.io.js file in it. The example web program is given in osc-web/web-side/app.html. In this , the ports that receives and emits the osc signal are specified explicitly and can be changed according to our needs. Step 3 Then run the processing program which sends the osc signal to the specified port.Now reload the browser and osc signals from the processing program can be displayed as an array in the console(if it is asked to do so). If the entire application behaves indifferently restart the server (node bridge.js).
Advertisements