Wiimote z position
Well, i recently downloaded the Wiiuse library for the Wiimote (i needed to calculate the depth info). i have been trying to figure what exactly the rx and ry are.
im always getting the same value for rx and x and also for ry and y.
Has anyone tried using the raw data? Or what exactly is meant by the raw data? because im getting the same value for both rx and x. ie both vary from 0 - 1024(my x screen resolution).
>>short rx, ry
>>Raw XY coordinates of the IR source as reported by the wiimote.
This is what i read in the Wiiuse documentation. But i don't get any difference between this and the x and y values.
Can anyone please provide some help?
Thanks.
Anyone? i tried searching on google, but i did not get much help. This is the only place i could see Wii related queries.
there were two sites i always used for my Wiimote-related questions: wiili.org, which has disappeared from the net; and this one
http://homepage.mac.com/ianrickard/wiimote/wiili_wimote.html
Your post is a little unclear, particularly as this isn't a Wiimote/Wiiuse forum. If you could put your query into simpler terms you might get more support.
Brendan
I have done a lot with the Wiimote but not with Wiiuse yet. The x y I have used ware strictly for IR and tricky. I had to space candles very carefully and experiment to get any readings at all as the two candles had to make a specific triangle with the wiimote IR camera to pick anything up.Distance & height were crucial. I'll try to find the Wiiuse today and take a peek. You probably are on top of the IR situation but I found it challenging. The bluetooth readings were much easier to deal with.
Thanks a lot Brendan and Robbie
@Brendan
Well, i tried searching for Wiimote related forums, but found none. The Wiiuse forums are down. i will look into the forum you suggested.
@Robbie and Brendan
i am trying to calculate the Z info using just one source. in my case, i have both the IR source and camera moving.
So, i thought of trying this:
Here is a pic of what i though of:
Now, from the triangle i can easily obtain OA.
What i wanted to know is, if i can find the raw x position. i could only get values in terms of my screen resolution.
@Robbie
>>I have done a lot with the Wiimote but not with Wiiuse yet. The x y I >>have used ware strictly for IR and tricky
Could you please elaborate a little. What did you mean by x and y were strictly for IR?
the software I have used delineated the bluetooth signals-pitch,roll, yaw, accelleration from the IR signals which they listed as x & y.
Maybe a different system from yours. I used a Wiimote Max patch and also the osculator for Mac.
If i did not have an IR source I got nothing for x and y as it is not related to bluetooth.
I looked at your image. Do you have two IR sources? I would think you would need two that are separated some distance to get more readings. Is it possible you get one reading because you are using one source? You can get four IR readings I understand (from messing with the whiteboard application).
would you need three(or four) IR sources to get the IR Z reading ? That is what I am wondering.
I don't understand getting screen readings. My values are always floating point and I have to adjust them to get anything very useful. I get from 0.234 to maybe .8 with the bluetooth and seems like less range with the IR (and it's trickier to control I find).
I found the IR readings to not be there and then boom they show when I am in range. Nearly off and on.
how many sources are you using for IR? and what type?
Thanks again.
Hmm what i though is, if i can get the "x" ie the exact distance in say meters or whatever real life units, from the point where the wiimote can detect, i can use that information to calculate the depth right?
But i guess its not possible, right? i mean since the wiimote uses internal image processing, it must return just the pixel values in its camera resolution or map it onto my virtual screen resolution right?
And, about the values returned by Wiiuse,
it returns the x and y positions of the IR source, from 0 to 1024(not floating point values unlike your case). So, when the IR source is in the visible range, it gives me a value of 0 to 1024. and 0 - 768(y resolution)
Now, i was wondering if i can actually get that real life x distance, which i could use.
PS:The biggest problem in my case is, both the Wiimote and the sources can be mobile, and the IR sources need not be a constant distance apart.
And, im using Candles as IR sources.
I would think you could work out an algorithm to compute something close to actual meters from your other numbers. If 1024 = .3 meters for example you could set up a translator into better numbers maybe ?
Are you using two or three ( or four) candles? I would think you would need a precise setup to get x y and z from three candles. Is one above perhaps and two on a tabletop?
have you looked at the whiteboard app? It might be very useful for depth coding as it seems to train the IR detection to a point in space and then work off of it. You get four points with it and I believe also the Z axis you are hoping for. You do have to "calibrate" it however which may be what you need for your purposes. A calibration for Z and then you are free to "move around the cabin...."
I am working towards something useful moving the IR sources and keeping the Wiimote IR camera in place. Nothing too successful yet. I have not attempted everything moving. I hope to use some IR LEDs that the stationary Wiimote camera would read for input. The IR camera L-R range seems problematic to me tho so far. Do you find this also or do you have it working well for a reasonable range of movement?
Have you tried the IR glasses yet? I think I will try them for input since it is a fairly easy hack on safety glasses.
good luck and let me know where you end up with all this!
Well, the values returned are as follows:
So, i cannot use the values 0 - 1024 since it gives the same values one the same line. ie say in the pic, it gives same value of x for all points on OA,
so i was thinking of getting the actual distance within the field of view?
Well, i thought of getting the depth info using just one IR source, but not successful yet.
>>The IR camera L-R range seems problematic to me tho so far. Do you find >>this also or do you have it working well for a reasonable range of >>movement?
No, the IR camera range seems to be really good. i actually can track upto
10 meters.
Yes, and i did go through Johnny Lee's projects.
PS:
i have not tried IR glasses. How costly are they? im a student, and i don't think i can afford it if it turns out to be costly.
you hack LED safety glasses to be IR LED safety glasses. very cheap!
I get a decent distance out of the IR camera but not so great L to R.
Seems I only had maybe 4 ft or something lateral movement at best. This from maybe 6 ft back. At 10 meters what is your lateral read? are you getting a wide field input that is pretty consistent? Maybe I just need more distance from the camera, but honestly 10 meters is way more distance than I will have to play with.
>>This from maybe 6 ft back. At 10 meters what is your lateral read?
What did you mean by lateral read? Because, via the Wiiuse library, i obtain values 0-1024(x resolution) that i can use for any purpose.
Can you please explain what you meant by that? i can get back with the details. i have the set up here with me. So, i can just check and let you know.
i just mean left to right motion range (vs forward or backward from the IR camera). Sorry if unclear on that. Your L to R inputs to the camera seem to be 1024 (L) to 0 (R) but I guess I'm asking in actual movement on the floor etc how far are you moving to get that as you back up.
Depth tracking from an IR camera could be done either by looking at the size of the blobs that the camera is tracking and/or by how far apart blobs are (relative to some known expected distance). How accurate blob size will be alone is debatable, and the values may be dependant on lighting and the sources you are using.
I have no idea how wiiuse works however and what it returns. The IR camera has several modes, and the blob tracking is done in the wiiremote, but depending on what mode the camera is in only certain info is passed back via bluetooth. A good source for info on the remote which details all of this can be found at :
wiibrew.org
@ Robbie - All the values are transmitted via bluetooth, so it doesn't really make sense to talk about bluetooth values as such. The wiiremote has in it accelerometers, buttons and an IR camera (with internal tracking (and also a speaker, a rumble device and some memory)- so it is probably a lot clearer to talk about which of these you mean than bluetooth (which is the method used to transmit data to/from the remote).
Alex
Ok, got it.
i just checked it out: these are the readings i got:
My z distance: 5 metres(little more than 4.5m).
The range ie x - y was about 3 to 4 metres.
My place is small, and im not able to go beyond that right now.
But currently, im getting proper values:
ie
0 : 0m (Left)
1024 : 3.5m(Right)
@Alex
Thanks for the reply
>>Depth tracking from an IR camera could be done either by looking at the >>size of the blobs that the camera is tracking and/or by how far apart >>blobs are (relative to some known expected distance).
Well, i was hoping to find some way, by which i can use just one IR source(blob) to track down the Z info. All places i looked up, use 2 blobs. So, i was wondering if at all its possible with just one.
@Alex
I guess I meant that the Roll Yaw Accel values are reacting to the bluetooth receiver whereas the IR signals are dependent on the locatoin of IR sources to read. Yes I guess all signals are sent via bluetooth but the non-IR values (Roll Yaw etc) are dependent on the location of my laptop bluetooth antenna vs the IR signals which respond to candle/IR LED locations.
Potentially. The size info for the blob may give you a rough idea (although it may not be a good enough indicator. I forget the value range for this parameter.
Wiiuse may or may not report this. It is reported in one of the more extended modes of the IR camera. The aka.wiiremote objects reports this data when sent the irraw message.
I have been working on a more reliable version of aka.wiiremote. It is much more stable. The IR stuff is (and will remain for some time) unaltered from the aka.wiiremote version, except that I always boot the camera into a mode that gives more info than the basic mode (including size reporting).
There is a thread about this here:
Get in touch if it interests you.
A.
That looked interesting. But im working on a Windows platform, so im afraid that will be helful to me.
Can you please tell me if there is a way to hack into the wiimote, and obtain the size of the data. (The Wiiuse does not have a provision for this)
So, is there a way i can try to get that info?
Ah - sorry.
You might be best off either requesting that feature from the wiiuse developers, or looking for a different wiiremote library (there are various java based solutions for instance.
To "hack into" the wiiremote and retrieve the data, requires a full set of functions for communicating with the device (basically you would need to write a new library), so it doesn't make sense to start from scratch. If you have java or c skills perhaps you could work from someone else's basic library (and extend the IR support), but if not you'll need to find someone else who's already implemented that functionality.
A,
Well it looks like using two sources is my only option.
Thanks a lot for the support!