Reducing wiimote pitch/roll variations
Asked Answered
E

2

1

I want to use the wiimote to control a cursor WITHOUT the infrared sensor bar. I'm using the pitch and roll values for this. The problem is that when the pitch is close to 0 degrees, the roll is very unstable, and when the pitch is close to 90 degrees, it is itself very unstable, but the roll is fine. Im polling the wiimote very frequently, so im averaging the last 20 values for both pitch and roll, and I can get the cursor to go where I want. The only problem is that there is still alot of uncontrolable shaking. Any ideas on how I can reduce it? (Or even get a more precise position without the IR sensorbar?)

Thanks!

Dave

Electrodynamics answered 16/2, 2011 at 0:1 Comment(1)
No idea if this would help, but have you looked at the wii motion plus add on (in fact you can wiimotes with it built in now)Lassitude
A
5

This is a common problem with pitch and roll. You can reduce this annoying effect but you cannot get rid of it as long as you are using pitch and roll (Euler angles). Look at 38:25

http://www.youtube.com/watch?v=C7JQ7Rpwn2k

I use rotation matrices instead of Euler angles in my motion sensing application. For an introduction to rotation matrices I recommend:

Direction Cosine Matrix IMU: Theory

Quaternions are also very popular and said to be the most stable.

Acinaciform answered 16/2, 2011 at 0:48 Comment(3)
Thanks, ill take a look at these and come back with results!Electrodynamics
I ended up using the rotation matrices like you suggested. Plus I compensate for the accelerometer, and the tracking is actually not too bad! Also, I poll the wiimote as fast as I can on a seperate thread and average up the 100 last values. thx!Electrodynamics
Yes, rotation matrices are easy to understand and to work with. Good luck!Acinaciform
S
-1

A simple (some times simple is the best) solution would be average out your readings.

Buffer the last, say five readings, and then take the average of those as your value. Their will be a slight delay between being flat and being quickly rotated, but for a cursor will result in a slight, sort of friction almost, it will sort of resist sudden changes.

Salmonella answered 16/2, 2011 at 0:31 Comment(2)
If you read the question, I mention that I average the last 20 valuesElectrodynamics
oh yer. don't knw how i missed that, sorrySalmonella

© 2022 - 2024 — McMap. All rights reserved.