Closed Nullifier1571 closed 6 years ago
if (!isLock) { anchors.add(session.createAnchor( frame.getCamera().getDisplayOrientedPose() .compose(Pose.makeTranslation(0, 0.5f, -1f)) .extractTranslation()));
anchors.add(session.createAnchor(
frame.getCamera().getDisplayOrientedPose()
.compose(Pose.makeTranslation(0, -0.5f, -1f))
.extractTranslation()));
isLock = true;
}
even i delate my modify it also can`t be normal
That's confusing. Is it possible you're creating a second Session object or something?
i really don't know what's wrong.it's this code will create a new session?
anchors.add(session.createAnchor(
frame.getCamera().getDisplayOrientedPose()
.compose(Pose.makeTranslation(0, -0.5f, -1f))
.extractTranslation()));
Nope, that's just creating an anchor. This problem would be up in onResume
most likely.
Closing for inactivity.
i use the sample code and modify as this issue https://github.com/google-ar/arcore-android-sdk/issues/110#issuecomment-384096267 .it
s worked when first installed.but when i restart my app,the camera always twinkle .even i unstall it or restart device it can
t be normal ! it`s also happend in emulator,i must delate emulator and recreate emulator.this is the log: 05-31 11:53:06.747 5428-5428/com.google.ar.core.examples.java.helloar E/NdkImageReader: AImageReader_getWindow 05-31 11:53:09.764 5428-5428/com.google.ar.core.examples.java.helloar E/ACameraManager: openCamera: connect camera device failed: Status(-8): '8: connectHelper:1305: Cannot open camera 0 for "" (PID -1): Too many other clients connecting' 05-31 11:53:09.765 5428-5428/com.google.ar.core.examples.java.helloar E/native: android_camera.cc:624 Reset: Resetting camera 0 from an ERROR state, best effort clean-up commencing 05-31 11:53:09.769 5428-5428/com.google.ar.core.examples.java.helloar E/native: status.cc:158 ArStatusErrorSpace::AR_ERROR_CAMERA_NOT_AVAILABLE: 05-31 11:55:15.769 5428-5428/com.google.ar.core.examples.java.helloar E/bbd: ~~~ Channel {0} was not shutdown properly!!! ~~~ Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true. java.lang.RuntimeException: ManagedChannel allocation site at bbe.(PG:4)
at bbd.(PG:4)
at bbd.(PG:1)
at aui.a(PG:63)
at com.google.ar.persistence.AnchorServiceClientFactory.create(PG:17)
at com.google.ar.core.Session.nativeCreateSession(Native Method)
at com.google.ar.core.Session.(Unknown Source:22)
at com.google.ar.core.examples.java.helloar.HelloArActivity.onResume(HelloArActivity.java:148)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
05-31 11:55:15.770 5428-5428/com.google.ar.core.examples.java.helloar E/bbd: ~~~ Channel {0} was not shutdown properly!!! ~~~
Make sure to call shutdown()/shutdownNow() and wait until awaitTermination() returns true.
java.lang.RuntimeException: ManagedChannel allocation site
at bbe.(PG:4)
at bbd.(PG:4)
at bbd.(PG:1)
at aui.a(PG:63)
at com.google.ar.persistence.AnchorServiceClientFactory.create(PG:18)
at com.google.ar.core.Session.nativeCreateSession(Native Method)
at com.google.ar.core.Session.(Unknown Source:22)
at com.google.ar.core.examples.java.helloar.HelloArActivity.onResume(HelloArActivity.java:148)
at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
at android.app.Activity.performResume(Activity.java:7117)
at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
05-31 11:55:15.795 5428-5428/com.google.ar.core.examples.java.helloar E/NdkImageReader: AImageReader_getWindow
05-31 11:55:18.800 5428-5428/com.google.ar.core.examples.java.helloar E/ACameraManager: openCamera: connect camera device failed: Status(-8): '8: connectHelper:1305: Cannot open camera 0 for "" (PID -1): Too many other clients connecting'
05-31 11:55:18.800 5428-5428/com.google.ar.core.examples.java.helloar E/native: android_camera.cc:624 Reset: Resetting camera 0 from an ERROR state, best effort clean-up commencing
05-31 11:55:18.805 5428-5428/com.google.ar.core.examples.java.helloar E/native: status.cc:158 ArStatusErrorSpace::AR_ERROR_CAMERA_NOT_AVAILABLE:
and this is my code
` @Override public void onDrawFrame(GL10 gl) { // Clear screen to notify driver it should not load any pixels from previous frame. GLES20.glClear(GLES20.GL_COLOR_BUFFER_BIT | GLES20.GL_DEPTH_BUFFER_BIT);