Skip to content

Use OpenStreetMap in Unity, connect with GPS data

Notifications You must be signed in to change notification settings

Leonival/OSM-in-live-AR

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

69 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

what is this?

This is a demo solution for the OSS4SDG - Sustainable Smart Cities, Challenge # 2 – Development of apps based on OSM data (https://ideas.unite.un.org/sdg11/Page/Challenge2)

Thanks to source code from SnakeSneakS (https://github.com/SnakeSneakS/OpenStreetMap-Unity). The Youtube tutorialSloan Kelly 'GTA in Unity!? Use Real World Maps!' also helps a lot (https://www.youtube.com/watch?v=780Ia5e8LHQ).

Idea

The general idea is we hope to navigate in AR environment based on OSM 3D data. Step by step, we plan to

  1. Collect the height infomation of buildings and upload them into OSM. (Ongoing)
  2. Download the OSM data and create a 3D model in unity. (Fork and Developing)
  3. Developing the AR app in Microsoft HoloLens 2 with Mixed Reality Toolkit. (Demo pending)
  4. Connecting the live coordinate data in mobile phone with the HoloLens, through the app gps2ip based on bluetooth. (Completed: https://github.com/Leonival/OSM-in-live-AR/blob/9bba4966349b213043181cc53750bad4b8f7e04b/BLETest.cs)
  5. Georeferencing the coordinate from the real world to unity. (Ongoing)
  6. Creating the navigated interaction in HoloLens. (Pending)

Data

Open data includes

Both of them are raster data.
My colleague also collects building height data from SAR data. Paper name:

How

  1. Download map data (.osm file) from JOSM, an extensible editor for OpenStreetMap (https://josm.openstreetmap.de/). Download the data from website is not recommended, it might cause some error when rendering in unity.

  2. Put the .osm file in Assets/OSM/Data/

  3. In SampleScene, Find the component atacched to gameobject "OSMmap", change its OSMfileName value. If you named your .osm file as "name.osm", you shoude enter "name.osm".

  4. Open the scene document. Click the plan button to render the view.

  5. Build the app with the Mixed Reality Toolkit.

  6. Adjust and correct the position data in OSM, Mobile phone, and unity into the same coordinate system.

Study area:

Main campus, Technical University of Munich. OSM unity

License:

OpenStreetMap

About

Use OpenStreetMap in Unity, connect with GPS data

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages

  • C# 100.0%