{ "info": { "author": "Jannis Leidel", "author_email": "jannis@leidel.info", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Intended Audience :: Education", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Artistic Software", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "======\npyTUIO\n======\n\nA Python library that understands the TUIO protocol.\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nThis library is able to receive and parse data following the `TUIO protocol`_,\nwhich was specially designed for transmitting the state of tangible objects and multi-touch control on a table surface.\n\nInstallation\n============\n\nIn order to use this library you need to have the cross-plattform \nreacTIVision_ application that does the heavy lifting of tracking the tangible \nobjects, so-called fiducials_. It transmits the received data (e.g. positional \ninformation) as OSC_ messages via an UDP socket to your client software which\nuses this library.\n\nIf you haven't downloaded a copy of django-registration already,\nyou'll need to do so. You can download a packaged version of the\nlatest release here::\n\n http://pytuio.googlecode.com/files/pytuio-0.1.tar.gz\n\nOpen up the package (on most operating systems you can double-click, or you\ncan use the command ``tar zxvf pytuio-0.1.tar.gz`` to manually unpack it), \nand, at a command line, navigate to the directory ``pytuio-0.1``, then type::\n\n python setup.py install\n\nThis will install pytuio into a directory on your Python import path. For \nsystem-wide installation on Linux/Unix and Mac OS, you can use ``sudo``::\n\n sudo python setup.py install\n\nAlternatively, you can do a Subversion checkout to get the latest\ndevelopment code (though this may also include bugs which have not yet\nbeen fixed)::\n\n svn co http://pytuio.googlecode.com/svn/trunk/tuio/\n\nFor best results, do that in a directory that's on your Python import\npath.\n\nIf you prefer you can also simply place the included ``tuio`` directory \nsomewhere on your Python path, or symlink to it from somewhere on your Python \npath; this is useful if you're working from a Subversion checkout.\n\nIf you plan to use this library together with Nodebox.app please copy the \n``tuio`` directory to ``~/Library/Applications Support/Nodebox/`` to enable\nNodebox to find it.\n\n.. _TUIO protocol: http://modin.yuri.at/publications/tuio_gw2005.pdf\n.. _reacTIVision: http://reactable.iua.upf.edu/?software\n.. _fiducials: http://reactable.iua.upf.edu/pdfs/fiducials.pdf\n.. _OSC: http://en.wikipedia.org/wiki/OpenSound_Control\n\nBasic use\n=========\n\nTo use this library in general you should follow these steps:\n\n1. Get a camera or webcam, like iSight, Quickcam, etc., install its drivers if \n necessary, try it with the reacTIVision_ software\n2. Look in the ``examples`` directory to get started with Python code. Ask \n your local Python guru if needed.\n3. Build the tangible interface, table, stage, vehicle, game, whatever.\n4. Combine it with Blender_, Pygame_ or Nodebox_\n5. Use the source, Luke.\n\n.. _Blender: http://blender.org \n.. _Pygame: http://pygame.org\n.. _Nodebox: http://nodebox.net\n\nWhat is in the library\n======================\n\nThe library consists of several parts and submodules:\n\n * Tracking_\n * Objects_\n * Profiles_\n * OSC_\n\nTracking\n--------\n\nThe ``Tracking`` class should be used to initialize a socket connection for\nreceiving the OSC messages from reacTIVision_. It handles all incoming data\nand calls the appropriate functions, depending on the type of message.\n\nWhen started it loads every possible profile from the ``profiles`` submodule\nand initializes a callback manager from the ``OSC`` module.\n\nA simple example can be found in the ``examples`` directory in \n``example1.py``:\n\n1. Import it::\n\n import tuio\n\n2. Initializes the receiving of tracking data::\n\n tracking = tuio.Tracking()\n\n3. Print all TUIO profiles that have been found and loaded::\n\n print \"loaded profiles:\", tracking.profiles.keys()\n\n4. Print available helper functions, that can be used to access the objects of\n each loaded profile::\n \n print \"list functions to access tracked objects:\", tracking.get_helpers()\n\n5. Prepare to receive the data in an infinite or event loop::\n\n try:\n while 1:\n tracking.update()\n for obj in tracking.objects():\n print obj\n except KeyboardInterrupt:\n tracking.stop()\n\n a) You need to update the tracking information on each loop manually.\n\n b) Access the tracked objects by using one of the helper function that \n return a list of these objects.\n\n c) Stop the tracking manually on every exception to prevent socket \n errors\n\nObjects\n-------\n\nThe ``objects`` submodule contains a series of classes that represent types\nof tangible objects. They all are subclasses of the also included\n``objects.TuioObject``. The following object types are defined at the moment:\n\n1. ``Tuio2DCursor`` - An abstract cursor object, e.g. a finger.\n This object has limited information and is only sent by reacTIVision if the\n smallest possible fiducial marker was found: a point. In combination with a\n tangible table this can also be achieved by using fingers on the table\n surface.\n\n It has the following attributes:\n \n - ``sessionid`` - The unique sessionid it belongs to\n - ``xpos`` - The relative position on the x-axis\n - ``ypos`` - The relative position on the y-axis\n - ``xmot`` - The movement vector on the x-axis\n - ``ymot`` - The movement vector on the y-axis\n - ``mot_accel`` - The motion acceleration\n\n2. ``Tuio2DObject`` - An abstract object representing a fiducial.\n This object has detailed information about its state and is sent by\n reacTIVision if a fiducial was recognized.\n \n It has the following attributes:\n \n - ``sessionid`` - The unique sessionid it belongs to\n - ``xpos`` - The relative position on the x-axis\n - ``ypos`` - The relative position on the y-axis\n - ``angle`` - The current angle in degrees\n - ``xmot`` - The movement vector on the x-axis\n - ``ymot`` - The movement vector on the y-axis\n - ``rot_vector`` - The rotation vector\n - ``mot_accel`` - The motion acceleration\n - ``rot_accel`` - The rotation acceleration\n\nThe TUIO protocol provides even more possible object types, depending on the\npurpose of the intactive surface, e.g.:\n\n - 2.5D Interactive Surface - ``Tuio25DCursor`` and ``Tuio25DObject``\n - 3D Interactive Surface - ``Tuio3DCursor`` and ``Tuio3DObject``\n - raw profile - at the moment only ``dtouch`` specs are supported\n\nBut these profiles are left to be implemented by the user. Just have a look\nin ``objects.py`` and ``profiles.py`` and subclass the base classes there.\n\nProfiles\n--------\n\nThe ``profiles`` submodule contains a number of abstract descriptions of what\nshould happen if a certain object type is used. Depending on the desirable\ntangible object attributes you can customize the profiles for your own need.\n\nFor example, if you want to receive the data for a 2D tracking object you need\nto use the according profile, because it knows how to handle the dataset of\nthis type of object.\n\nEvery profile subclasses from a ``TuioProfile`` base class that has the\nfollowing required methods whose names originate from the name of the raw\nOSC message:\n\n - ``set`` - The state of each alive (but unchanged) fiducial is periodically\n resent with 'set' messages. The attributes are sent as a list or tuple.\n\n - ``alive`` - The 'alive' message contains the session ids of all alive\n fiducials known to reacTIVision.\n\n - ``fseq`` - fseq messages associate a unique frame id with a set of ``set``\n and ``alive`` messages\n\nOther methods and attributes are:\n\n - ``list_label`` - Defines the names of the helper methods that are\n automatically created while initialization of the ``Tracking`` instance\n and maps to the ``objs`` method of the used profile.\n\n - ``address`` - Defines the OSC address to bind to the ``CallBackmanager``\n and start listening to while starting the ``Tracking`` instance.\n\n - ``objs`` - Returns a generator list of all tracked objects which are\n recognized with this profile and are in the current session. Though\n please use the helper methods whose names are defined in the class\n variable ``list_label``.\n\nOSC\n---\n\nThis submodule does most of the heavy lifting of decoding the OSC messages\nused in the TUIO protocol and provides a convenient ``CallbackManager``.\nIt was written by Daniel Holth and Clinton McChesney.\n\nWhat happens next?\n==================\n\nThis library should be the start of lecturing about tangible interfaces in\ncombination with the ease of use of the Python programming language.\n\nFeel free to contact the Author Jannis Leidel to get to\nknow more about tangible user interfaces, integration into Pygame and future\nfeatures.\n\nYou can of course use the issue tracking service of its Google Code project::\n\n http://code.google.com/p/pytuio/issues/list\n \nto ask for new features, report bugs or become a project member.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://code.google.com/p/pytuio/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pytuio", "package_url": "https://pypi.org/project/pytuio/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pytuio/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://code.google.com/p/pytuio/" }, "release_url": "https://pypi.org/project/pytuio/0.1/", "requires_dist": null, "requires_python": null, "summary": "A Python library that understands the TUIO protocol", "version": "0.1" }, "last_serial": 1736798, "releases": { "0.1": [] }, "urls": [] }