Announcement

Collapse
No announcement yet.

MotionPlus pitch and roll angle values: Not a number

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

  • MotionPlus pitch and roll angle values: Not a number

    Hi,

    I've been having some issues with pitch and roll angle values. The values frequently become greater than the default 0 and 1 (as set up in the scalings). I suspect that this may be happening because I have turned off smoothing of the accels and MotionPlus.

    After recording for about 5 minutes, the values will acquire very large magnitudes (in either the positive or negative direction) and then become reported as nan in the log shortly thereafter. The quick look graph also ceases to function. Even after this happens, the pitch and roll velocities look mostly ok, except that they occasionally go above 1 or below -1.

    This screenshot illustrates the problem:



    And this screenshot shows my routings:



    Is this happening because of runaway compounding of erroneous acceleration/velocity values? Maybe this is irrelevant, but I'm using a Wiimote+.

    Thanks,
    Alfred

  • #2
    Hi Alfred,

    Thanks for reporting this issue.
    It seems there is a problem with the algorithm that calculate the Motion Plus angles.
    I have not been able to reproduce it, but I know that other users had this problem before.

    If you can live without the MotionPlus data, I would suggest that you use the pitch/roll/yaw output from the Wiimote. This is coming from the acceleration sensors, so it won't be affected by the bug you describe, however it won't have the same behavior, especially when the Wiimote is shaken, it is not as stable as the MotionPlus outputs.

    If I can suggest an advice: If you want to read the values of the sensors in the Console output, it might be more convenient for you to attach the Console Log event to the "head" of a message, instead of using 3 Console Log messages for each individual arguments. Doing this will log one message with 3 values instead of 3 messages with 1 values.


    Best,
    Cam

    Comment


    • #3
      PS: I can see that you were using the "continuous mode", with that information in mind, I will check the algorithm to see if I can prevent runaway values.

      Comment


      • #4
        Originally posted by camille View Post
        Thanks for reporting this issue.
        It seems there is a problem with the algorithm that calculate the Motion Plus angles.
        I have not been able to reproduce it, but I know that other users had this problem before.

        If you can live without the MotionPlus data, I would suggest that you use the pitch/roll/yaw output from the Wiimote. This is coming from the acceleration sensors, so it won't be affected by the bug you describe, however it won't have the same behavior, especially when the Wiimote is shaken, it is not as stable as the MotionPlus outputs.
        I've done a little more testing and noticed two things:
        1. The problem appears for both the Wii Remote Plus and an original Wii Remote with a MotionPlus extension.
        2. The problem does not appear when smoothing is on, even at the lowest setting (value of 1).


        I'm trying to track the Wiimote's absolute position so I'm grabbing as much data as possible. Ideally I would be able to use just the x, y, and z acceleration values, but since the effect of gravity depends on the orientation of the Wiimote, I believe I need to use the pitch/roll/yaw values to properly account for gravity.

        Originally posted by camille View Post
        If I can suggest an advice: If you want to read the values of the sensors in the Console output, it might be more convenient for you to attach the Console Log event to the "head" of a message, instead of using 3 Console Log messages for each individual arguments. Doing this will log one message with 3 values instead of 3 messages with 1 values.
        Thanks for the tip! This way is much cleaner, but previously the three separate values would have slightly different timestamps, with the last one typically being 1 ms later than the first two. Is it safe to assume that the three values actually come from the same point in time from the Wiimote's point of view?

        Comment

        Working...
        X