Comments (6)
This is something that we used to be able to do with Tango, by saving and loading area definition files. Is something similar in the roadmap for ARCore? Or is the plan to utilize the (upcoming) Visual Positioning Service instead?
from arcore-unity-sdk.
Hi, Cloud Anchors was released in ARCore SDK for Unity v1.2.0. Although it does not allow long lived anchors (they live up to 24 hours), it may help with some of these session to session use cases.
from arcore-unity-sdk.
There is currently no built in way to persist anchors from session to session. If you want to keep anchors around between sessions, you'll need to add your own localization code and then make sure to properly offset the camera position and the anchors when they get placed in the world.
from arcore-unity-sdk.
I'm also trying to persist anchors from session to session, but I'm confused over a couple things. So far, I can cache and reload anchors between sessions, but although they retain their relative rotations and distance to each other, they aren't being placed in the same physical location as the previous session. Interestingly, if I fire up a blank session, add some anchors, save them, detach all anchors, and reload them from the cache, they will retain their physical location and rotation, regardless of where the camera is when I load them. Why is that? I thought that I would've had to offset the translation and rotation values of the anchors to account for the new camera position? It seems like I need to persist data from the session object so that it can be restored in the next session.
Based off your comment @chaosemer, I created a PoseSnapshot class with two members: ObjectPosition and CameraPosition. Both hold the Translation and Rotation values at the time the anchor was created through a user tap. These PoseSnapshots is what I'm caching, and then I'm creating Session Anchors from them on load. From reading the docs, my understanding is that the Translation and Rotation values can change drastically as ARCore's understanding of the world improves. Because of this, I'm surprised my objects retain their physical location so well in the same session considering any updates to the coordinates will be lost as the snapshot only holds the ObjectPosition from the time the the user taps Save.
Also can you clarify what you mean by localization code?
Is there an equation you can provide to help me with getting this camera offset correct to persist the physical locations between sessions (if that is in fact what I need to do)
Update: I'm noticing that even during the same session, if the planes I'm tracking get lost and then I load the anchors once they're back, the physical locations aren't perfect. If I get some trackables, place anchors, and move around but still have the same trackables, the anchors are loaded perfectly regardless of camera position.
from arcore-unity-sdk.
can you provide some reference for how can we add localization using arcore?Some code snippet or some way to start with localization?
from arcore-unity-sdk.
Please look at the Cloud Anchors sample in our SDK for examples of how to localize two people to the same space.
from arcore-unity-sdk.
Related Issues (20)
- Pixel 2 XL - your devices doesn't support depth? HOT 1
- ARCore app crashes in release mode in Flutter.
- Crash in ArPresto_update(), ArSession_update(): java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) HOT 4
- Camera freeze on some devices like Samsung Galaxy A40
- Can you provide local support for Cloud Anchor?
- AR Core Cloud Anchors stopped working
- Black screen when I use user's camera on Xiaomi Mi A3. AR Face.
- 'SpatialTracking' does not exist HOT 2
- Raycast from Image Position
- [QUESTION] Can I use depth api and cloud anchors at the same time??
- Crash on ArSession_configure on OPPO CPH2135 device HOT 4
- Unable to record with Recording API
- Persistent Cloud Anchors sample app - Failed to host a Cloud Anchorwith error ErrorNotAuthorized. Happens for keyless authentication HOT 6
- Instant Preview: Black screen but it's still working?
- Unable to play recorded session
- "Session.RequestApkInstallation" returns no result.
- Retrieve position and rotation from Playback API
- arcoresdk+unity urp let background blue
- Redmi Note 8 ARCore not able to scan surface
- Dont workin Samsung galaxy note 10+
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arcore-unity-sdk.