CMMotionManager incorrect behavior

Hey,


I just updated my iPad Mini 2 to iOS 10 for testing and found that my VR applications head tracking is completly messed up when reading from CMMotionManager. I expect it to work simularrly to iOS 8/9, but what i'm seeing doesn't make sense.


If I turn on the magnetometer, the tracking becomes very unstable and jittery. Also looking up and down is not working, it seems to have some sort of gimble issue.

self.motionManager.magnetometerUpdateInterval = 1.0f / 60;
self.motionManager.showsDeviceMovementDisplay = YES;


If I don't use the magnetometer, its not jittery, but the behavior is different. When i use startDeviceMotionUpdatesUsingReferenceFrame: CMAttitudeReferenceFrameXArbitraryZVertical I expect the frame to be centered with the device. And If I stop and again, the frame shall recenter itself. Now it starts pointing north, and if I stop and start, its still pointing north.


My motion tracker code can be found here:

https://github.com/mgatelabs/SCN-VR/blob/master/scn-vr/CoreMotionTracker.m

Replies

Hi,
I'm also having issues with CMMotionManager and iOS 10. Running the same code on iOS 9, the data (and my visualization) is very stable (I'm using the CMAttitudeReferenceFrameXMagneticNorthZVertical reference frame) but with iOS 10, it's jittery.


So far I couldn't find any documentation or WWDC videos that would point me towards API changes in CoreMotion.framework. So this seems to be an internal framework problem.

Yep, I see this too.


Example here.

This is still an issue with the GM. My team's app (Argon4) exhibits this problem, as do any other motion app I try. I have no idea what's going on. Any help or pointers appreciated!

I am also seeing this issue with iOS 10. When I downgraded my device, during beta, to iOS 9 the issue went away. Now that i've upgraded to the official iOS 10 update I'm seeing occaisonal jitter again.

I see this also. When I launch my app it works fine. But if the app goes to the background then back to the foreground the CMMotionManager readings start varying wildly. I observed this in other apps as well. This was working fine in iOS 9 on the same devices. Using CMAttitudeReferenceFrameXTrueNorthZVertical.

I see this problem too, How to fix? Who can help me?

The same issue here. If I use CMAttitudeReferenceFrameXArbitraryZVertical motion manager pretty well tracks device attitude. But if I use XTrueNorthZVertical, XMagneticNorthZVertical, XArbitraryCorrectedZVertical it seems that motion manager doubles attitude angles. To refine bug's steps I made the following experiment.

I've tried to put the phone on a table surface, aligned the phone so the yaw value was about 0, then rotated the phone by 90 degrees and saw that the yaw value changed by around 3.1 (which corresponds to rotation by 180 degrees). If I use CMAttitudeReferenceFrameXArbitraryZVertical and try to repeat the forementioned experiment, the yaw value changes from 0 to about 1.5 (which corresponds to expected rotation by 90 degrees).

I made tests on iphone 5S, 6, 6S and SE. The bug occurs only for 5S and 6. On iOS 9 I didn't see such behaviour (the same code works as expected).

Also seeing the same problem on an iPhone 5S (code works fine on an iPhone 5 with iOS 9). I did notice however if you restart the app by double pressing the home key, killing the app from the background and then restarting, things appear to work again but then fails again when the app is closed and comes back from the background. Hopefully may provide a clue to someone. Feels like an iOS 10 bug.

Seeing the problem also on an iPhone 5C and iPad mini 3

I've been able to reproduce this in our AR app -- first time using it after rebooting the app it behaves normally, 2nd through nTH time i'm seeing jitters and in-accurate movement

do we know if apple is working on fixing this?

Same problem on all iPhones and iPads I have tested. My app works fine on iOS 9 but with iOS 10 the CMMotionManager results are jittery. All apps that use the CMMotionManager seem to have the problem.


Can somebody from Apple give us a heads up on what's going on? This is a serious bad advertisement for my app. What shall I do when people who bought my app start complaining and writing bad reviews?


Thank you for your time.

This thread no longer appears in the results when you do a search for it. Even if you use the exact title you can no longer find it unless you have the url. So that's how apple deals with their errors. Shame, shame...

Good news everyone!

It seems that Apple fixed this issue in 10.1 release (at least after motion I see expected amount of rotation).

Apple Developers thanks for your hard work!

Maybe the fix was the reason why they did so 😉