Git Product home page Git Product logo

christophgeske / arcoreinsideouttrackinggearvr Goto Github PK

View Code? Open in Web Editor NEW
187.0 29.0 28.0 1.52 GB

Inside Out Positional Tracking (6DoF) for GearVR/Cardboard/Daydream using ARCore v1.6.0

License: MIT License

ShaderLab 6.11% C# 92.75% HLSL 0.91% Objective-C++ 0.05% Objective-C 0.02% GLSL 0.07% Smalltalk 0.07%
gear-vr seurat daydream cardboard arcore-device position-tracking arcore 6dof 6dof-tracking gearvr phone google-arcore marker-tracking mobile mobile-vr head-tracking google-play-services-for-ar inside-out-tracking slam

arcoreinsideouttrackinggearvr's Introduction

Inside Out Positional Head Tracking (standalone 6DoF) for GearVR/Cardboard/Daydream using ARCore v1.6.0

ARCore v1.6.0 enabled Inside Out Positional Tracking (six degrees of freedom) for all ARCore capable devices.

Introducing Remarks:

  • WARNING YOU MIGHT GET SICK: The current versions use interpolation and smoothing functions to cover up imprecise tracking. This leads to relative high latency in response to head motion. This is bad for people who get sick from motion sickness quickly. If you know that you are susceptible to motion sickness, these apps might not be for you jet.

  • Fast movements, featureless, extrem sunny and poorly lit areas can affect the quality of tracking severely. When the app starts up it takes 3-5 seconds for ARCore to detect a plain at this stage it is best to move just a little.

  • Your phone might get hot very quickly. Make sure to end the game after using. The Cardboard version seems to stay on even if the phone gets very hot while the GearVR version turns itself off automatically. Therefore, cardboard users should make sure to manually end the app after use.

  • The goal of this project is to bring high quality (6DoF) positional tracking to GearVR, Daydream and Cardboard using ARCore/ARKit software. The HTC Vive Focus and the Daydream powered Lenovo Mirage Solo offer this functionality already but are very pricy and not available everywhere yet. Because they use dedicated hardware, they can offer better performance and quality tracking. The Oculus Quest 2 currently offers the best 6DoF head and controller tracking which makes it a highly desirable device. Oculus/Meta Quest 2 - 128GB version - Amazon (Paid Link)

  • Before installing one of the apps (.apk files) make sure you have installed Google ARCore from the Play Store on your device. Check if your device supports ARCore on this page.

  • This project was part of my bachelor thesis. The thesis describes the challanges of bringing mobile VR to smartphones in detail and describes some experiments done to test the performance and other factors. It can be found here.

  • GearVR and Daydream support is officially over what's left for us is the open source Google Cardboard SDK which is said to recive updates in the future and run on the latest versions of the Unity engine. This open source Cardboard SDK is similar to the Daydream SDK which was quite good. How good the Carboard SDK is in delivering responsive VR I don't know yet since I haven't tested and compared it to the old and phasing out Daydream SDK. But since the Chardboard SDK is the only mobile phone VR solution left, we have no other choice to use it for all future projects. One unfortunate fact is that the carboard SDK doesn’t support a controller input. I hope the VR performance regarding latency and performance is on pair with what we are used to from Daydream VR, because I consider the Daydream and Gear VR solutions the lowest acceptable quality for VR. If the Chardboard SDK shows higher latency because it misses key features that where developed for Daydream developing any project with it would be doomed to be a bad experience making users sick.

Software Description:

Projects and Apps (.apk) Description Recommended Devices VR Headset
WhiteIsland.apk Simple environment. Using nativeARCore for tracking. Noticeable latency due to the used smoothing function. Use the controller touchpad to fly forward in viewing direction and the trigger button to enable/disable visualization of real-world boundaries. All ARcore + GearVR compatible devices GearVR
BoxyRoomCardboard.apk App should run on every smartphone with ARCore support. Daydream users need to uncover the camera e.g. as explained here and might need to turn of NFC to avoid Daydream from starting on top of the Cardboard app. All ARCore compatible devices Cardboard
VikingVillageGearVR.apk Interesting because of the high-quality environment which was captured with the Seurat tool. This tool allows for the capture of a (small) area of a high-quality environment which allows for a limited free movement only in this captured area. All ARCore + GearVR compatible devices GearVR
VikingVillageCardboard.apk Interesting because of the high-quality environment which was captured with the Seurat tool. This tool allows for the capture of a (small) area of a high-quality environments which allows for a limited free movement only in this captured area. All ARCore compatible devices Cardboard
VikingVillageForOculusGO.apk The Oculus GO has no camera so there is no head tracking possible, but because the high-quality environment scene captured with the Seurat tool could be interesting for Go users as well, I added controller support so that flying through the scene by pressing the touchpad is possible. OculusGo OculusGo
VuforiaTracking(Experimental) This app uses Vuforia which has an ARCore integration for tracking. But the performance of the ARCore integration is very poor compared to native ARCore. Therfore this project will be discontinued. All GearVR capable devices (low tracking quality) GearVR
NativeARCoreTracking(Experimental) Is not up to date and will be removed soon. Please use WhiteIsland instead. All ARCore + GearVR capable devices GearVR
MovingMarkerTracking.apk Uses Vuforia Vusion which combines ARCore and Vuforias marker tracking. This combination allows for 6DOF marker tracking in a limited area in front of the camera. The marker can be found here. Simply open the marker on your pc screen or print it on paper and look at it through the camera when the app is running. Since ARCore 1.9 now supports moving marker tracking this project will likely be replaced soon since Vuforia Marker tracking has many issues. All GearVR capable devices (low tracking quality) GearVR

Installation

On Cardboard

Works with all phones who support ARCore. Just download the BoxyRoomCardboard.apk or the VikingVillageCardboard.apk (Seurat) and install.

Video showing BoxyRoomCardboard.apk in action.

You need to restart the app when misalignment between the headset and the head movement is observed. The misaligning is a bug which was solved for the GearVR version but is still present in the Cardboard/Daydream versions.

Cardboard VR apps lag the time warp functionalities that we can use in GearVR and Daydream apps. The Cardboard headset is not very good either if you can use a GearVR or Daydream headset to get a noticeably improved experience.

On GearVR (apps need to be signed first):

Installing on GearVR requires the app to be signed first. But since the current GearVR version is better than the Daydream/Cardboard version the few extra steps to sign the apk file are worth it for you.

Signing the .apk file:

First. Download the WhiteIsland.apk. or the VikingVillage.apk.

Second. Sign the apk using the free Injector for GearVR app. Just safe the .apk file on your phone, use the Injector app to sign it and install. Make sure the app you want to sign and install is not already installed on your phone because in my case this prevents the app from installing again.

If the Injector app doesn't work for you try this alternative: Find out your device ID here. With the .apk file and the device ID you can sign the apk yourself. How you can sign the apk is explained in this Youtube video. I recommend the option where you download the addosig.bat program to sign the apk. You can either follow the link under the Youtube page or download the Add OSIG.zip file containing the addosig.bat program directly from this repository.

Video showing WhiteIsland.apk 6DoF GearVR version.

Video showing VikingVillage (Seurat) 6DoF GearVR version.

Click the touchpad on the side of the headset once to recenter the view when you notice misalignment.

On Daydream and iPhone

Daydream users: You can either use one of the Cardboard apks or even better switch the Cardboard project over to Daydream inside the Unity project yourself. Use for example the "BoxyRoomChardboard" project and under build settings, XR settings replace Cardboard with Daydream.

iPhone user: You should look at this project first for a quick solution. Unfortunately only Cardboard VR, which lags some critical features like reprojection runs on iphones making iphones not well suited for mobile VR. However most iPhones support ARCore so you can try to download the cardboard project, switch it to IOS and install it on your device if you interested in this project. If I find the time, I will test and upload an iphone cardboard version as well.

TODO's and future work:

Improve Head Tracking

The current tracking version you find in this repository suffers from lag, jumps in position, drift from tracking being lost and other inconveniences. Fixing these issues seems very doable, and I am currently working on that most of the time. The most promising solution seems to use a filter which detects tracking errors and removes them. For filtering errors the kalman filter (video lecture here) and block post here looks like a good start and an Unity implementation can also be found here. I don't think we reach the same quality as dual camera setups in extreme situations but I predict a future version could offer almost perfect head tracking when just performing normal head movements. Since ARCore and phones get improved all the time, the tracking should constantly get better.

The new ARCore version (v1.11.0) now called "Google Play Services for AR" promises to support 60fps tracking which would be great for a smoother head tracking. The previous ARCore versions which are still used in this project use the 30fps tracking which in reality are not even real 30fps since there are a lot of tracking errors even with perfect lighting and environment condition. My first test showed that older devices like the S7 can not yet make use of the new 60fps feature and Google lists only the Pixel 2 and Pixel 3 as 60fps compatible on the supported device page. Also, the new ARCore supports build in depth cameras which might be interesting for the S10 5G and should improve tracking even more.

Hand Tracking

Hand and finger tracking seems to be the easiest way to bring 6DoF input to phone-based VR systems, luckily ARKit which is ahead of ARCore in many aspects recently announced full body tracking and joint detection which can also be used for hand (but not finger) tracking without the need to use special external software allowing for high performance hand tracking on phones supporting ARKit 3 right now.

Video showing ARKit 3 hand tracking.

Google recently released an apparently extremely fast and robust mono camera hand and finger tracking solution. The open-source code can be found here and a blog post here.

Robust and quick mono camera hand tracking developed by Google.

Hand and finger tracking software is also available from Manomotion and uSenseAR (video) and works in combination with VR and ARCore. Unfortunately, the performance requirements are very high and the software is not free of charge.

Video showing Manomotion hand and finger tracking in combination with ARCore.

