Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
285 views
in Technique[技术] by (71.8m points)

c++ - Reducing wiimote pitch/roll variations

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...