|
Revision 1.8, 24th April
2013 www.touch-base.com\documentation\general UPDD TUIO Server |
|||||||||||||||||||||||||||||||||
OverviewTUIO (Tangible User Interface Object) is an open protocol for the communication of data from devices like a multi-touch display, an interactive surface, or a computer vision-based motion tracker. The sorts of information it describes includes touch events and object locations, much like with the Microsoft Surface, as per the video here. TUIO uses a client/server model for communicating this data, so any program that is a TUIO client can receive touch or object data from any TUIO server. TUIO is based on Open Sound Control (OSC) a specification for sending messages interactively, which while originally intended for sharing music and performance data, has been increasingly used for other kinds of non-musical data. OSC transmits information across standard IP networks and the internet using User Datagram Protocol (UDP – see interfaces), so it's supported by a lot of systems, including Windows, Mac OS X, and Linux. Any system that supports OSC can also support TUIO, and consequently, there are many TUIO client and server programs across these platforms. Further, because TUIO uses UDP for communication, a TUIO server and client needn't be running on the same computer, or even on the same local network, though both running on the same computer probably covers most usage cases. The UPDD TUIO server program implements a TUIO server such that any application that is a TUIO client and receives TUIO touch data can be controlled with a UPDD driver supported touch-screen, thus expanding the number of multi-touch enabled applications that UPDD can support, the schematic being: Touch hardware > UPDD driver > UPDD TUIO Server > TUIO client application > End user interaction The main limitation is that UPDD TUIO Server does not support object data, as the UPDD only tracks touches on a multi-touch display. However, the main use of TUIO is to communicate multi-touch data, so most TUIO applications will be usable with the UPDD in spite of this limitation. If it should become necessary for the UPDD to support TUIO objects as well, an interface could be created to allow for the creation and positioning of virtual objects, much like the TUIO simulators that exist for testing and demonstration purposes. Currently the UPDD TUIO Server exists as a stand-alone application that needs to be compiled for each operating system but will in future be integrated into the main driver so will become part of the standard driver offering for each OS. Configuration / SettingsAll the settings are held in the UPDD Settings file, general driver settings section and can be adjusted with the TUIO setting dialog documented below or using one of the alternative update methods. Given that TUIO servers communicates using UDP then the only TUIO specific configuration necessary for the TUIO server is the IP address, port number and message packet size. Since most usage cases for a TUIO server is to have it running locally on the same computer that the TUIO client programs are running on, a reasonable default configuration is for it to use localhost with the default TUIO IP address (127.0.0.1), port number (3333) and packet size. The UPDD TUIO Server utility accepts command line arguments to override the TUIO settings and define settings for the current TUIO session only (the setting file entries stay intact):
Since Dec 2012 a TUIO settings dialog can be invoked from the system tray or menu bar icon to adjust the settings as required. System Tray or Menu bar iconWhen the UPDD TUIO server loads it will install a system tray or menu bar icon as follows:
The software is compiled under 32 bit except if using UPDD version 5.0.x 64 bit version in Windows in which case you must run the Windows 64bit version. In Linux it will be necessary for 32-bit versions of the libraries it requires to be installed. Invoking TUIO
Client application program considerations If the However, if you must run with the system wide mouse emulation disabled and touch is used to invoke the bridge software along with the TUIO client application then some form of batch file or script be utilized that invokes both the TUIO bridge and TUIO client application should be employed. For example, under Windows you can use a VBScript file to invoke the applications, as per this example: Tuio_bridge.vbs – file name wScript.Echo "This is a test Script" set objshell = CreateObject("wScript.Shell") objShell.CurrentDirectory = "C:\Program Files\UPDD\" objshell.run """C:\Program Files\UPDD\UPDD TUIO.exe""" objShell.CurrentDirectory = "C:\Program Files\Application Folder\" objshell.run """C:\Program Files\Application Folder\TUIOClientApp.exe""" wScript.Quit OS ImplementationsCurrently UPDD TUIO server exists as a stand-alone application that needs to be run for each operating system but will shortly be integrated into the main driver so will become part of the standard driver offering for each OS. The software is compatible with UPDD 4.1.10 or above. Mac OS XThe UPDD TUIO server for the Mac OS X is available here. Some UPDD driver installs also install the TUIO software automatically. If the TUIO software is installed as part of the UPDD driver install it will be installed in /Applications/Utilities along with the other UPDD utilities. If manually installing the software it is recommended that the software is placed in this location so that is it automatically deleted by the UPDD driver uninstall program if and when UPDD is uninstalled. The uninstall will also remove any start up item for the TUIO server. To utilise this service in a Mac environment you need to simply run the ‘UPDD TUIO.app’ application with UPDD 4.1.10 or above installed. The TUIO server application interacts with the core UPDD driver to receive all touches and then post TUIO events. To Quit the service use the Quit option on the menu bar icon or your can safely quit using the kill command, or using the Activity Monitor. Invoke at system
startup It may be desirable to have the TUIO Server running at all times. In this case you need to create a startup item for the TUIO server. Since TUIO server software issued Dec 2012 there is an option in the TUIO server settings dialog to create the start up item. If the software is installed as part of the UPDD driver installation the start up item is added during the install. WindowsThe UPDD-to-TUIO server for the Windows UPDD 4.1.10 (32bit) or 5.0.2 (32bit) is available here or 5.0.2 (64bit) is available here. To utilise this service in a Windows environment you need to simply run the ‘UPDD TUIO.exe’ application with UPDD 4.1.10 or above installed. Copy the UPDD TUIO.exe to the /program files/updd folder and run as appropriate. If run from a different folder you will need to copy the tbapi.dll, ace_UPDD_5.6.2.dll into the same folder. The TUIO server application interacts with the core UPDD driver to receive all touches and then post TUIO events. Use the System Tray Quit option to stop the service. You may be
required to install Microsoft Visual C++
Redistributable Package. The application will report a required .DLL (MSVCP100.dll)
is missing if the run-time is not installed. Invoke at system
startup It may be desirable to have the TUIO Server running at all times. In this case you need to create a short cut in the start up folder to the TUIO server LinuxThe UPDD TUIO server for the Linux is available here. To utilise this service in a Linux environment you need to simply run the UPDD TUIO application with UPDD 4.1.10 or above installed. The instructions for using this under Linux is as follows: cd /opt/tbupddlx sudo tar –xzvf UPDD TUIO.tgz To run export LD_LIBRARY_PATH=/opt/tbupddlx:$LD_LIBRARY_PATH /opt/tbupddlx/UPDD TUIO These two lines can be added to an appropriate startup script if required. The TUIO server application interacts with the core UPDD driver to receive all touches and then post TUIO events. UninstallIf the TUIO settings dialog shows an Uninstall option select this to uninstall the software. Alternatively, use the UPDD TUIO settings dialog to disable any start up entry and then simply locate the TUIO application file and delete as appropriate to the host operating system. You may also wish to delete the TUIO settings in the settings files although this is not really necessary as they will not be utilised until the UPDD TUIO server is reinstated. Alternatively, uninstalling the UPDD driver will also remove the software if under Windows or Linux it is located in the UPDD Application folder or under Mac OS X it is located in /Applications/Utilities. The driver will also attempt to remove any start up item associated with the TUIO server. TestingOnce the TUIO server application is running then any application that is a TUIO client should respond to touches. We used the following TUIO applications for our tests: TUIODemoFor the basic Java TUIO client: 1. Go to http://www.tuio.org/?software 2. Click the link under "TUIO Client Reference Implementations" named TUIO_JAVA.zip. TUIO_JAVA.zip should download automatically 3. Unzip the file 4.In the TUIO_JAVA folder, open TuioDemo.jar. A window should appear with the title "TuioDemo" which should display touches. Java must be installed on a system for the above demo to work http://www.java.com/en/download/index.jsp QtTUIOTouchDemoThis demo program was written in-house to test our UPDD TUIO server and is available here. In this example the TUIO server has been loaded and the QtTUIOTouchDemo program listed to turn off mouse emulation when top most so that only the TUIO touches are recorded: The calculated gesture is also shown. An example of 10 touches can be seen here.
CalibrationThe TUIO spec states “The TUIO coordinate system is normalized for each axis and is represented by floating point numbers in the range from 0.0f to 1.0f. In order to compute the X and Y coordinates for the 2D profiles a TUIO tracker implementation needs to divide these values by the actual sensor dimension, while a TUIO client implementation consequently can scale these values back to the actual screen dimension. “ InterfacesThe common interface for TUIO is UDP. However it is our understanding that two additional interfaces were introduced
for using TUIO with Flash, initially TUIO/FLC followed by TUIO/TCP. The reason was, until recently, that Flash
didn't support either TCP or UDP sockets, so TUIO/FLC was created. It uses a communication protocol from Flash
called "LocalConnection" to send touch information directly into a
Flash applet. Flash did eventually add
support for TCP sockets, but apparently they’re not so good for TUIO due to
higher latency. UPDD-TUIO-Bridge currently only supports UDP (no TCP or FLC) and we could add support for other interfaces. However, we do not believe this is necessary for two reasons:
ContactFor further information or technical assistance please email the technical support team at technical@touch-base.com |
|||||||||||||||||||||||||||||||||