Another open-source project for hand gesture recognition on ARKit can be found here.

Moving Marker Tracking

ARCore version 1.9 now supports moving marker tracking. Read more about it here. The MovingMarkerTracking app you find in this project is currently using an older version based on Vuforia marker tracking. I am now looking into ARCore based moving marker tracking which should be a much better solution. The interesting questions moving marker tracking opens up are:

  1. Can we use it to further improve head tracking?

  2. Can we add a marker to your hands/elbows/feets/controller to get some sort of hand/body/controller tracking?

But even if it works the limited field of view of the camera will probably make it less useful for many applications.

The company ZapBox already sells kits based on this idea as you can see in this video. Notice that they use a clip-on-lens to achive a greater field of view for the see-through image and the area where the moving markers can be tracked also gets bigger. I tested multiple wide angle clip-on-lenses but non of them worked with ARCore either stoping tracking all together or drifting heavily. The same seems to be true for ARKit as you can read here. Since some of the latest smartphones like the S10 have a dedicated wide field of view camera we can only hope that the ARCore team adds support for these cameras as well.

Markerless Controller Tracking

Google clearly thought about solutions to 6DOF controller tracking as you can read in this roadToVR article. But since thay use stereo cameras the results may not be directly transferable to mobile phones with only a single camera.

Images from a paper published by Google describing markerless controller tracking.

Read the Google paper here.

Environmental Understanding, 3D Scanning, Depth Maps And Boundary System

ARCore finaly supports depth maps. This means a 3D depth mesh of your sourounding is generated which can be used for exciting new features. Read about it in this article and on the google developer page.

Introduction video and some early apps developed with the new ARCore depth API

Also be aware that many phones do not support this feature yet. If your phone supports this new feature can be foun on the ARCore supported devices page. When your phone supports the new depth API this feature should work. For example the Snapdragon version of the S10 supports the new depth API but the international Exynos version doesn't. Why there are these differences even on phones with the same name I dont know, maybe this feature requires a special chip architecture.

Two 3D Scanner projects using Google Tango Open Constructor and the master thesis Tango-Poc are available as open source projects. I also recommend this informative video about Tango 3D scanning technology.

An ARCore version is also available (not open source) and a plugin for Unity can be bought here. It could be used to further improve the boundary system and automatically building a virtual environment which fits perfectly over your real environment. This is incredible, and I will try to implement something similar when the tracking works well. I recommend reading the related paper here and here (use scihub.tw to get free access). Also download the free 3D scanning app to check it out directly.

Another idea for the boundary system could be a kind of edge detection and visualisation algorithm as shown in this video.

Object detection/classification using the camera feet could allow for some unique game and application mechanics. Two projects using Google tensor flow as the underling machine learning software are available here and here.

6DOF Images, Videos and Light Fields

360° and 180° photos and videos are nice but with additional depth information they become really interesting. Positional tracking on GearVR would be a natural fit since no hand controllers are needed, mobile phones can display high resolution images and since the head movements are rather slow we have no problems with camera motion blur and loss of tracking. There are three distinct ways of approaching this idea. 1.) Image overlayed on a depth map either by capturing the depth map separately or by using software to recover a point cloud from a stereoscopic video (seen here) and further discussed here. There is already an app available on the Oculus store for GearVR which displays images and videos with additional 3D depth information. 2.) Photogrametry allows for higly realistic but static 3D models. 3.) Using a light field capture of the environment seems to be the holy grail of 3D photography. A demo project (video) was published by Google for free but is only running on desktop pc VR headsets. Using the seurat pipeline and this github light field project it might be possible to bring the same experience to mobile VR. The same is true for bringing very detailed photogrametry models on the phone in VR.

Further Ideas Worth Exploring

To further increase the reach, it makes sense to build apps that run on Android and iOS devices. The AR Foundation github project brings this functionality to Unity.

Using VR outside or in a large play space is a lot of fun and feels very different from games experienced inside where the ability to move freely is limited. Here accessing 3D maps might be interesting and result in exiting apps consisting of AR and VR elements.

Other Interesting Projects:

Shooter Game Quake

This iconic shooter game can now be played using the GearVR with the option of using positional tracking. A good introduction video can be found here. The game and source code can be downloaded here. After signing the .apk you can use the GearVR controller to activate the positional tracking mode in the game settings. I am very impressed with the performance and tracking quality even on old phones like the S7. The developer didn't use a game engine like Unity to build the game but instead used the Android Studio which seemed to allow him to get a higher performance out of the phone by putting some tasks on different cores. I like the way he managed to give the user a window to the outside by tapping the headset but I think it is better to show the surrounding automatically when you come closer to an obstacle since you might forget to check the surrounding when you immersed in the game (I will start working on this soon since I have an idea already). I think this is excellent work and you should check it out.

iPhone + ARKit + Cardboard

