Closed fast-slow-still closed 2 years ago
Obviously this will entail heavy regression testing.
ASA v2.11.0 was apparently released 2021/11/19.
Interesting timing. I just decided to give ASA another shot in combination with WLT and just got it working yesterday with ASA v2.11.0.
I first tried with the ASA-WLT demo but failed to get that work, not sure why. This is basically the approach that works for me:
// create the cloud anchor from a spacepin that has been positioned before by a QR code
var lockedPose = spacePin.LockedPose;
var spongyPose = WorldLockingManager.GetInstance().SpongyFromLocked.Multiply(lockedPose);
anchorHanger = new GameObject("anchorHanger");
anchorHanger.transform.SetGlobalPose(spongyPose);
await anchorHanger.CreateNativeAnchor();
var nativeAnchor = anchorHanger.FindNativeAnchor();
var cloudAnchor = await nativeAnchor.ToCloud();
await spatialAnchorManager.CreateAnchorAsync(cloudAnchor);
var anchorId = cloudAnchor.Identifier; // use this to retrieve by id
// when an anchor has been located
public static void AnchorLocated(object sender, AnchorLocatedEventArgs args)
{
var cloudAnchor = args.Anchor;
Pose spongyPose = cloudAnchor.GetPose();
var wltMgr = WorldLockingManager.GetInstance();
var frozenPose = wltMgr.FrozenFromSpongy(spongyPose);
spacePinPackage.UpdatePose(frozenPose);
}
The thing that took a while to figure out is that for creating the cloud anchor it needs to be positioned with the spongyPose. I'm not sure what the explanation is here but it works. And it was also not immediately clear from the ASA-WLT sample that it needed to be done like this. For now tested with three spacepins covering an area of about 4 x 10m.
Fixed with PR #241
WLT currently supports ASA SDK versions v2.9.0 through v2.10.2.
The recent release of ASA v2.11.0 includes breaking changes that will need to be accommodated, while still supporting earlier versions.
Furthermore, the WLT-ASA shim includes workarounds for ASA bugs related to the camera parent having a non-identity transform. We worked with the ASA team on these, and they are hopefully fixed now. The fixes will need to be tested and the workarounds adjusted or removed.