Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - JayAr

Pages: 1
Project Ideas / Re: 6 DOF based physics games
« on: March 23, 2011, 10:35:39 AM »

so the first video shows the ping pong game and the player. Sorry, it starts after 10 seconds:


The second video shows the billiard game:


The controls are simplified, meaning the player can only aim when holding the A-Button, afterwards he can only push the Queue forwards or backwards. I chose to simplify the controls, because it would be too hard to hit the ball on the right position and orientation, if you would have 6 DOF, instead of, well 1 ;O

Project Ideas / Re: 6 DOF based physics games
« on: March 15, 2011, 06:04:52 PM »
Hi, all problems seem to be solved now! The tracking actually works pretty good.

There were issues with the camera calibration (with the EasyCameraCalibration Tool). You need a calibration plate with 4 Infrared LEDs and you make multiple pictures of those IR-LEDs in different orientations with one Wiimote. This gives you internal and external camera parameters. What I did wrong in the beginning was, because I wanted to calibrate two cameras, I made pictures of the calibration plate, with the constraint that both cameras have to actually see the calibration plate. The problem with this approach is, you cant turn the plate in extremely different orientations, because then theres always one wiimote which cant see the leds. But actually I need only ONE picture where both wiimotes can see the LEDs, and this picture gives you the external camera parameters (the calibration plate is actually the origin of the world coordinate system).
So now I make ONE picture with both cameras seeing the calibration plate. And the other pictures I make for only ONE camera at a time, so now I can turn the calibration plate in extreme angles.
Therefore the calibration works really good, and there is no jittering when Im far away. It only jitters when I move to the left or to the right, but the games actually dont suffer much from this.

So now I can go pretty far away from the cameras.

Plus I use two InfraRed LED Arryas (one for each wiimote) and reflective material (no reflective tape, this didnt work for me, I use reflective stuff from the bike shop;) It works really good with that).
And i made kind of an egg shape which I put on the top of the Wiimote and on this eggshape I put the reflective material. The eggshape looks pretty stupid, but it works good, because now the Infrared Cameras can track the egg shape very good, so you can hold the Wiimote in almost all angles, and the cameras dont loose the object they should track.

Maybe I post some videos at some time.

Project Ideas / Re: 6 DOF based physics games
« on: March 06, 2011, 07:42:35 PM »
Hi thanks for the ideas.

I tried the script in GlovePie which should change the Wiimote IR sensitivity, but it didnt really improve anything... I dont know if I did something wrong there.

Yes I saw the AILive demo, and I dont really know how they do tracking. Have you seen any documentation on how they do it in this demo?
What actually do you mean with "the sensor" on the TV? Do you mean the Sensor Bar? Would this be some "structur from motion" approach, where the IR Camera of the Controller is moved in space and therefore you get multiple pictures from which you calculate the 3D position? So only one IR-Camera and one Sensor Bar?
What exactly does the Kalman filter do?

Well to update what I did: In the beginning I used Stereo Tracking with 2 Wiimote-IR-Cameras, but the setup was the Cameras lying on the table with parallel axes. So the triangulation was very simple to calculate.
The problem was, when moving an IR Diode in y- or z-axes, the tracking was pretty good, but when I moved it in x-Axes (parallel to the image plane of the IR-Cameras) there was some serious jittering.

Now I dont do axes parrallel tracking anymore, but (I dont know if the word in English applies) convergent tracking, meaning the Wiimotes are angled towards each other (different orientation), and are quite distant from each other.
I show you an image wich makes the setup pretty clear:

 So first I do camera calibration with a tool called "EasyCalibrationTool" ( This gets me the internal and external camera parameters of the Wiimotes.
With the help of the internal and external parameters I calculate the position of the IR-Diode in world space coordinates.
But actually this kind of helps a little, meaning there is less jittering when moving the Diode in the x-Axes, but I was hoping it would reduce the jittering more.

But I saw some Algorithm now which could improve the calculation of the world space coordinates by minimization, at least I hope it does.

And I wonder if the Kalman Algorithm could help, or if it only applies to using ONE camera only??

Project Ideas / Re: 6 DOF based physics games
« on: January 09, 2011, 08:48:09 PM »
I tried it with IR LEDs on the Wiimote, but I want to try out IR-Array with reflective tape now, because I hope that the tape gets tracked under most Angles with which I hold the Wiimote against the Cameras

Project Ideas / 6 DOF based physics games
« on: October 22, 2010, 06:23:56 AM »

right now I'm trying to build a simple sports simulation (Baseball at the moment) with 6 Degrees of freedom.
To track the orientation of the Wiimote I Use Motion Plus which is supported by GlovePie.
For tracking the position I'm trying to do stereo tracking with two other Wiimotes, so 3 Wiimotes are used in the end.

I put IR LEDs on the Wiimote which should get tracked.

As a graphics engine, I use Ogre3D. This is actually not a game engine but only graphics but you can import all kinds of libraries. So for the physics I use the Bullet library, which works pretty good (documentation is not so good, however).

Right now I only have a baseball bat and can smash objects around ;), but I want to build some other applications like billiard or badminton/tennis. Maybe something where you have to push things around would be a good demonstration if the position tracking.

