Unable to create Spatial Anchors

Hello, I am trying the spatial anchors provided by the new SDK 2.1.1, when I call the NRWorldAnchor.SaveAnchor method, it returns false with the following errors:

[Info][NativeMapping] NRPerceptionAcquireNewAnchor: InvalidArgument
NRKernal.DefaultLogHelper:Log(LogLevel, Object).
NRKernal.NativeMapping:AddAnchor(Pose)
NRKernal.Persistence.NRWorldAnchorStore:CreateAnchor(NRWorldAnchor)

[Error][NativeMapping] AddAnchor: InvalidArgument
NRKernal.DefaultLogHelper:Log(LogLevel, Object)
NRKernal.NativeErrorListener:Check(NativeResult, Object, String, Boolean)
NRKernal.NativeMapping:AddAnchor(Pose)
NRKernal.Persistence.NRWorldAnchorStore:CreateAnchor(NRWorldAnchor)
XrealSpatialAnchorsManager:CreateSpatialAnchor(Vector3, Quaternion, String)

Also, I don’t know if it is related, even before calling the SaveAnchor method, in the console, I have several times per second the following error:

[ERROR][NRSDK] get perception buffer failed:12970367450127412808
[Info][NativeTrack] GetFramePresentHeadPose: trackReasonRst=Success, lost_tracking_reason=NONE
NRKernal.DefaultLogHelper:Log(LogLevel, Object)
NRKernal.NativeHeadTracking:GetFramePresentHeadPose(Pose&, LostTrackingReason&, UInt64&)
NRKernal.NRFrame:GetFramePresentHeadPose(Pose&, LostTrackingReason&, UInt64&)

Thank you in advance for your support.

Hi, Enchaaner. From the log pieces you provided, I think it may be because the feature points were not recognized well before you created the anchor. Please make sure that the glass maps the surroundings. You can try to turn around and scan the things around you slowly.
Please try to add the following method in your script to check if the Anchor can be saved before the pose is well recognized by the glass.