Structure SDK (for iOS) Release 0.10.3: iOS 13 Compatibility and Tracking Improvements

STSensorController - calibrationType reports differently in 0.10.3 as compared to 0.10.2.

@JacobErvin @jeremysteward this is a really bad thing since the app doesn’t recognize the need for calibration with this broken!

I think it’s time to consider EOLing the low level samples due to the lack of control over Mark II configuration. It’s interesting that STSensorController - startStreamingWIthOptions accepts a depth stream preset, but without the ability to configure e.g. IR auto exposure, that’s not going to get us all the way there.

1 Like

Hi Jim,

We’re working towards a major full stack update which involves driver, firmware and SDK improvements. We’re closing in on the last items now, and expect to ship by mid / late Nov. This release will resolve many long standing issues (including initialization and dropped connection bugs) and will bring Mark II to parity with Structure Sensor. We’ll be releasing a more detailed forum post this week with details on what to expect.

are you having issues with the mesh rendering. Thanks

No problems here, but I’m rendering the colorized mesh using SceneKit. What issues are you having?

Experiencing consistent crash when putting the sample Scanner app in the background during a scan. Only on the Mark II with 0.10.3 (the old scanner recovers fine on 0.10.3).

Secondly, if the app is in a cube placement state and put in the background it sometimes crashes when running/launching the calibration app. It seems like the Scanner app may still be running something scanner-related in the background and another app that uses the scanner SDK requesting to use it can cause it to crash.

What is the safe/intended way of handling the app going into the background while scanning or placing the cube?

In the sample app there is logic for handling UIApplicationDidBecomeActiveNotification…but nothing for going into the background mode. I’ve started adding logic subscribing to UIApplicationWillResignActiveNotification and UIApplicationDidEnterBackgroundNotification but so far I can’t find how to safely shut down the scanner or even closeScanner() to stop the crashes.

2 Likes

Capture session or low level?

the mesh is rendering triangles… and looks like the mesh does not have the right anchor point…

Can you post a screenshot?

-jim


This looks similar to your picture. Mine was from a scan 2 years ago.
It looks like its picking up the inside of the cube

I just posted a workaround for the app background crash, but it’s far from robust. I suspect motion callbacks aren’t being stopped when streaming is disabled.

This might save someone a bit of time. Things have changed regarding notifications in iOS 13:

if (@available(iOS 13.0, *)) {
    [[NSNotificationCenter defaultCenter] addObserver:self
          selector:@selector(appWillResignActive)
          name:UISceneWillDeactivateNotification object:nil];

    [[NSNotificationCenter defaultCenter] addObserver:self
          selector:@selector(appDidBecomeActive)
          name:UISceneDidActivateNotification object:nil];

}
else {
    [[NSNotificationCenter defaultCenter] addObserver:self
          selector:@selector(appWillResignActive)
          name:UIApplicationWillResignActiveNotification object:nil];


    [[NSNotificationCenter defaultCenter]addObserver:self
          selector:@selector(appDidBecomeActive)
          name:UIApplicationDidBecomeActiveNotification
                                              object:nil];
}
1 Like

@JacobErvin @jim_selikoff I integrated structure sdk 0.10.3 in my app but still facing the problem, scanning would not start when the scan button is pressed. Also the right side of the iPad on scanning screen are comming black. I’m using iPad Pro 12.9 with iOS 13.1.

IMG_ADD91CCC7A82-1

Looks like the scan button is enabled? Does the scanner sample behave as expected?

-jim

The Sample scanner app does not have the black side on right of scan screen on my 12.9 inch iPad pro.

But I have a 10.5 inch and my app is fine no black side on right.

Same App different iPads different views with same ios

Seems like some kind of layout issue then?

@alin @sludlow I’m seeing the same issue with the scan mesh being rendered using the latest SDK from October 23rd. Have you learned anything new? The only suggestion on fix I’ve seen so far is in another forum post but it’s pretty vague. MeshView Issue - Smooth .obj file but messy preview

Thanks for this block of code Jim! I was waiting to implement based on the new SDK…but I think the new SDK handles backgrounding MUCH better. I’m thinking about not needing this anymore - unless you think it’s added safety and recommend still adding it?

I tried to interrupt the sessions a few ways with the new SDK and so far didn’t get any crashing :smiley: #knockonwood

thanks again!

1 Like

That looks like an issue in the MeshRenderer using unsigned shorts instead of unsigned ints. Make sure to change GL_UNSIGNED_SHORT to GL_UNSIGNED_INT and in uploadMesh() change sizeof(unsigned short) to sizeof(unsigned int)