The orientation works ok with MotionPlus. The tracking works somehow, but a big problem is, that the viewing angle of the Wiimote is very small, so I need to stand far away to be able to make big movements. But the the IR LEDs (Vishay 6400) arent tracked so well...
So right now I have to build a good device to put on the Wiimote with lots of LEDs  that get tracked by the two other Wiimotes.

I only tested with coin cell batteries so far? Are those two weak so will it be better with real batteries?

Also one thing I noticed. The Wii Sports Resort Swordfight Demo is kind of a reference for me. I notice that the swords orientation is tracked very well, and the recalibration of the orientation of the sword is very good there.
If you rotate with MotionPlus for a long time the orientation gets wrong after a while, so the sword recalibrates when you move slowly. I also do this recalibration. Yaw gets recalibrated by pointing to the sensor bar. Pitch and Roll can be recalibrated, because GlovePie supports a value of the Wiimote which can track Pitch and Roll if your not moving too fast. So I use this value for recalibration of Pitch and Roll.
However, I fear that the full potential of MotionPlus is not supported enough by GlovePie. In an Iwata (President of Nintendo) Asks Interview he stated, that MotionPlus would support different sensors depending on how fast you rotate the Wiimote. So in Wii Sports Resort you can move the sword really fast for a pretty long time and it still points in a good direction, so the orientation doesnt get off so fast. I really wonder if its GlovePie which doesnt support the sensor which tracks fast movement, or if Im doing something wrong.

Edit: Ping Pong:


Other / Vishay 6400 for non reflective usage
« on: August 18, 2010, 03:24:40 PM »

I want to put some IR LEDs on the Wiimote and have them tracked by two other Wiimotes. So I'm not using any reflection of the IR light, but have the LEDs directly tracked.

Now I read somewhere that the Vishay 6400 is good for Interactive Whiteboards, where the Pen points at a board, and the reflection is tracked by a Wiimote IR Camera. I was also told that the Vishay 6400 does not have a very wide viewing angle, which is actually good for the reflection at the end.

But since I dont need any reflections at all I wonder now if the Vishay 6400 is also good for my setup, or if maybe I should go for a bigger viewing angle with some other LED??


I am using Glovepie at the moment to get data from Wii MotionPlus, and it works fine.

But is there also a good support for MotionPlus with WiimoteLib now? The last update seems to be from 2009 and they say WiimoteLib can find MotionPlus but cant use the data in a useful way. I wonder if anything has changed since then, but couldnt find anything about it.


Ok that makes a lot of sense. Thanks for answers, I will look into finger and headtracking more and see what fits best for me. I guess the 2 Wiimote / 1 LED-Tracking is the way to go.


This is the simple code I'm using:

var.Yaw = Wiimote.Yaw
var.Pitch = Wiimote.Pitch

midi2.Control30= (EnsureMapRange(var.Pitch, 90,-90, 0,1))
midi2.Control31= (EnsureMapRange(var.Yaw, -45,225, 0,1.5))


Seems like you get the Yaw and Pitch not from Motion Plus but from the Wiimote...
Are you using Glovepie?
I think it should be something like:


or Wiimote.MotionPlus.GyroYaw ...

Ok, but then in my case I would use 2 Wiimotes to track and one to move around (because I still want the orientation), and on this Wiimote I put an IR LED, so then I would use 3 Wiimotes. ;)

So is it not possible to track the translation of two infrared LEDs with one Wiimote, like in the headtracking video?


Yeah, you can use a sensor bar but that is assuming the orientation of the sensor bar is always fixed.

You may want to try using two Wiimotes to get 3D coordinates of the point you are tracking.

Boon Jin
Yes I also thought putting one Wiimote on the desk and use it to track the other Wiimote and putting two Infrared Lights on the Wiimote which I move around. But then the orientation of the "Sensor Bar" is not fixed. But why should it be fixed anyway?

I guess that as soon as there are errors, the errors accumulate and get worse over time, so maybe the accelerometers are not accurate enough for calculation of the translation.

I wonder if we can can get the translation with the sensorbar (IR-Tracking) like in this video from Johnny Chung Lee, where he dows headtracking:

I havent used the sensorbar with Glovepie yet.

I'm using GlovePie with the Wiimote and MotionPlus.
With GlovePie it is easy to get the Rotational Speed (Pitch/Yaw/Roll) in any of the 3 Axes and therefore the Orientation of the Wiimote.

However is it also possible to get or calculate the Velocity in X/Y or Z when moving the Wiimote linear (without Rotation). With this Velocity I could calculate the translation/position of the Wiimote.
I tried to calculate the Velocity from the Acceleration (in Glovepie the Acceleration is called Wiimote.RelAccX for X Acceleration without gravity), but I couldnt really manage to get the velocity from it.
I guess this is a lot harder to do, than to get the Velocity of Rotation from the Gyrosensors, since gravity messes everything up and once there are small errors the velocity doesn't go back to zero when the Wiimote stops. Also the accelerometers for X/Y/Z also react when the Wiimote is just rotating, which also messes everything up.

So could you please tell me if its not possible at all? However in this video ( it seems that AILive have nailed it, since they are showing real 1:1 movement somehow. The sword can be stabbed forward for example. So somehow they must be able to calculate the position of the Wiimote with Orientation and Translation. I can only get Orientation at the moment.


P.S.: By the way I tried using the simple formula

v(t) = v0 + a*t

which should work for constant acceleration, but I thought it should work for changing acceleration also when it calculates 100 times per second.

Pages: 1