We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProcessing DevelopmentLibraries,  Tool Development › wrj4P5, WiiRemote P5 Library - Alpha
Pages: 1 ... 6 7 8 9 10 ... 16
wrj4P5, WiiRemote P5 Library - Alpha (Read 93293 times)
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #105 - Jun 21st, 2008, 9:43am
 
The wrj4P5 is working fine for me on XP.
No problem to catch RimokonEvent events or to analyse rimokon position with rimokon.senced ... that's fine.

But I'm now trying to analyse pointing values. I'm able to catch datas (rimokon.irLights) when the sensorbar is on. But this datas are very unstable. For what I've understood, there 4 vectors value corresponding to the 4 IR sources.
The value are different but I'm able to detect a general mouvement when observing them, even if they are not at the same position (of course the IR sources are not at the same position).
The problem is that the rimokon.irLights[0] do not correspond to the first IR source, but to a different one at each initialization, and the initialization remade all the time. So I'm not able to find a stable position because most of the time 1, 2 or 3  rimokon.irLights values are set to (-1,-1).
Do anyone have a good result for this ?
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #106 - Jun 21st, 2008, 4:30pm
 
hi poub007

poub007 wrote on Jun 21st, 2008, 9:43am:
The problem is that the rimokon.irLights[0] do not correspond to the first IR source, ...

some discussion was done around your trouble, see
http://processing.org/discourse/yabb_beta/YaBB.cgi?num=1186928645/45

my test with two candles seem to be good
http://www.geocities.jp/classiclll_newweb/IR_Sensor_Test/applet/index.html
with our eyes.

