mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-10 05:20:19 +08:00
0.20.12: iOS/android sync
This commit is contained in:
@@ -981,7 +981,7 @@
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 6;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 3RRB6NV8U9;
|
||||
EXCLUDED_ARCHS = "";
|
||||
@@ -1006,7 +1006,7 @@
|
||||
"$(PROJECT_DIR)/RTABMapApp/Libraries/lib",
|
||||
"$(PROJECT_DIR)/RTABMapApp/Libraries/share/OpenCV/3rdparty/lib",
|
||||
);
|
||||
MARKETING_VERSION = 0.20.11;
|
||||
MARKETING_VERSION = 0.20.12;
|
||||
OTHER_CFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.introlab.rtabmap;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
@@ -1038,7 +1038,7 @@
|
||||
CLANG_USE_OPTIMIZATION_PROFILE = NO;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 6;
|
||||
CURRENT_PROJECT_VERSION = 7;
|
||||
DEFINES_MODULE = YES;
|
||||
DEVELOPMENT_TEAM = 3RRB6NV8U9;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
@@ -1063,7 +1063,7 @@
|
||||
"$(PROJECT_DIR)/RTABMapApp/Libraries/lib",
|
||||
"$(PROJECT_DIR)/RTABMapApp/Libraries/share/OpenCV/3rdparty/lib",
|
||||
);
|
||||
MARKETING_VERSION = 0.20.11;
|
||||
MARKETING_VERSION = 0.20.12;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
OTHER_CFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.introlab.rtabmap;
|
||||
|
||||
@@ -221,6 +221,11 @@ class RTABMap {
|
||||
postCameraPoseEventNative(native_rtabmap, pose[3,0], pose[3,1], pose[3,2], quat.x, quat.y, quat.z, quat.w)
|
||||
}
|
||||
|
||||
func notifyLost() {
|
||||
// a null transform will make rtabmap creating a new session
|
||||
postCameraPoseEventNative(native_rtabmap, 0,0,0,0,0,0,0)
|
||||
}
|
||||
|
||||
func postOdometryEvent(frame: ARFrame, orientation: UIInterfaceOrientation, viewport: CGSize) {
|
||||
let pose = frame.camera.transform // ViewMatrix
|
||||
let rotation = GLKMatrix3(
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -462,7 +462,7 @@
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DefaultValue</key>
|
||||
<string>0.20.11</string>
|
||||
<string>0.20.12</string>
|
||||
<key>Key</key>
|
||||
<string>Version</string>
|
||||
<key>Title</key>
|
||||
|
||||
Reference in New Issue
Block a user