Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

ARKitObjectTracker

  • Last UpdatedDec 07, 2023
  • 4 minute read

The ARKitObjectTracker node finds out the position and the orientation of a 3D object in the real world. This requires pre-processed data and knowledge about the object. The object to be detected must be scanned prior and exported as an .arobject file. ARKitObjectTracker also has the capability to render a mesh at the detected location of the object in the real world. The position and the orientation of the mesh is updated automatically based on the position and the orientation of the detected reference object.

Multiple objects can be tracked simultaneously. The reference objects that need to be tracked must be copied to the module’s assets path.

Platform support

This node is supported on iOS platform only.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

No support

No support

Full support

No support

No support

No support

No support

Full support

No support

No support

Limitations

Since the ARKitObjectTracker node is based on Apple ARKit APIs, it has the same restrictions as Apple ARKit. ARKit is only available on devices running A9 and more-powerful processors: essentially iPhone 6S and newer, iPad Pros, and iPads released no earlier than 2017.

Object scanning

For best results with object scanning and detection, follow these tips:

  • ARKit looks for areas of clear, stable visual detail when scanning and detecting objects. Detailed, textured objects work better for detection than plain or reflective objects.

  • Object scanning and detection is optimized for objects small enough to fit on a tabletop.

  • An object to be detected must have the same shape as the scanned reference object. Rigid objects work better for detection than soft bodies or items that bend, twist, fold, or otherwise change shape.

  • Detection works best when the lighting conditions for the real-world object to be detected are similar to those in which the original object was scanned. Consistent indoor lighting works best.

Code example

This is a code example for the ARKitObjectTracker node.

< ARKitObjectTracker name="ar_marker_0" active="true" referenceObjectPath="./data/bus_toy.arobject" mesh="meshName" />

Fields

These are the fields for the ARKitObjectTracker node. Only the node-specific fields are indicated, not fields obtained by inheritance.

Field inheritance: NodeBase > ARKitObjectTracker

Fields

Type

Use

Default

Description

active

sbool

If active, the reference object is added to the list of objects that are being tracked. If not active, the object is removed from the list of objects that are currently being tracked.

anchorIdentifier

sstring

Read only

A unique identifier for the anchor. This value is assigned automatically by ARKit when an anchor is created.

center

svec3

Read-only

The center field reports the origin of the object detected.

enabled

sbool

Optional

true

If enabled, the matrices for the tracked object position and orientation is updated.

extent

svec3

Read-only

The extent field reports the size of the reference object’s space mapping data.

localMatrix

smatrix

Read-only

The localMatrix is automatically updated by the XR engine. The value is set based on the position and orientation of the object.

mesh

sstring

Optional

The name of the mesh that will be rendered at the position and with the orientation of the tracked object.

object

sstring

Optional

The name of the 3D object (dummy) that will be rendered at the position and with the orientation of the tracked image.

offsetMatrix

smatrix

Optional

Identity

The offset that will be applied to the mesh. This field is used if the mesh needs to be rendered at an offset from the tracked position or orientation of the tracked object.

referenceObjectPath

sstring

The path to the .arobject file that will be tracked in the real world.

visible

sbool

Read-only

Indicates whether the reference object is visible in the real world or not.

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in