ARSession and RoomCaptureSession

Hi Is this possible to have RoomCaptureSession and ARSession together, as we need feature points

RoomCaptureSession has an instance property arSession that gives you access to the underlying ARSession. https://developer.apple.com/documentation/roomplan/roomcapturesession/arsession

Hello there!

The arSession owned by RoomCaptureSession doesn't keep track of scene depth (session.configuration?.frameSemantics.contains(.sceneDepth) = false). How can we manage that?

I tried to stop the session and restart it with the correct configuration but it didn't work:

captureSession.arSession.pause()
guard ARWorldTrackingConfiguration.supportsFrameSemantics(.sceneDepth) else { return }
let config = ARWorldTrackingConfiguration()
config.frameSemantics = .sceneDepth
captureSession.arSession.run(config)

Re: @sducouedic's question, configuration changes aren't immediate. Add this delegate method to see that the sceneDepth semantic is enabled.

public func captureSession(_ session: RoomCaptureSession, didAdd room: CapturedRoom) {
     if (session.arSession.configuration?.frameSemantics.contains(.sceneDepth)) != nil {
          print("Scene depth is supported")
     }
}
ARSession and RoomCaptureSession
 
 
Q