Reputation: 1713
I try to use the ARWorldMap sharing feature.
EDIT: I'm using the newest (Beta 3) versions for Xcode, iOS and macOS, downloadable from the Apple dev site.
So I make a MultipeerConnectivity Connection between 2 devices. One is scanning until is has a .mapped
WorldMap which then is being sent to the other device.
Once there and unwrapped, I create a new ARConfiguration and set configuration.initialWorldMap
to be my received map and run this config by my ARSession.
Shortly thereafter I get this:
2018-07-06 15:45:15.453812+0200 [Technique] Error initializing VIO handle (0x116113a00):
2018-07-06 15:45:15.456922+0200 [Session] Session (0x115d22340): did fail with error: Error Domain=com.apple.arkit.error Code=200 UserInfo={NSLocalizedDescription=<redacted>, NSLocalizedFailureReason=<redacted>}
2018-07-06 15:45:15.456995+0200 [Technique] ARWorldTrackingTechnique(0x11a5b2e40) error resetting object detection: ObjectDetectionCallbackNotSet
SessionFailed: World tracking failed.
And session(_:didFailWithError:)
is called.
I can even reproduce this error in Apples ARMultiuser App (Radar filed already). A similar error occurs when trying to save and reload the world map.
My code after I receive and unwrap my WorldData:
let configuration = ARWorldTrackingConfiguration()
configuration.initialWorldMap = worldData.map // is of type ARWorldMap
sceneView.session.run(configuration, options: [.resetTracking, .removeExistingAnchors])
Notice: I'm not asking you to fix Apple's bugs. The reason I came here is simply because I didn't got any feedback not from Apple (yet) and neither from any other Dev. online.
So (just to make sure) all I'm actually asking right now is: Can you use ARKit 2.0 with the world-sharing feature in the latest beta version? Do you think this is a valid bug? And can you think of any workarounds?
ANY feedback about the latest beta version of ARKit 2.0 is appreciated ^^
Upvotes: 4
Views: 1330
Reputation: 1020
I also encounted this problem in Beta 3, now I solve this problem by commenting this code:
configuration.environmentTexturing = .automatic
Upvotes: 2
Reputation: 1
You'll need to update your reference data. This is a known issue with the latest release. "ARKit: ARReferenceObject and ARWorldMap data generated using iOS 12 beta 2 or earlier isn't compatible with beta 3 or later. Please rescan your objects to generate new ARReferenceObject and ARWorldMap data. (41489820)" https://ios.gadgethacks.com/news/released-ios-12-dev-beta-3-public-beta-2-includes-improved-maps-bug-fixes-security-patches-0185742/
Upvotes: 0
Reputation: 51
I know that the demo application you linked worked in Beta 2, but I haven't tried running it in Beta 3 yet if that means anything
Upvotes: 1
Reputation: 869
I'm sorry, no idea how to bypass the VIO (Visual Inertial Odometry, jic someone doesn't know: its basically the AR tracking technique) error.
But I can approve it. I tried it with the sample code from apple you linked and got the same error. I guess you have to wait for Apple to fix it :/
Upvotes: 2