fanjianrong
fanjianrong

Reputation: 63

The coordinate system of ARKit unstable

I load a model in the AR environment and add an ARAnchor to stabilize the model. When I place the device on the desktop and picked up later. The model’s position is not changed, but it will fly away soon. The coordinate system of ARKit will fly and be unstable.

How to avoid or deal with this situation

Upvotes: 2

Views: 687

Answers (1)

Andy Jazz
Andy Jazz

Reputation: 58563

ARKit/RealityKit world tracking system is based on a combination of five sensors:

  • Rear RGB Camera
  • LiDAR Scanner
  • Gyroscope
  • Accelerometer
  • Magnetometer

Three latter ones are known as Inertial Measurement Unit (IMU) that operates at 1000 fps. But what sees your RGB Camera (running at 60 fps) and LiDAR (also at 60 fps) is very important too.

Hence, a stability of world tracking greatly depends on camera image.

Here are some recommendations for high-quality tracking:

  • Track only well-lit environment (even if you have a phone with LiDAR)
  • Track only static objects (not moving)
  • Don't track poor-textured surfaces like white walls (if you don't have LiDAR)
  • Don't track surfaces with repetitive texture pattern (like Polka Dots)
  • Don't track mirrors, chrome and glass objects (reflective and refractive)
  • Move your iPhone slowly when tracking
  • Don't shake iPhone when tracking
  • Track as much environment as possible
  • Track high-contrast objects in environment (if you don't have LiDAR)

If you follow these recommendations, coordinate system in ARKit will be stable.

And look at the picture in this SO post – there are a good example of tracking and a bad one.

Upvotes: 4

Related Questions