0.20.12: iOS/android sync

This commit is contained in:
matlabbe
2021-06-21 10:07:30 -04:00
parent 9fccb8703a
commit f475f2d21c
5 changed files with 18 additions and 9 deletions

View File

@@ -953,7 +953,7 @@ class ViewController: GLKViewController, ARSessionDelegate, RTABMapObserver, UIP
case .normal:
accept = true
case .notAvailable:
status = ""
status = "Tracking not available"
case .limited(.excessiveMotion):
accept = true
status = "Please Slow Your Movement"
@@ -965,12 +965,12 @@ class ViewController: GLKViewController, ARSessionDelegate, RTABMapObserver, UIP
case .limited(.relocalizing):
status = "Relocalizing"
default:
status = ""
status = "Unknown tracking state"
}
mLastLightEstimate = frame.lightEstimate?.ambientIntensity
if mLastLightEstimate != nil && mLastLightEstimate! < 100 && accept {
if !status.isEmpty && mLastLightEstimate != nil && mLastLightEstimate! < 100 && accept {
status = "Camera Is Occluded Or Lighting Is Too Dark"
}
@@ -981,6 +981,10 @@ class ViewController: GLKViewController, ARSessionDelegate, RTABMapObserver, UIP
rtabmap?.postOdometryEvent(frame: frame, orientation: rotation, viewport: self.view.frame.size)
}
}
else
{
rtabmap?.notifyLost();
}
if !status.isEmpty {
DispatchQueue.main.async {