Why does the anchor created in the "air" not static in ARCore

401 Views Asked by At

I implement an app with ARCore and Sceneform,which places AR markers at the specific gps location in real world.To keep the marker static in the real world,I use the anchor created in the "air"(not associated with the trackable object such as the plane):

mAnchor=session.createAnchor(
    frame.getCamera().getPose()
        .compose(Pose.makeTranslation(xrotated,y,zrotated))
        .extractTranslation());

where xrotated,y,zrotated are the relative distance between the camera's gps location and the destination gps location.

But I find the anchors created in this way are not static,That is to say,when I move my phone,the markers move parallel with the phone and can drift even up to 10 meters and more.

I try to create the anchor by tapping on the screen,the rendering node attched to the anchor works fine.when the phone moves,it keep static like it is a real marker in the real world.

I find the description like this placing an anchor that is not associated with a Trackable object is usually not a good experience. The trackable object (planes, augmented images, oriented points) are update by ARCore to represent the connections between the real world image and the augmented, virtual images. If you place an anchor in the "air", it will drift and move relative to the real world. in the https://github.com/google-ar/sceneform-android-sdk/issues/185.

I want to know whether the reason is just the anchor created in the air and not associated with the trackable object or it is other factors which cause the marker moving parallel with the camera but I have not found.In ARKit,I have not found such issues,so it is because the ARCore has not dealt with GeoAR?

1

There are 1 best solutions below

1
On

Anchors should be attached to an existing Trackable to ensure a consistent quality of tracking for the reasons you've mentioned. Anchors that aren't attached to anything are difficult to keep in a fixed position in the world's understanding, and will exhibit drift and unstable locations.