Such a project can be found here and here. A paper comparing ARCore and ARKit can be found here (use sci-hub.tw if you don't have access to the full text). Most important findings of the paper for this project are that ARKit tracks with 60fps, can deal with faster movements and plain detection is more accurate indoors. ARCore seems to be better outdoors. Also noticeable is the finding that the performance drops on some older Android phones like Nexus 6P and Nexus 5X. According to @lvonasek ARKit is more accurate because of a better camera calibration process by Apple.

Positional tracking on iPhone using ARKit + Cardboard.

Fast Travel Games

They also experimented with ARCore and GearVR. They put some serious thought in solving many of the little issues but the code they use seems not to be public. Learn more here.

Fast Travel Games showing of simplefied Apex Construct running on GearVR.

Google Tango

Tango is only available on the Asus Zenfone AR and has better room tracking capabilities than ARCore thanks to the time of flight sensor build in. Useful links here, here and an excellent talk about the underlying technology here. It was also shown in this video that some form of hand tracking using the depth sensor is possible. The main issue with the now rather old devices is that the chip can't handle all the performance requirements and overheats rather quickly as was mentioned in this article.

HoloKit, Aryzon, ZapBox (Cardboard AR)

ZapBox, HoloKit and Aryzon headsets.

Some projects (e.g. ZapBox) use the camera seethrough mode for AR projects but I don't think it is a good approach to use a mono camera and add 3D objects on top of the 2D camera image. This is guaranteed to give you a bad experience. The HoloKit project builds on a much better idea but would profit from a better headset design and some improvements we already see in the Daydream and GearVR headsets like low persistency screen mode and smooth head tracking. It would also profit from smoother positional head tracking which is the mission of this project.

This introductory video, the github project site and the HoloKit website can give you a good overview over the HoloKit project. You can also buy the headset from thair website but more on that down below.

There is also a company called Aryzon which is selling almost the same product with thair own SDK which is also open source. A good review of this headset can be found here and here. I only found an older video showing a view through the headset with the tracking looking terrible but tracking should be much better with ARCore.

There are many possibilities that such a headset would allow for some examples here (markers), here (hand tracking) and here.

Be careful when buying a no name headset they are very likely not compatible with the HoloKit and Aryzon SDK's since distance between the lenses and phone as well as the mirror and lense quality will make a big difference. The lenses on the original HoloKit (video) and Aryzon video headset look much more advanced compared to the ones on the cheaper Chinese versions (video 1 and video 2).

Despite the interesting use cases, I can not give an unconditional recommendation to buy the HoloKit or Aryzon headset right know mainly because the software is not as advanced as we used to from the GearVR/Daydream tracking which in my opinion is the minimal standard we need to have an enjoyable experience.

Improvements to the ergonomic would also be required. A different headset design which was already planed and promised for the end of 2018 by the HoloKit team is still not available and I would suggests the software flaws need to be fixed first. Improving the HoloKit idea further seems to be an interesting project and I am currently testing the Aryzon headset to see if it can be made better with the right software tweaks.

ZapBox shows of some interesting ideas like a lens to increase the field of view and markers for the controller tracking.

Marker based 6DoF hand controller developed by ZapBox.

However, the ZapBox software needs a lot of improvement (video showing funny tracking errors here) and in my opinion lags far behind Googles ARCore tracking. The underling idea of creating a mixed reality headset with only one camera seems somewhat silly, and I can not recommend doing it when not also tackling the stereoscopic issue. Zapbox tries to improve the image by using depth informations from the pointcloud and bluring parts of the image as they state in this reddit post. The Phantom AR project also worked on the issue of generating a stereoscopic view from a monoscopic image see here for more info. You can try out the 2D to 3D conversion results yourself by watching this video and putting your phone inside a headset starting at timestamp 2:31.

To get a 3D view from a 2D image it is a good approach to first capture a depth map and use it together with the mono camera image to generate a 3D stereoscopic view. For this approach the upcoming depth sensors in the latest phones could be leveraged. There is also a lot of machine learning research in the area of inferring depth information from 2D video or directly generating 3D video output from 2D video input. Having a high quality, low latency, wide field of view 3D passthrough image on the GearVR would open the possibility for some interesting mixed reality applications on such a cheap headset and would also be beneficial to the boundary system so something similar to the solution found in the Oculus Quest where the real world is displayed to the user when he comes to close to objects could be implemented.

Kinect + GearVR

This combination seems be suited for bringing full body movement to the GearVR: Check out the related reddit post

ALVR

This sweet open source software project connects the GearVR to the pc and uses head tracking for simulating expensive headsets. Check out the project here if you haven't heard about it. For Oculus Quest users this should be interesting as well, see this video to learn more.

Phantom AR A Cloud Processing and Networking Platform

Using the computing power of the cloud to process data seems to be the path of the future. The Phantom AR project explores the possibilities of such a future. Learn more about it in this video

Multi User Experiences

The Just a Line experimental project explored the possibilities of multiuser experiences between iPhone and Android phones. This project makes use of the cloud anchor capabilities of ARCore.

Owlchemy labs showed of the research project mobile spectator which allow a third person to use a mobile phone running ARCore to see and participate in a VR experience. This allows for interesting new experiences/games or could make VR more social.

A multiplayer VR game based just on the same starting point (seen here) would also be possible not requiring a connection to the cloud but some kind of marker or phone to phone communication to know the location of the other player. However in my opinion using cloud anchors is the right way to go since it relies on finding the same feature points in a scene to match the location.

Leveraging The Front Camera For Eye Tracking

Is an interesting idea and in this paper (use scihub.tw to get free access) a working version was developed.

Are you aware of further interesting projects, or you work on an interesting project yourself? Please don't hesitate to open a new issue and spread the word.

Some thoughts about the optimal and future hardware:

The End For Mobile Smartphone Based VR?

The Daydream and GearVR platforms are both loosing momentum with Daydream not beeing supported by the latest Pixel phones and GearVR no longer beeing supported by the upcomming Samsung phones. Standalone headsets like the Oculus Quest offer a simpler setup and better experience since the hardware can be optimised for VR and multiple cameras be used for controller tracking.

Unity 2019.3 also drops support for phone based VR like Daydream and GearVR in coming updates, read here

Phones will get better in the future and get more capable when it comes to display VR experiences. However they will likely not play a significant role despite them beeing the chepest way to enter VR if you have the phone already and only a headset with lenses is required. But with the losing support it will get harder and harder and as a developer to create experiences and distribute them to your followers therfore you should not think twice about it and go with a standalone Oculus Quest, PC headset or the PSVR.

Asus Zenfone AR

Supporting Daydream which delivers a good enough VR experience and in combination with its highly accurate depth camera and the Google Tango software it allows for excellent positional tracking. The disadvantage is that Google stopped developing Tango, that almost no one owns the hardware and that no performance improvements are expected in the future making the development for this device and the Tango platform not very attractive. If you decide to purchase this device be aware of the overheating issue due to the rather old chipset.

Galaxy S10, S8, S9, Note8 and so on

They deliver better performance than the S7 which is important for running hand tracking and better looking games. In terms of image quality, field of view and tracking latency, they are identical to the S7. The ultrawide field of view camera of the S10 could be interesting for improving hand and marker tracking in the future but this would depend on the tracking software (Manomotion or uSense) and ARCore if they support the wide field of view camera. Be aware that the S10 doesn't support Daydream so if you want to use Daydream and GearVR on the same device you should get an S8 or S9 instead.

Galaxy S7

Runs ARCore and works with many GearVR headsets but tends to overheat quickly. In combination with a cheap second hand GearVR for roughly 30$ it might be the cheapest device for experiencing mobile VR right now. This software project was tested on the S7.

Daydream ready phones

They are powerful, often also support ARCore and the VR quality with the second generation Daydream View is almost as good as GearVR. Daydream is a much more open platform compared to GearVR and runs on multiple phones which only need to meet the hardware requirements and the ok from Google or the device manufacturer to be supported. That said the S10 didn't seem to get Daydream support which is strange since it clearly has the capable hardware. It should be possible to root and force Daydream on the S10 or other ARCore ready phones but that trick comes which some risks and might not work for you in my case testing it on the S7 once it kind of worked but I had many issues making it unusable. If you are interested in how to force Daydream on your device have a look at this and this XDA developer post. Currently, this project is working better on GearVR since resetting the view on Daydream is somewhat more complicated. This might change in the future if the issue can be solved. Since the Pixel 3 is one of the few phones which now supports 60fps tracking it might become one of the best phones for mobile VR with positional tracking and this should be further investigated.

Most other phones

Most phones out there do not support GearVR or Daydream and if you are not willing to mess with the system, your only option is Google Cardboard which is noticeably worse because of two factors. The lense quality of Cardboard lenses and the inferior Cardboard software. This project offers a Cardboard version but I recommend when you have the option to use a GearVR or Daydream project instead. On some phones which support Daydream the Cardboard apps now also offer low persistency mode and great tracking performance which where introduces in a new Cardboard SDK (read more about that here) but older phones do not offer a good experience using the Cardboard software. If you are willing to mess around, you can try to force Daydream on the phone like explained in this post. The problem is that the Daydream requirements often have their justification (the S10 might be an exaction from the rule) and the experience might not be as good as on supported devices.

ARCore runs on many more devices compared to Daydream/GearVR and your phone might support it even when VR is not supported. When your phone is not an ARCore ready phone you can force it either with the help of this ARCore for everyone github project or by rooting your phone and using a special ROM which contains the ARCore feature. But the chances of getting good tracking when forcing ARCore on an unsupported device are not very good since the ARCore software seems to be specifically adjusted to the phone camera to work correctly. But you can give it a try to know for sure.

The OnePlus 7 Pro should also be mentioned here since it will offer a 90Hz refresh rate display which should make a noticeable difference in the visual quality. Currently, it is not clear if it will get ARCore support and if forcing Daydream onto it will work. So no recommendation yet but keep an eye on this interesting device.

An overview over all the commercially available mobile VR headsets can be found here.

How to Seurat:

What is Seurat? Read the introduction here In short it can capture a high-quality scene and make it run on a mobile device. The catch only a predefined area looks sharp and correct. In this experience it is a 2x3 meter box between the wooden gate and the stone bridge. This means if you try to cross the bridge you will see holes in the textures and distorted meshes. This is the limitation of this technique, but the area can be made bigger. I am not sure how big the area can get I will try that later for now enjoy the limited area between bridge and wooden gate. ;) Here and here you can learn how to capture a high-quality scene.

