Using several python packages I’ve been able to bridge from TUIO to UTouch; the touch framework becoming more common amongst linux-based systems. UTouch enables apps built using it to utilise multi-touch gestures and simple cursor control in most linux systems.
While not as visually stunning as the Compiz TUIO plugin it offers a method of controlling more recent Linux distributions with TUIO outputting devices or software. The video below shows it in action. The use of an open protocol like TUIO allows for a wide range of input technologies to be used. In the video we see a direct touch input being provided in the form of one of our multi-touch tables used in the SynergyNet project, an indirect touch input provided through TUIOdroid and a hand tracking input provided through the Kinect.
This bridge from TUIO to UTouch is a simple script written in python. The script was originally written by ENAC – Interactive Computing Laboratory. The script however fell foul of a change in API of one of its dependencies which stopped it working. However, I have been able to update the script accordingly to get it to function.
Before the script can be run several dependencies must be installed. The first is libudev-dev which can be easily installed on ubuntu distributions through:
sudo apt-get install libudev-dev
This is needed for installing Python-uinput, the script’s first dependency. To install this package download archive for version 0.9 from the following page and unpack it:
Navigate to the unpacked directory and from python-uinput-0.9 run the following command to install the package:
sudo python setup.py install –prefix=/usr/local
The script’s second dependency is pytuio. To install this package download the archive for version 0.1 from the following page and unpack it:
Navigate to the unpacked directory and from pytuio-0.1 run the following command to install the package:
sudo python setup.py install
With both dependencies installed the script can be run. The updated version is licenced under gpl3 in accordance with the original version. To run the script download the archive from the following page and unpack it:
Navigate to the unpacked directory and from Tuio to UTouch run the following command to start the script:
sudo python tuiototouch.py
The ReadMe file contained in the script download explains the arguments which can be used with the script and showcases examples of its use. The script allows for receiving TUIO from local or remote sources on any port and also enables the touch events to mapped to specific displays.
While run in a console, the script should print out a response for each received touch event. The script ends when the console is closed. Of course the bridge could be made runnable through a bash script which would allow the bridge to be started automatically after certain events, such as logging on.
I haven’t found many applications which use UTouch but the cursor support makes it usable with most pieces of software on linux. I’ve yet to find a good virtual keyboard, the one shown in the video is the first result in the software centre but was very lacking in features. I’ve tried the script in Ubuntu 12.04, Ubuntu 12.10 and Xubuntu 12.10 without problem. In theory it should work on any distribution which uses UTouch and allows you to install libudev-dev.
Edit: Early downloaders of the script may have noticed an error when supplying a port mapping argument. This has now been fixed in the download.