The AccessoryAnchor transform does not match any of the Accessory.LocationName options.

I am using AccessoryTrackingProvider from ARKit to get the transform of the PSVR2 controller via originFromAnchorTransform of the AccessoryAnchor. I also am trying to use AnchorEntity on the controller using RealityKit

However, none of the three options for Accessory.LocationName, which should be used to define the AnchorEntity target, seem to match the position on the controller which is being sent from ARKit.

The picture attached is showing two transforms:

  1. RealityKit - using .gripSurface to define the AnchoringComponent.Target.accesssory location.
  2. ARKit - using originFromAnchorTransform for AccessoryTrackingProvider.

They are not aligned at the same point.

As for the other options of Accessory.LocationName, using .aim is located at the tip of the controller and .grip is the same position as .gripSurface but with a different orientation.

I am wondering why there is not an option for Accessory.LocationName that actually matches the transform captured by ARKit?

I am wondering why there is not an option for Accessory.LocationName that actually matches the transform captured by ARKit?

The location of an accessory anchor’s origin is somewhat arbitrary / might not correspond to any particular noteworthy location on the physical controller. That is why predefined locations like "aim" and "gripSurface" on accessories were added to the API.

Do you have a use case where, using RE's AnchorEntity, you need to attach virtual content to the accessory anchor's origin?

I am making a remote robotic teleoperation app and I am using the ARKit tracked pose of the controller to guide the position of the robot arm. However, when I want to put virtual information overlaid on the PSVR2 controller, it does not line up with the information that the robot is getting so all of my useful visualizations need an offset to correct for this position difference.

Or I could make a loop that asks ARKit for the transform and overwrite the position and orientation of the anchored asset accordingly, but this feels hacky given that there is already a RealityKit API for anchoring entities, it just does not have the right position.

The AccessoryAnchor transform does not match any of the Accessory.LocationName options.
 
 
Q