I get this error as well but only when I try to do an 'incremental' by clicking the 'RESUME' button in Xcode to run a PreviewProvider SwiftUI View.
Hopefully this gets fixed soon as this used to work and is very valuable when doing SwiftUI dev work.
Post
Replies
Boosts
Views
Activity
You can download the demo app presented at WWDC 2022 from this link: https://developer.apple.com/documentation/roomplan/create_a_3d_model_of_an_interior_room_by_guiding_the_user_through_an_ar_experience/
There is a blue download button at the top of the docs.
You will also need Xcode 14 beta, Mac OS 12.4 (min. OS required by Xcode) and a PHYSICAL iPhone/iPad with a LiDAR sensor. So an iPhone 12/13 Pro or the latest iPad Pro models that have LiDAR.
I'm not sure if you are aware but USD is an Open Source standard with a C++ library and Python wrappers.
Here is the tool to install:
https://download.developer.apple.com/WWDC_2022/USDPython_0.66/USDPython0.66.zip
Here are the Open Source tools to work with the file format:
https://graphics.pixar.com/usd/release/toolset.html#
Here is the GitHub page Pixar shares the source code for this USD toolset and file format code details:
https://github.com/PixarAnimationStudios/USD
I had this same reaction. It's at 6:50 into the RoomPlan demo presentation. When I got the compiler error for Visualizer I was thinking I missed an import, then I played the video a few times and barely caught the 'custom class example' comment.
I was able to get it to work using a fresh ARKit project from Xcode 14 Beta 2 and what was presented at WWDC like so:
import UIKit
import RealityKit
import RoomPlan
import ARKit
class ViewController: UIViewController {
var roomCaptureSessionConfig: RoomCaptureSession.Configuration = RoomCaptureSession.Configuration()
@IBOutlet var arView: ARView!
// var previewVisualizer: Visualizer!
lazy var captureSession: RoomCaptureSession = {
let captureSession = RoomCaptureSession()
arView.session = captureSession.arSession
return captureSession
}()
override func viewDidLoad() {
super.viewDidLoad()
captureSession.delegate = self
}
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
captureSession.run(configuration: roomCaptureSessionConfig)
}
}
extension ViewController: RoomCaptureSessionDelegate {
func captureSession(_ session: RoomCaptureSession,
didUpdate room: CapturedRoom) {
print(room)
// previewVisualizer.update(model: room)
}
func captureSession(_ session: RoomCaptureSession,
didProvide instruction: RoomCaptureSession.Instruction) {
print(instruction)
// previewVisualizer.provide(instruction)
}
}
That will really fill up your console pretty quickly and turn your phone into a nice hand warmer if you're not careful. :-)
Please note that my request above is for RoomObjects only. The Surface detection is perfect as is for Door, Window, Wall and Opening.
No. If you watch the WWDC demo you will see how the window over the sink is an arch style but the scan uses a bounding rectangle to define it.
It still does a pretty decent job and if you remember from Calculus, you can still get the area under a curve if your rectangles are small enough. :-)