Video describes how a Searat scene is captured for later use with a mobile VR headset.

You will need to download this project for the pipeline to transform the captured data. See the reddit post for more details. Here you can learn how to bring the captured scene in your unity project.

Trouble Shooting:

If you lose tracking and the virtual and real-world movement doesn't line up correctly press the touchpad on your GearVR controller or on the side of your GearVR to realign the view. If using the cardboard version there is no convenient solution yet and you need to restart the whole app. Moving slowly also prevents the cameras from becoming misaligned on Daydream devices.

If the positional tracking does not work, please make sure you have installed the ARCore App from the Appstore.

If you experience very low frames and bad jittering please restart the phone and try again sometimes the phone does things in the background that hurt performance. The app should run smoothly at 60fps.

Everything here was tested on the S7 if you have problems getting it to work please open a new issue and let me know.

Credit:

I want to give credit to the following developers who published useful information I used in building this project:

Affiliate Disclaimer:

We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com, Amazon.fr, Amazon.de and affiliate sites.

Privacy Notice:

This project uses software from Google (ARCore, Daydream, Cardboard) and Facebook (Oculus) and I don't know exactly what data is collected now or in the future. When using their software, we also have to agree to their privacy terms and conditions. Data about your movement could be used to make predictions about your physical health and provide a digital fingerprint of you since the movement is unique to every user. Information about your surrounding using the camera might be even more problematic and should not be sent to Google servers. This project doesn't store any of your data but please refer to the privacy policy of Google and Oculus to learn what data they might collect on you.

