8000 How do the world positions of AnchorNode and Node determine the drift of the location marker? · Issue #128 · appoly/ARCore-Location · GitHub
  • [go: up one dir, main page]
    More Web Proxy on the site http://driver.im/
    Skip to content
    How do the world positions of AnchorNode and Node determine the drift of the location marker? #128
    Open
    @Lilyxxzjzljy

    Description

    @Lilyxxzjzljy

    when using ARCore-Location to implement an app which places AR labels at specific gps locations,I meet some issues.
    1、when the phone is still,the location marker pops on the screen sometimes,with the world position of the AnchorNode changing.
    2、when I move the phone(but the pose of the phone does not change,just hold the phone and walk straight on the path),the world position of the AnchorNode does not change,but the location marker moves along with the phone.it does not pop,it seems like that it sticks on the screen and moves with the phone.
    I am confused that by logging i find world position of the node presenting the gps location is consistent over the session,because the position is set just as below when the node is the child of the anchorNode:

                n.setWorldPosition(new Vector3(n.getWorldPosition().x, getHeight(), n.getWorldPosition().z));
                //Log.i("LocationScene","node x:"+n.getWorldPosition().x+" y:"+direction.y+" z:"+n.getWorldPosition().z);
    
                Quaternion lookRotation = Quaternion.lookRotation(direction, Vector3.up());
                n.setWorldRotation(lookRotation);
                n.setWorldScale(new Vector3(scale, scale, scale));
    

    when the getHeight() returns the constant the world position of the node does not change.
    while I log the world position of the AnchorNode,I find it changes when anchorsNeedRefresh is true.

    I am confused that I find 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 google-ar/sceneform-android-sdk#185 the implementation like this is just creating an anchor not attached to a trackable object but in the "air",and thus the location marker will drift with the phone?

    I do not understand the significance of the code,and why does the world position of anchorNode change over time.If the world coordinate frames is set definite(the origin is on the camera at the start of the session),then to understand the relationship between the node and the camera,the coordinate of AnchorNode should change every time?

    Why does the locationMarker moves with phone when the pose and the world position of the anchorNode do not change,just like the locationMarker sticking on the screen?How can i resolve it?

    Thanks for any help.

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      No labels
      No labels

      Type

      No type

      Projects

      No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        0