Announcement

Collapse
No announcement yet.

motion plus yaw implementation!

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • motion plus yaw implementation!



    OK.. So I have used the wiimote (with OSCulator, of course!) in all sorts of crazy interactive video work where i am triggering things with buttons and the accelerometers are moving things around and all that.


    Now i have a wii motion plus, and i am foaming at the mouth to have such an accurate and immersive physical input device... i gotta get that yaw baby!


    BUT... i have noticed that the midi signal being sent from the YAW of the motion plus, is different than the signal coming from the ROLL or PITCH from the motion plus!


    the Pitch and Roll stay at middle values unless you move them... but the YAW.. the yaw is slowly cycling up and down between 1 and 127... and the values change rapidly up or down depending on how you move it along the yaw axis....


    SO... programming wise.. how to I turn this constantly changing value into something I can USE?


    do i use some kind of comparator? where if the value of the change is much higher than it should be i get a "you Yawed it to the right" situation, and if the value is much lower than it "should" be i create a "you YAWed it to the left" situation?


    is this my entry into vector mathematics programming?


    I should have paid attention in calculus.


    aight yo,

    rr


  • #2


    Hey RR,


    The Yaw should indeed stay at the same value if the remote is not rotating.

    If the Wiimote is laying on a table, the yaw parameter can be thought of something similar to the needle of a compass.


    What you are seeing here is a bad calibration of the MotionPlus. The Pitch and Roll attitude angles are protected from drifting with filters that use accelerometer data. Yaw is not protected so a good calibration is needed if you don't want to see too much drifting.


    When calibrating, OSCulator checks that the Wiimote has not been shaken too much to ensure that calibration values stay within a reasonable narrow range. If this range was even narrower, the calibration would have been better, but chances are you would be spending a lot of time getting the Wiimote perfectly still.


    Try to put the Wiimote on a still surface before connecting it, and press the 1&2 buttons to connect it. Make sure it doesn't move. When the calibration process is over, take a look at the Quick Look window for the yaw angle. You will see the drifting is less pronounced, but still present. This is an inherent property of gyroscopes, they drift and unless you use another sensors to correct that drifting, there's nothing you can really do about it.


    One solution would have been to use the IR bar to protect from drifting, but when used on stage the Wiimote could catch the tungsten lights that emit light in the IR spectrum, which would give birth to new problems, so this solution has been avoided for the moment.


    There is a workaround, though: If you need the angles to be reset, you can use the "MotionPlus Reset". Assign it to a button, and when you press that button, angle parameters are reseted to the current remote orientation. Keep in mind that when used in games, Wiimote gestures are only used during a short period of time. In OSCulator however, you get that stream of data during a long period of time, so I guess it makes sense to reset the angles at some point.


    Best,

    Cam

    Comment

    Working...
    X