Google Privacy Policy

"This application runs on ARCore, which is provided by Google LLC and governed by the Google Privacy Policy"

Oculus Privacy Policy

An excellent vice article about the challenges we face in VR/AR privacy can be found here and I can highly recommend this read if the topic is new to you. If this topic is close to your heart you might be interested in the openarcloud.org oragnisation as well.

arcoreinsideouttrackinggearvr's People

Contributors

christophgeske avatar t-bond avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arcoreinsideouttrackinggearvr's Issues

WhiteRoom and WhiteIsland occasionally go to S9+ "Standby"

Both apps are now functioning excellently. However, I am noticing that sometimes (always? - unsure!) after running for a couple of minutes the phone goes to standby. That is, the screen just goes black, and will come right back to where it was if the power switch is pressed again. I initially thought that the power switch was accidentally being pressed by the system I use to hold the phone in the open Daydream headset, but now I'm doubting that. This does not seem like a typical heat-caused shutdown -- for which I'd expect a warning and the phone completely shutting down -- not just entering standby and coming right back when the power switch is pressed again. It's quite possible this is some heat-related aspect with which I'm unfamiliar, but I don't have enough information at this point to judge what's actually happening.

Viking Village (Daydream) is not tracking at all (S9+)

The Daydream/Cardboard build of Viking Village is not tracking for me. There is a static image but it does not perceptibly change with head or body movement. The Daydream/Cardboard version of BoxyRoom appears to be working properly at least in a short test so far. Addendum: The Gear VR version of Viking Village appears to be working fine.

Example apk files install under same package name

Hi. This is great work and WhiteRoom is working fine here on an S9+ (actually using a DayDream 2017 headset). However, it appears that both WhiteRoom and WhiteIsland are building to the same package name, and so both cannot be installed simultaneously without additional modifications. Could these be separated out with different package names for simultaneous install? Thanks!

Camera Set Up Guide

Is there any chance you send me a guide on how to set up the ARCore Device Object as well as the UserCamera? I had a few things go wrong while importing but I've gotten everything working and I just wanted to make sure I had everything set up the same. If you pass this on to me, I am willing to help out with the project. Especially by making some guides ( pdf and video) for setting the project up, modifying it as well as some videos that who what it can be turned into. Please lmk, this is absolutely amazing work.

ARcore v1.11

我的手机用的是ARcore最新版本,我在unity导出apk时是不是要用1.11的SDK,还是要怎样操作?因为我发现按照原来的方式导出来摄像头没有定位功能

IDEA: Idea for better 6DoF controller tracking

img_20180915_215220
I put this as an issue because there isn't really anywhere else to put it. It is not an issue.
Could something like this but with markers
attached and a Gear VR controller help with the FOV problem by increasing visibility to the camera?

A couple of thoughts re Viking Village (Gear VR version)