irLights[i] is the result of the blob detection on the WiiRemote's IR-Camera performed by Wiiremote's hardware.
so the order of irLitghts[] may be according to spot position, left-top -> right bottom on the image of the IR-Camera.
this means
1. small roll form horrizontal position will cause the index swapping.
2. lights[1] will be switched to [0] when lights[0] is out of frame.
i think what you can do is to distinct the light source by the previous position, rather than each previous indices.
(i'm thinking about the "trackedIrLights" class.)

...btw...
poub007 wrote on Jun 21st, 2008, 9:43am:
to analyse rimokon position with rimokon.senced ... that's fine.
pls use rimokon.sensed rather than rimokon.senced.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #107 - Jul 1st, 2008, 5:04pm
 
Hi all,

what you find below is an error I get compiling a processing sketch. This sketch is used to grab the IR data coming in from the wiimote.

Unfornately I'm a newbie to processing and java, thus I really don't understand the type error.
Further below you can find the entire processig sketch
Can anyone help me out?
Thanks!

Giovanni

ERROR:

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: processing/core/PApplet
at lll.wrj4P5.Wrj4P5.prepareReflection(Wrj4P5.java:172)



PROCESSING SKECTH:

import lll.wrj4P5.*;
import lll.Loc.*;
Wrj4P5 wii;

void setup() {
 size(1024,768);
 wii=new Wrj4P5(this).connect(Wrj4P5.IR);
}

void draw() {
//  if (wii.isConnecting()) return;
 background(0);
 translate(width/4, height/4);
 noFill();
 stroke(128);
 rect(0,0,width/2,height/2);
//
 noStroke();
 fill(255,128,128);
 for (int i=0;i<4;i++) {
   Loc p=wii.rimokon.irLights[i];
   if (p.x>-1) {
      ellipse(p.x*width/2, (1.-p.y)*height/2, p.z*50, p.z*100);
   }
 }
}
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #108 - Jul 1st, 2008, 5:52pm
 
somebody knows this error¿? The problem is the wiimote¿?¿? or the version of widdcom?
The error is:
Exception in thread "Thread-3" java.lang.NoSuchMethodError: wiiremotej.WiiRemote.setIRSensorEnabled(ZI[B[B)V
at lll.wrj4P5.WiiRimokon.addTalker(WiiRimokon.java:84)

One think: Processing detects the wiimote and the signal os the buttons, but the signal of accelerometers the program does'nt recognize.

Thanks.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #109 - Jul 6th, 2008, 6:51am
 
sorry for too late.
>Giova
your sketch seems to run well.(with IR spot size and w/o any extensions)
what your env.?(OS ver., P5 ver., JRE ver, WiiremoteJ ver, jsr082lib ver., BTStack ver. and Wrj4P5 ver.)
i think your classpath setting might be wrong, but no idea now.

>marcgalvez
i ask the same things to Giova, and put the part of your code around below.
  wii=new Wrj4P5(this).connect(....);
i'm wondering the reason of being "ZI[B[B)V"  on ... setIRSensorEnabled(ZI[B[B)V ...
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #110 - Jul 6th, 2008, 1:38pm
 
the code is your example myfirstwii... in other pc with the same installation runs well, but at now not runs ok... i don't understand.. i thing that the problem is the bluetooth dongle....
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #111 - Jul 6th, 2008, 1:54pm
 
one thing... What version of widcomm bluetooth you use ClasicIII¿?¿? Where can I download it¿?¿?

Thanks!!!
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #112 - Jul 6th, 2008, 3:34pm
 
hi marcgalvez
"NoSuchMethodError" exception may occur from the inconsistency of revisions.
what your version of wrj4p5, WiiremoteJ, jsr082, BTstack?
* both of good and bad cases, this is a valuable feedback for me.

my BTdongle and stack are following, using on both WinXP and OSX-tiger(PPC).
HAGIWARA SYS-COM / HNT-UB03 / BTW3.0 (WIDCOMM)
the stack was bundled to HNT-UB03.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #113 - Jul 6th, 2008, 3:56pm
 
hello ClasicIII,

I do exactly the same that do TM in this discourse. use bluecove 2.0.2 because i don't follow 2.0.1...
and where can i download a correct version of widcomm??

versions:

wrj4p5 - link of page 2 of this discourse post of TM
Wiiremotej - link of page 2 of this discourse post of TM
Btstack¿?¿? widcomm bluetooth 5.0.1.801
bluecove 2.0.2( this is jsr82 no¿?)

OS: win XP version 2 professional
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #114 - Jul 6th, 2008, 3:57pm
 
a lot of thanks!!
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #115 - Jul 6th, 2008, 4:35pm
 
marcgalvez
marcgalvez wrote on Jul 6th, 2008, 3:56pm:
and where can i download a correct version of widcomm?
see the kspksp's post at the start of the page 5 of this topic.
http://processing.org/discourse/yabb_beta/YaBB.cgi?num=1186928645/60#60
but i don't test that by my self.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #116 - Jul 10th, 2008, 7:11pm
 
Hello Classiclll,

first, thank you for your work, it really works well. Smiley

What I want to do is to read and write the data of the Mii's from the Wiimote. Is there a way of doing this with your library? I have seen that WiiremoteJ uses some methods of reading and writing. How can I call these methods from P5?

Any help would really be great!

Thank you.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #117 - Jul 12th, 2008, 5:39am
 
hi tino

the functionality of reading/writing from/to Mii is supported by the class WiiRemote of the WiiremoteJ Lib.
the reason i omit this functionality is
1 less needed one for P5's sketches, and
2 avoiding the conflict between WiiremoteJ's asynchronousity and P5's implicit iteration (draw loop).
anyhow, Wrj4P5 is a wrapping class, so it is easy to give you the instance of class "WiiRemote" of WiiremoteJ lib.
is this meeting your needs?

now, my todo is
1 designing "Rod"(model of line on 3D space)
2 designing "Tag"(model of plane on 3D space)
3 designing "Ship"(model of attitude and local coordinate)
4 designing "Loc4P5"(sttatic utls. for drawing with Loc/Rod/Tag/Ship)
5 thinking about "trackedIRspots"
6 wrapping and testing the Balance Board functionality of WiiremoteJ v1.5
and
7 adding getWiiremoteJsInstance() to class Rimokon.
so please wait for some weeks.

or, you can modify the code of class "Rimokon" to get your own instance.
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #118 - Aug 4th, 2008, 7:23pm
 
Hello,

I've received the same error message as Giova.

Code:

Exception in thread "Thread-2" java.lang.NoClassDefFoundError: wiiremotej/event/WiiRemoteDiscoveryListener

at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)

I'm trying to execute the MyFirstWii script.

Here's my my system info:

 OS:  Windows XP Pro, SP3
 Java:  JDK 1.5.0 R16
 Bluetooth Stack:  Blue Soleil 5.5
 Bluetooth Device:  Unknown, but works with Blue Soleil 5.5 and GlovePIE

And configuration:

 Processing:  143 w/ Java
 Loc:  beta-003
 wrj4P5:  alpha-005
 JSR82:  bluecove-2.0.2.jar
 WiimoteJ:  v1.0


I tried using Processing 135 Without Java, but this did not work.

Any advice would be greatly appreciated.  For now I'll try downgrading JSR82 and upgrading WiimoteJ till something works Tongue
Re: wrj4P5, WiiRemote P5 Library - Alpha
Reply #119 - Aug 5th, 2008, 5:55am
 
hi
BlueSoleil5 doesn't support the L2CAP protocol on bluetooth.
pls try one of the following
-use widcomm instead of bluesoleil (most successful, see above reply)
-use avetana (free trial for 14days)
-use old bluesolei instead of your one
any feedback is appreciated.
tnks

*notes
alpha-004,-005 are meet to WiiremoteJ v1.2,v1.3,v1.4
alpha-001,002,003 are meet to WiiremoteJ v1.0,v1.1
and making 006 for WiiremoteJ v1.5, api change and support balance board.
Pages: 1 ... 6 7 8 9 10 ... 16