Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AR synchronization with Naver map sdk #2

Merged
merged 31 commits into from Aug 15, 2021
Merged

AR synchronization with Naver map sdk #2

merged 31 commits into from Aug 15, 2021

Conversation

Snowapril
Copy link
Contributor

This revision includes:

Changes

1. Setup ThomasGorisse/Sceneform SDK

2. Physically based gltf rendering with filament dependency

3. Collect nearby symbols using Naver map SDK

4. Render symbol augmented information to proper direction

References

  1. https://developers.google.com/ar
  2. https://github.com/github/super-linter
  3. https://github.com/google-ar/arcore-android-sdk
  4. https://github.com/ThomasGorisse/sceneform-android-sdk

Snowapril and others added 18 commits August 1, 2021 12:04
For rendering nearby building information,
it need to know gps location of current device.

code is referenced on https://navermaps.github.io/android-map-sdk/guide-ko/4-2.html
For correctly navigating user to specific building, it need exact accelerometer & magnetic field sensor value.
Continuously query their values and create rotation matrix.
And add some comments
there is just textview for now
calculate bearing between two locations and return
Copy link
Collaborator

@lijm1358 lijm1358 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App keeps crashing after about 10 seconds of running with LogCat:

2021-08-06 11:31:26.482 27278-27278/com.sinbaram.mapgo E/Filament: Panic
    in HandleBase::HandleId filament::OpenGLDriver::allocateHandle(void *):348
    reason: OpenGL backend handle arena is full, please increase FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB which is currently set to 4 MiB.

I know project is under development, so wonder if it's normal.

@hyunyunV
Copy link

hyunyunV commented Aug 6, 2021

LGTM

Copy link

@hyunyunV hyunyunV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Snowapril
Copy link
Contributor Author

Snowapril commented Aug 6, 2021

App keeps crashing after about 10 seconds of running with LogCat:

2021-08-06 11:31:26.482 27278-27278/com.sinbaram.mapgo E/Filament: Panic
    in HandleBase::HandleId filament::OpenGLDriver::allocateHandle(void *):348
    reason: OpenGL backend handle arena is full, please increase FILAMENT_OPENGL_HANDLE_ARENA_SIZE_IN_MB which is currently set to 4 MiB.

I know project is under development, so wonder if it's normal.

Oh it is weird. I think it is internal problem in sceneform sdk while using flilament dependency.
There is similar issue in filament repository.

I'll check it out today. Thanks.

@Snowapril
Copy link
Contributor Author

@lijm1358 What device did you build on? Android studio emulator or your device?
If it was your device, please comment your device name here.

@lijm1358
Copy link
Collaborator

lijm1358 commented Aug 6, 2021

@lijm1358 What device did you build on? Android studio emulator or your device?
If it was your device, please comment your device name here.

I was running on my device Galaxy S21+(SM-G996N), Android 11.

@lijm1358
Copy link
Collaborator

lijm1358 commented Aug 6, 2021

btw, I was just commented out some lines build.gradle (app) before gradle build cause apikey.properties is not exist, and don't know how does it look like. Though api key doesn't seem to be used in this branch, but this might have affected the error above.

def apikeyPropertiesFile = rootProject.file("apikey.properties")
def apikeyProperties = new Properties()
apikeyProperties.load(new FileInputStream(apikeyPropertiesFile))

@Snowapril
Copy link
Contributor Author

btw, I was just commented out some lines build.gradle (app) before gradle build cause apikey.properties is not exist, and don't know how does it look like. Though api key doesn't seem to be used in this branch, but this might have affected the error above.

def apikeyPropertiesFile = rootProject.file("apikey.properties")
def apikeyProperties = new Properties()
apikeyProperties.load(new FileInputStream(apikeyPropertiesFile))

@lijm1358 Ah, that is the main cause of crash I think. For keeping secret api keys from public repository, I add ignore rule in .gitignore for keeping out of secret key file from being included in commit.

I'll add API secret key file management guide in project README later. At now, you just need to add "apikey.properties" file to the client directory. After that, you should fill its content with key-value pair. I shared a copy of secret key files to the discord, please check it out.

@lijm1358
Copy link
Collaborator

lijm1358 commented Aug 7, 2021

Ah, that is the main cause of crash I think. For keeping secret api keys from public repository, I add ignore rule in .gitignore for keeping out of secret key file from being included in commit.

I'll add API secret key file management guide in project README later. At now, you just need to add "apikey.properties" file to the client directory. After that, you should fill its content with key-value pair. I shared a copy of secret key files to the discord, please check it out.

@Snowapril Adding the key file not worked for me unfortunately... maybe should try another android device.

@Snowapril
Copy link
Contributor Author

Hmm.. maybe there exists uncovered test case in this branch yet.
I registered new issue(#4) about testing in the outside.
At now, I think this PR need to be closed for a moment.
After testing application and debugging your issue and then I'll reopen this PR.
Thanks for reporting.

@Snowapril Snowapril closed this Aug 7, 2021
create symbol renderable data class for managing symbol nodes
SymbolRenderable can be compared with Symbol variable.

With this new data class, we can create renderables which did not exist
before.
Before, application continuously create renderables even they already
exists in renderable list.

Now, rendering routine changed like below.
1. Collect nearby symbols
2. Create renderables which did not exist in mSymbolRenderables
3. Delete renderables which exist in mSymbolRenderables but not in new
@Snowapril Snowapril reopened this Aug 10, 2021
@Snowapril
Copy link
Contributor Author

@lijm1358 Can you check crash one more time? I fixed some stuffs

@lijm1358
Copy link
Collaborator

@Snowapril No crashes anymore, everything seems to be work fine.

Snowapril and others added 4 commits August 11, 2021 16:55
Set camera movement only once and set tracking mode as `Face`
As camera is updated manually by code, camera tracking mode is automatically set to `nofollow`. But if camera mode is `nofollow`, without manually camera update, there is no camera movement.
Therefore, update camera movement only once and set tracking mode for correctly working
this commit will be removed after debugging all ar rendering stuffs by rebasing
@Snowapril Snowapril force-pushed the ar-maps branch 2 times, most recently from f2396c9 to 75ea13d Compare August 15, 2021 02:50
@Snowapril
Copy link
Contributor Author

Snowapril commented Aug 15, 2021

Now looks clear and there is no more crash. I think we can merge this branch to main

@Snowapril Snowapril merged commit b0ccbc4 into main Aug 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants