STCaptureSession and CoreMotion


@JacobErvin @miles @jeremysteward

Was just chatting with @n6xej who suggested not setting up Core Motion by calling setupIMU since it seems that STCaptureSession is doing so internally. Looks like the only control given is whether the capture session sample will contain core motion data. This is really bad for us, since we need control over initialization of the core motion reference frame.

We don’t really need to use STCaptureSession except for initialization of the depth stream preset. I wonder if the capture session was configured then torn down whether the depth stream preset would persist so we could use the low level api? Regardless, if this is really an issue with the sample it needs to be corrected.

  • kSTCaptureSessionOptionUseAppleCoreMotionKey
    • Specifies whether to stream Apple CoreMotion data or raw gyroscope / accelerometer data.
    • BOOL value, true if-and-only-if you wish to receive CoreMotion data from the capture session.
    • Defaults to @NO


Hi Jim,

Thanks for bringing our attention to this. I’ve logged it for review in our short term roadmap, and will post again here when we have any updates.