I want that objects stay at their position in Aryzon Mode.
Unfortunately, I have seen also on the Aryzon SDK that when you move or rotate that the objects also move. Is it possible to improve the tracking in Aryzon Mode.
Hi Dominik! We’ve just done exactly that in our latest version of the SDK (3.0.1). You can find the latest version on Github (link below).
I will need to add that when you come from an earlier version you will need to remove the Aryzon folder from your Assets since we have moved to the package manager.
I’m in the progress of updating the forum so you will not find all info here. Hopefully the readme on Github will guide you, otherwise please ask!
Thank you for your answer. I have tested it but the objects follow with my movement. I have use the settings that you have explained for 6DoF tracking.
I want that the object stay at their position in the room.
Does the 2D view work? It sounds like ARFoundation does not start. Make sure to enable ARKit or ARCore in Project Settings → XRPluginManagement
Yeah, I have already add ARCore in the XRPluginManagement.
I have put the camera position on the debug console of the device and I could see that sometimes these change although I do not move. I think this is the reason that the objects are moving.
Moreover I start the application on my start position and then I go to an other position and come back to the start position. Then I could see that this position differ to the start position although I am back to the same place. In this situation I could see that the objects was moving. I hope it is clear what I mean.
Could you make sure ARFoundation is running correctly? To rule out ARFoundation not being setup correctly I would suggest trying a sample scene from here first: GitHub - Unity-Technologies/arfoundation-samples: Example content for Unity projects based on AR Foundation
If that works correctly you can follow the guide again from the link posted above (simply skip step 4). You can then instead use the sample scene you have just used and do a couple of things:
- Find the ARSession component in the scene, disable MatchFrameRate
- Add a script that sets the Application.targetFrameRate to 60 (at Start() or Awake())
- Find the Aryzon and AryzonUIController prefabs in Packages → Aryzon MR Headset Unity SDK → Runtime → Prefabs and add these two to your scene.
- On the Aryzon GameObject select ARFoundation as the tracking method
- Make sure there is one and only one event system in the scene otherwise the buttons won’t work.
When running this scene on your device you should at first not notice a difference except for the Aryzon Button in the lower right corner. Press this button to go into Aryzon Mode, select your headset from the settings menu and try out the stereoscopic view.
I have created a new AR Foundation Project and just place cube. The tracking really works. SO the cube stays on the place. I added Github Project of Cardboard and Aryzon and do the settings for Publishung Setting and Other setting. And I added the prefab of Aryzon to this Project and disable MathFrameRate and put the Application.targetFrame to 60 in a Script at the Start-Method.
When build this app. It works in the Non-Aryzon Mode with Tracking but when I go to the Aryzon Mode, the Tracking Engine does not work quite good anymore. So when I move the Cube moves a little bit also with me. And I have seen that after a while the Cube is placed on very different position.
I am using unity 2020.3.7 and use a Samsung Galaxy A80 with Android 11.
I wonder if it is performance related or something else. Rendering two images instead of one is a bit more consuming on the phone but should not be that much of an impact, especially when having just one object in the scene. A couple of things you can try to see if it is a performance issue:
- Test the app when the phone is cool and has not been charging, is the problem immediately visible?
- Do you see the frame rate drop? You can test this by adding an FPS text item to the Calibration view for instance: how to see fps? (frames per second) - Unity Answers
- When you go back to the 2D view is the cube back in the correct position?
Please note that tracking will always seem to be a bit worse in the headset compared to on the video feed. This is because of a couple of things:
- You see the image much larger in front of you so errors are more visible
- There is a time difference between the real world and the camera feed. You can see this by waving your hand in front of the camera. The captured image comes through later. The SDK compensate for this by using the gyroscope for rotation which updates much faster than the camera sensor, and apply prediction. Prediction always means some level of error.
- The gyroscope and ARCore both have different rotation values, especially over time. The SDK compensates for this by checking the difference when the user is steady and smoothly closing the gap. You can sometimes notice this when you have the headset steady, the image rotates to do the compensation.
- Incorrect calibration can make the image appear somewhat off, this should not be a reason for the cube to be in the incorrect position entirely.
The problem is also when the phone is cold. I have tested the frame rate drop. And yeah perhaps this is the problem. If I am not in the Aryzon-Mode then the frame rate stays at 60. If I am in Aryzon-Mode, then the frame rate switch very fast between 58 and 65.
And if I go back to Non-Aryzon-Mode, then the cube is positioned on a new Place. It is the place where I have seen it the last time in the Aryzon-Mode.
Hmm this doesn’t really sound like a performance issue, 58 - 65 FPS seems to be OK. I do wonder why it’s not keeping a steady 60 while it does stay steady when not in Aryzon mode. What is the performance of ARCore when you go out of Aryzon mode? Is it back to normal or does it stay worse?
Another thing that it could be, but may be a long shot: are you testing in the headset? Some phones barely peak out above the cardboard when placed in the headset, maybe the view is somewhat obstructed? You can capture a video when you place the phone in the headset to see what the camera sees.
Sorry about all the questions and thank you for your patience. I’d like to get to the bottom of this.
So if I go back then the fps are stable at 60 again.
I went in the camera mode of the smartphone and recorded a video when the camera was in the headset and yeah there is no occlusion with the headset.
I notice sometimes it works really good in Aryzon Mode and then sometimes the object is placed on a new position. It is like 5cm to one axes. Sometimes the object is moved to the old position back again but sometimes it stays at this new position.
And thank you that you want to help me.
I will have to do some tests with an A8, our main test device is an S8. I’m asking around if someone I know has one. Is it possible for you to share a video of the cube filmed through the headset? I know this may be difficult but it will help me understand.
I hope you can see this in this link: AryzonTracking.mp4 - Google Drive
I mean I use a Samsung Galaxy A80 and not Samsung Galaxy A8.
Aa sorry I misread. Thank you for the video, unfortunately I cannot really tell that something is not right. All I can say is that it does happen sometimes that ARCore resets it’s position because it thinks it is elsewhere, if you go out of ARCore and the cube is in the new position it is probably an ARCore issue that is more noticeable in the headset because of the magnification.
Something else that can influence the image is a wobbly or shifting phone in the headset.
The only thing I can think of that is SDK related is the difference between ARCore and the gyroscope. But this difference is adjusted for when you keep still for halve a second. To see the tracking of ARCore directly without the gyroscope prediction you can do this:
Comment out line 145 of
AryzonMainPoseDriver.cs like so:
//s_CardboardHMDInputTrackingDevice = device;
You will notice the cube’s motion has a bit of a delay. I wonder if you will still notice the tracking error.
I will do some tests to see if the performance of ARCore is affected by the Aryzon mode.