So this is working on my S9+. It is somewhat laggy -- that is, some jitter in tracking, and blue background can take time to fill in with the image as you move your head or body, with new blue background appearing in other areas. The same tracking issue I've noticed with the other apps is here also -- sometimes the tracking motion with body movements is backwards -- that is, when you physically move toward an object, you end up moving away from it in VR instead. The detail in this app is really very impressive!

followARCoreCamera - correct the script filename

followARCoreCamera - correct the filename (first letter to capital), because the script doesn't load, and the built app doesn't work as supposed.
The same issue with antialisingCorrection.cs

Tracking Andy objects drifts

Thank you for the wonderful code. I tried to use your code to track the Andy objects in HelloAR example. When I wear the headset and view, the andy objects are drifting. Any possible fix for the same?

Why Are There Oculus Go .apks?

Why are there Oculus Go .apks if the Oculus Go 1) does not have ARCore and 2) does not have a camera to use for tracking?
Am I missing something?

ARCore tracking is jumping despite 30 fps

Using lerp to smooth out the jumps is possible but than every quick movement of the user also gets smoothed. This solution is not ideal therefore I have to work on a fix.

One possible solution seems to use the accelerometer to check if the data coming from the arcore camera are correct.

The idea of using the IMU was mentioned here
google-ar/arcore-android-sdk#604
by one of the google arcore team members.

Another fix might be to use a filter algorithm which cuts off movements which are to fast for humans or which are unlikely. For example one could record the last few frames and if the next frames differs to much from the ones before it could be a jump in the tracking and filtering it out might help to eliminate the jumps keeping responsiveness high and lag low.

Positional tracking only rendering with 30fps.

As long as ARCore is not supporting faster frame rates this issue might not be solvable. Therefore we have to live with a small jitter when moving through the room and imprecise tracking when moving to fast.

Can the WIP Vuforia project be shared?

Hello,

Thank you for all your work into bringing positional tracking to the Gear VR. You said in your README that you'd be willing to share your WIP Vuforia marker controller tracking project. I'm working on something similar and any additional information would be useful.

Reset viewing direction/position to start point.

Resetting the view to the starting point might be useful for some experiences and should get a special button combination so it doesn't need to be implemented by everyone who wants to use this project and needs this functionality.

Detecting real world barriers

Is there a practical method to use signals or cues from the camera to detect and warn (audibly or visually or both) of real world barriers or other hazards -- e.g. walls or other obstacles?

Can ARCore InsideOut Tracking be combined with GearVr, while streaming with ALVR, to achive 6DOF?

Hi,

This s great project and running WhiteIsland_ demo was very smooth. Thank you to the developers. I am just getting my feet wet with AR and VR, and I am learning a lot so far.

I am using a Flight Simulator, Condor Soaring, by injecting it to Revive and Streaming from my PC (win 10 64Bit, i7-7700K, 32GB, RTX 2080) to Gear VR (with Samsung S9) with ALVR. It is smooth and functional at 60FPS. It is a native 3DOF but lacks the 6DOF (5DOF really needed) to be able to lean forwards (to look at panel instrument, PDS or maps) and sideways to better see over the edge of the glider's cockpit (not as important). Note that up and down movements are marginal. Note also, that the requirement is mostly for the front facing position (looking over shoulder +/90, up and down +/-80, leaning forward or side to side by up to 30cm from neutral position). Also, so far 1 or 2h session with ALVR doesn't make the phone heat up much and drain battery too quickly.

Is there a way to combined ARCore Inside Out Tracking with GearVr, while streaming with ALVR, to achieve 6DOF?

If so, how can I integrate it?

Would fixed marker/stickers help smooth and consistent tracking and would ARCore affect adversely the mobile phone CPU load and render image fps received)?

Thank you in advance for your help and clarification.
Donat

Missing Prefabs in Unity Project

Hello, I'm trying to open the BoxyCardboard Unity project. I get an initial error stating that is was made with an earlier version of Unity, and then when I open it there are lots of missing prefabs. Any ideas how to fix this? Thank you!

ARcore的移动比例问题

我尝试了一下,感觉VR场景中和现实场景的移动比例好像有问题,现实场景移动了很长一段距离,但是VR场景中移动的距离很短,是模型的问题吗?有没有调节移动比例的设置?

Unregular frame drops on S7 when controller is connected.

I noticed that sometimes the frame rate drops noticeably when the controller is connected. This only happens sometimes and seems to be caused by other processes running in the background.
If you notice frame drops try turning of bluetooth to disable the controller.

I guess the reason for this is that the app is hardly able to do the 60fps and even a small program running in the background leads to noticeable frame drops but I am not 100% sure about this.

Proposal for recenter issue with the daydream HMD

