1 of 4
1
[Solved] TUIO: "too many arguments"
Posted: 04 December 2008 01:45 PM   [ Ignore ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

Hello everybody,

This is my first message here, but I’ve already read a lot - there are many helpful things here smile

Currently I’m coding an (whiteboard-like) application for my School (as part of a A-Level work, “Maturarbeit” in Switzerland), and today I’ve tried to integrate tbeta: I’m using the code from http://mtg.upf.edu/reactable/?software -> TUIO_CPP to process the tuio-packets.
There’s a demo program called tuioDump, wich simply prints the packets to the command line. This works fine with the tuio-simulator from the same site, but when I launch tbeta and send tuio-packets, it gives me the following error:

error while parsing message: /tuio/2Dcurtoo many arguments

Has anybody of you worked with this code? Or is there somebody who has experience with tuio/tbeta?

greetings and thanks,
Samuel Bryner

ps: excuse my English, it isn’t so good wink

 Signature 

/* no comment */

Profile
 
 
Posted: 04 December 2008 02:44 PM   [ Ignore ]   [ # 1 ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

thanks to a friend who had the same problem with pytuio I could resolve the problem (at least partially):

in TuioClient.cpp, around line 174:
change

float xposyposxspeedyspeedmaccel;

args >> s_id >> xpos >> ypos >> xspeed >> yspeed >> maccel >> EndMessage;

to

float xposyposxspeedyspeedmaccel;
float tmp1tmp2//workaround for tbeta

args >> s_id >> xpos >> ypos >> xspeed >> yspeed >> maccel >> tmp1 >> tmp2 >> EndMessage;

This reads two extra arguments, so tbeta-tuio-packets should be parsed correctly. Unfortunately, tuio_simulator doesn’t work anymore with this solution…

see also http://code.google.com/p/pytuio/issues/detail?id=2 for the issue with pytuio

 Signature 

/* no comment */

Profile
 
 
Posted: 04 December 2008 02:45 PM   [ Ignore ]   [ # 2 ]
Avatar
RankRankRankRankRankRank
Joined  2007-04-08
Total Posts:  2539
Dedicated

Tbeta is sending, ID, x, y, X, Y, m, height, width.

So you’ll have to edit the parser to match that amount of arguments which probably only has up to ‘m’.

Can you put in an if statment? If (args > 6) {float temp1, float temp2, etc. }else{ }

 Signature 

MTmini, MTbiggie, & Audiotouch creator & Community Core Vision Co-founder

Follow on:
My Blog | Facebook | Twitter | Youtube

Profile
 
 
Posted: 05 December 2008 06:31 AM   [ Ignore ]   [ # 3 ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

thanks cerupcat, it works now both with tbeta and tuio_simulator smile

float xposyposxspeedyspeedmaccel;
float widthheight//tBeta sends more informations

if(msg.ArgumentCount() == 9)
{
    args 
>> s_id >> xpos >> ypos >> xspeed >> yspeed >> maccel >> height >> width >> EndMessage;
}
else
{
    args 
>> s_id >> xpos >> ypos >> xspeed >> yspeed >> maccel >> EndMessage;
}

the first argument is “set"/"alive"/"fseq" etc., hence the “9”

 Signature 

/* no comment */

Profile
 
 
Posted: 15 January 2009 09:52 AM   [ Ignore ]   [ # 4 ]
Avatar
Rank
Joined  2008-04-25
Total Posts:  41
New Member

i was follow this yeah it works for minute then always crash! it says “assertion fail iterator list cant be decrement”
any clue for this?
iliis can you upload your succeed source Tuio CPP.?

Profile
 
 
Posted: 15 January 2009 01:36 PM   [ Ignore ]   [ # 5 ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

hm… maybe you mistyped something. From which program are you receiving TUIO-packets? Which compiler you use?

Try to compile TUIO_Dump and look if this works.

EDIT: also worth a try is the TUIO_Simulator from reactable.

File Attachments
TuioClient.zip  (File Size: 4KB - Downloads: 709)
 Signature 

/* no comment */

Profile
 
 
Posted: 24 January 2009 08:47 PM   [ Ignore ]   [ # 6 ]
Rank
Joined  2008-10-21
Total Posts:  4
New Member

Hello all,
It the first time I post a comment in this list , but I read many posts and have learned many many things from you all , thanks a lot for that.
Thank you very very much also for the tBeta and the Reactivison/Tuio development teams : you are my heros !!

It would be very cool now if someone can introduce that Tbeta extra parameters handling in the Max/MSP and QuartzComposer Tuioclients .
By my side, I go to have an eye into the Max manual and try to introduce that new TuioClient.cpp file into the xproject folder to compile and updated the client for Max .... but any advice/help will be appreciated as I am a newbie in this side of the Max stage.
I think it can also be easy for he QC plugin ...

thanks

Profile
 
 
Posted: 29 January 2009 05:21 AM   [ Ignore ]   [ # 7 ]
Avatar
Rank
Joined  2008-12-15
Total Posts:  66
New Member

Great!

Just now I got this message : too many arguments..hehe I have downloaded your zip, I’ll test right now. Thank you!!

BTW: Can I put the osc and TuioClient in different pc? If yes, where to configure IP ?
And...it use UDP to send data, it’s faster than TCP, but in theory, there maybe have mistake in data, how do you think about this?

Profile
 
 
Posted: 29 January 2009 05:43 AM   [ Ignore ]   [ # 8 ]
Avatar
Rank
Joined  2008-12-15
Total Posts:  66
New Member

ohhh..Looks like TuioClient has so many bug.

In my short test, it came out several kinds of error, not only with osc, but also with TuioSimulator.

One finger works fine, two or more than two finger, easily popup a error, mostly about list

My test based on TUIO_CPP-1.4pre2 and TUIO_Simulator-1.4pre2.

Profile
 
 
Posted: 29 January 2009 10:18 AM   [ Ignore ]   [ # 9 ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

@zoomak:
Unfortunately I don’t know anything about Max, but writing programs in C/C++ with TUIO is easy when you use the TUIO_client.
However I think this thread is the wrong place for your issue, maybe you should open a new thread.

@summer:
Well, I’ve never tried to send the packets over a network, but I don’t see why I shouldn’t work… (of course you have to configure your firewall etc.)
Imho is TCP aproximately as fast as UDP, at least over LAN.

I’ve never had any other problems with Tuio_client and simulator besides the “too many arguments"-error. Your Versions seems to be a beta-version, maybe it’s because of this… If you want, I can send you my versions.

 Signature 

/* no comment */

Profile
 
 
Posted: 29 January 2009 11:12 AM   [ Ignore ]   [ # 10 ]
Avatar
Rank
Joined  2008-12-15
Total Posts:  66
New Member

iliis: Thank you , I download my tuio_client and simulator from this page: http://mtg.upf.edu/reactable/?software#files

I attached the screenshot about the error.

In my test, I tested in very “crazy” way, press many fingers and move very fast, you can call it Stress Testing.

In the beginning, I wanted to test what is the max finger count it can support, but even 2 fingers it can’t pass....

Image Attachments
1.JPG
Profile
 
 
Posted: 29 January 2009 06:55 PM   [ Ignore ]   [ # 11 ]
Avatar
Rank
Joined  2008-12-04
Total Posts:  20
New Member

ah, well, the MS-compiler has a somewhat different (less error-tolerable) implementation of the STL-Containers.

Imho, you have two options to solve this:
- You go over the code and fix things like

(*someiterator)->doSomething();

to

if(someiterator != list.end()){(*someiterator)->doSomething();}

I don’t really know where the problem is. Maybe it is just one line, but it can be a “general” Problem. If you know how the STL works, I think this is the better solution, because you can help the reactable-team and others who want to compile this code with MSVS
- The other way is that you simply install MinGW… (Or even better: You install Linux wink)

 Signature 

/* no comment */

Profile
 
 
Posted: 08 February 2009 06:28 AM   [ Ignore ]   [ # 12 ]
Rank
Joined  2008-09-22
Total Posts:  19
New Member

Hi,

I’ve been debugging a little bit and I’ve discovered the program crashes on line 190 in TuioClient.cpp

delete *closestCursor;

I’m not sure why this pointer/iterator, sometimes, doesn’t have its path. I don’t know the exact conditions to make the program crash :(

I’ll try MSVS2008 (I’m working with 2005) and MinGW.

 Signature 

http://spherik.blogspot.com/

Profile
 
 
Posted: 08 February 2009 02:56 PM   [ Ignore ]   [ # 13 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member
Spherik - 08 February 2009 06:28 AM

Hi,
I’ve been debugging a little bit and I’ve discovered the program crashes on line 190 in TuioClient.cpp

delete *closestCursor;
.

Hello Spherik,
you should use the latest CVS code for the TUIO clients, I think I eleminated this bug some while ago.
I am planning to do a new pre-release which eventually should become the final 1.4 release soon.
best, Martin.K

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
Posted: 08 February 2009 08:45 PM   [ Ignore ]   [ # 14 ]
Rank
Joined  2008-09-22
Total Posts:  19
New Member

Hi,

Uops! I’ve downloaded the code from CVS but I get the same problem with lists. I get the same error message as Summer. Maybe it’s the modification I’m using to get the messages from tbeta (iliis one)?

Thank’s!

 Signature 

http://spherik.blogspot.com/

Profile
 
 
Posted: 08 February 2009 08:57 PM   [ Ignore ]   [ # 15 ]
Avatar
RankRankRank
Joined  2008-06-16
Total Posts:  330
Sr. Member

Mmh, well I hoped I had fixed that problem already.
Please let me know where your code crashes now.
I really wanted to get the release out soon, so that bug doesn’t help of course.
many thanks for the heads up!
Martin.K

 Signature 

TUIO community site: http://www.tuio.org
reacTIVision framework: http://reactivision.sf.net
TUIO & reacTIVision CVS: http://sf.net/projects/reactivision
reacTIVision forum: http://sf.net/apps/phpbb/reactivision

Profile
 
 
   
1 of 4
1