jezdez / pytuio

Automatically exported from code.google.com/p/pytuio
MIT License
2 stars 0 forks source link

touchlib TUIO #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Using a touchlib multitouch pad. (see www.touchlib.com/)
2. Run touchlib's OSC.exe to broadcast events in the TUIO protocol
3. Run pytuio's example1.py to print information on all TUIO events
4. Touch the pad to generate an event

What is the expected output? What do you see instead?

loaded profiles: ['/tuio/2Dcur', '/tuio/2Dobj']
list functions to access tracked objects: ['cursors', 'objects']
Traceback (most recent call last):
  File "C:\Documents and Settings\Richard\My
Documents\touchlib\pytuio-0.1\examples\example1.py", line 8, in ?
    tracking.update()
  File "C:\Python24\lib\site-packages\tuio\__init__.py", line 93, in update
    self.manager.handle(self.socket.recv(1024))
  File "C:\Python24\Lib\site-packages\tuio\OSC.py", line 253, in handle
    self.dispatch(decoded, source)
  File "C:\Python24\Lib\site-packages\tuio\OSC.py", line 265, in dispatch
    self.dispatch(msg)
  File "C:\Python24\Lib\site-packages\tuio\OSC.py", line 262, in dispatch
    self.callbacks[address](message)
  File "C:\Python24\lib\site-packages\tuio\__init__.py", line 107, in callback
    getattr(profile, command)(self, message)
  File "C:\Python24\Lib\site-packages\tuio\profiles.py", line 59, in set
    self.objects[sessionid].update(sessionid, message[4:])
  File "C:\Python24\Lib\site-packages\tuio\objects.py", line 43, in update
    raise UpdateError
UpdateError

I expect something similar to this (generated using reacTIVision TUIO
Simulator):

loaded profiles: ['/tuio/2Dcur', '/tuio/2Dobj']
list functions to access tracked objects: ['cursors', 'objects']
<Tuio2DObject 0, 179 degrees> 
<Tuio2DObject 0, 179 degrees> 
<Tuio2DObject 0, 179 degrees> 
<Tuio2DObject 0, 179 degrees>

What version of the product are you using? On what operating system?

Windows XP
pytuio 0.1
Python 2.4.4
Touchlib Beta v2.0

Please provide any additional information below.

How to make a very inexpensive multitouch pad with touchlib:
http://ssandler.wordpress.com/MTmini/

Original issue reported on code.google.com by rsg...@gmail.com on 2 May 2008 at 12:30

GoogleCodeExporter commented 8 years ago
Looks like touchlib sends 7 values instead of 5.  I'm not sure what the 
additional 2
represent.  This is the workaround I'm using: Change line 39 in objects.py to:
        if len(args) >= 5:

This way it ignores the additional values.  A better way would be to make the 
extra
values accessible if available.  Presumably they are useful for something.

Original comment by rsg...@gmail.com on 2 May 2008 at 4:33