Hi, first of all thank you for your great work. Im not sure if I overthought the following problem, but I had an issue with the build in recenter Action from DayDream. The behaviour of the ARCam in relation to the VR Camera really confused me and I couldnt find a solution anywhere. So If anyone stumbles across the same issue this is how I tackled it:

  1. The problem:
    Everytime you recenter in a different orientation than the starting orientation of the app, the VR Camera gets aligned correctly but the ARCore Camera is not affected (which is quite obvious). But it had no affect either, when I tried to rotate the ARCore Camera to the new orientation. And I tried a lot of approaches to fix the rotation issue.
  2. My solution:
    In the end I watched the last X rotations of the VR camera and listened to the GvrControllerInput.Recentered event to get noticed when the event started. You have to listen to the last rotations because it might take one or two more frames till the recenter actually takes place. Then you can spot the desired value. This angle is used to rotate the position vectors in the followARCoreCamera so you still walk straight on.
public class RecenterCorrection : MonoBehaviour {

    public static float ANGLETHRESHOLD = 2f;
    public static int ROTATIONQUEUESIZE = 10;

    //camera for rotation values
    public Transform gearCamera;
    //AR Core Camera for real world position values
    public Transform arcoreCamera;
    //class which "followy" the arcore cam position with the daydream camera
    followARCoreCamera arcorecam;
    //stores rotation each frame from daydream camera
    Queue<Vector3> rotations;
    //flag which indicates that recentered got triggered
    bool watchRotation;
    // Use this for initialization
    void Start () {
        arcorecam = GameObject.FindObjectOfType<followARCoreCamera>();
        watchRotation = false;
        rotations = new Queue<Vector3>();
    }

    // Update is called once per frame
    void Update () {

        //only watch last ROTATIONQUEUESIZE rotations. The rotation recenter can last some frames, so we have to track more rotation values to spot the action and the angle
        if (rotations.Count > ROTATIONQUEUESIZE)
         {
            //if queue is full kick out the oldest element
             rotations.Dequeue();
         }
        //enque the newest rotation value of daydream cam
         rotations.Enqueue(gearCamera.rotation.eulerAngles);

        //recentered got pressed might be executing soon / executed
        if (GvrControllerInput.Recentered)
        {
            Debug.Log("[IO] Recentering Done");
            //watch the Queue with stored rotations to spot the angle difference
            watchRotation = true;
        }

        if (watchRotation)
        {
            //get current y angle of daydream camera
            float yAngle = gearCamera.rotation.eulerAngles.y;
            //check if its inside our "recetered" anglethreshhold
            if ((yAngle > 360f - ANGLETHRESHOLD && yAngle <= 360) ||
                    (yAngle >= 0f && yAngle < ANGLETHRESHOLD)){
                //get the odlest y angle of queue
                yAngle = rotations.Dequeue().y;
                //remeber the angle before yAngle
                float angleBeforeRecenter = 0f;
                //as long ad the yAngle is not in range, dequeue the rotations
                while (!((yAngle > 360f - ANGLETHRESHOLD && yAngle <= 360) || (yAngle >= 0f && yAngle < ANGLETHRESHOLD)))
                {
                    angleBeforeRecenter = yAngle;
                    yAngle = rotations.Dequeue().y;
                }
                //now angleBeforeRecenter has the angle before the recenterd rotation of (almost) 0
                Debug.Log("[IO] Recenter finished, y Angle almost 0f");
                //tell arcore cam the angle, so the delta Vectors can be rotated accordingly
                //we have to substract the old vector, cause this vector is always the new origin rotation
                arcorecam.mirrorAngle = (arcorecam.mirrorAngle - angleBeforeRecenter)%360;
                Debug.Log("[IO] ARCore mirrorAngle = " + arcorecam.mirrorAngle);
                //stop watching the rotations
                watchRotation = false;
            }
            //if not, keep on recording the rotations of daydream cam
            rotations.Enqueue(gearCamera.rotation.eulerAngles);

        }
    }
}

If you have a more convinient solution or if i missed sth please share your thoughts. I just wanted to share this so if another person has similiar issues he can start with my approach.

Greetings

Micha

whiteisland.apk built with wrong name and no launch icon

The current whiteisland.apk appears to have been built with the name com.VRWizard.WhiteIsland and while it can be signed there is no obvious way to launch it since after installation there is no launch icon, though the app does appear in the Android installed app list in settings.

Detected plane moves with the camera

I tried the boxychardroom example. I dragged the DetectedPlaneVisualizer of ARCORE to Player Gameobject. I have two issues with this.

  1. The detected planes move as I move the camera.

  2. I tried to place andy prefab on a specific location. If I move the camera, the 3d object moves as well instead of being static in its original position.

Please add Samsung S6 support!T_T

Hi,

Really been trying to get it to work on the S6. Phone is rooted and installed special apps using magisk and so on, yet still isn't functioning.

Thanks in advance for making it funciton on the S6!!!:) Plan to make some AWESOME apps!

other apps with 6dof?

Amazing demo apps for experimenting with 6dof.
Why doesn't some more exist, now that even a 140$ smartphone like a Samsung A22 does support Arcore?
Any link to other 6dof android cardboard apps?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.