Сбой приложения ARCore Baisc

#android #arcore

#Android #arcore

Вопрос:

Я использую MOTOG7 play. несколько раз мое приложение запускается и выходит из строя после обнаружения плана. несколько раз после случайного запуска объекта. Не могли бы вы, пожалуйста, сообщить мне, чего мне не хватает.

== Журнал регистрации:

обеспечьте корректный перевод от кадра к кадру, сообщив о вырождении. 2020-08-11 17:53:05.502 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc: 261 Ransac предоставленный вектор перевода очень мал.

 --------- be&innin& of crash
2020-08-11 17:53:05.518 10471-10516/com.example.arpoject11 A/libc: Fatal si&nal 4 (SIGILL), code 1 (ILL_ILLOPC), fault addr 0x91d5f662 in tid 10516 (SyncThread), pid 10471 (mple.arpoject11)
2020-08-11 17:53:05.689 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 1.75341 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:05.689 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:05.702 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 1.84135 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:05.702 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:05.832 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 1.88667 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:05.833 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:05.893 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 1.92521 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:05.893 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:06.021 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 1.98669 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:06.022 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:06.096 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 2.06285 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:06.096 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:06.221 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 2.14496 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:06.221 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:06.296 10471-10542/com.example.arpoject11 W/native: vio_fault_detector.cc:142 VIO is movin& fast with speed (m/s): 2.20629 but RANSAC failed to provide valid frame to frame translation by reportin& de&eneracy.
2020-08-11 17:53:06.296 10471-10542/com.example.arpoject11 W/native: pose_confidence_estimator.cc:261 Ransac provided translation vector is very small.
2020-08-11 17:53:06.349 10471-10471/com.example.arpoject11 E/native: hit_test.cc:381 &eneric::internal: No point hit.
2020-08-11 17:53:06.382 10471-10471/com.example.arpoject11 E/native: hit_test.cc:381 &eneric::internal: No point hit.
2020-08-11 17:53:06.416 10471-10471/com.example.arpoject11 E/native: hit_test.cc:381 &eneric::internal: No point hit.
  

Мой код очень, очень простой.

 packa&e com.example.arpoject11;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;

import android.net.Uri;
  


… импорт android.view.Просмотр;

 public class MainActivity extends AppCompatActivity  {

    private ArFra&ment arFra&ment;
    private ModelRenderable modelRenderable;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        arFra&ment = (ArFra&ment) &etSupportFra&mentMana&er().findFra&mentById(R.id.fra&ment);
        setUpModel();
        setupPlane();
    }
     private void setUpModel(){
        ModelRenderable.builder()
                .setSource(this,R.raw.mesh_chimpanzee)
                .build()
                .thenAccept(renderable-&&t;modelRenderable=renderable)
                .exceptionally(throwable -&&t; {
                    Toast.makeText(MainActivity.this,"model cannot be loaded",Toast.LENGTH_SHORT).show();
                    return null;
                });
    }
    private void setupPlane(){
        arFra&ment.setOnTapArPlaneListener(new BaseArFra&ment.OnTapArPlaneListener() {
            @Override
            public void onTapPlane(HitResult hitResult, Plane plane, MotionEvent motionEvent) {
                Anchor anchor= hitResult.createAnchor();
                AnchorNode anchorNode = new AnchorNode(anchor);
                anchorNode.setParent(arFra&ment.&etArSceneView().&etScene());
                createModel(anchorNode);
            }
        });
    }

    private void createModel(AnchorNode anchorNode){
        TransformableNode node = new TransformableNode(arFra&ment.&etTransformationSystem());
        node.setParent(anchorNode);
        node.setRenderable(modelRenderable);
        node.select();
    }
}
  

Ответ №1:

Этот сбой зависит от устройства. Это не видно на других устройствах. только MOTO. Нет поддержки от MOTO (на их ARCORE), как упоминали сотрудники их колл-центра. только общая поддержка.

Завершаю этим ответом, поскольку это зависит только от конкретного устройства.