AR mode in Yahoo! MAP

15d09153e7d56f8d73e8d9e519501a92?s=47 totomo
March 16, 2018

AR mode in Yahoo! MAP

Talk about AR mode in Yahoo! MAP which is implemented by using ARKit.

15d09153e7d56f8d73e8d9e519501a92?s=128

totomo

March 16, 2018
Tweet

Transcript

  1. 2018೥3݄16೔ 1 Kenta Tokumoto AR mode in Yahoo! MAP

  2. Outline • ࣗݾ঺հ • ARϞʔυʹ͍ͭͯ • ARKit + CoreLocation •

    ΦϒδΣΫτͷ഑ஔํ๏ʹ͍ͭͯ 2
  3. 3 About me ,FOUB5PLVNPUP 5XJUUFSUPUPNP  (JUIVCUPUPNP  2JJUBUPUPNP 

    ೖࣾ೥໨ ."1ͷJ04 8FC"1*։ൃ୲౰ 8&# %#13&447PM:BIPP."1ͷαʔ Ϗεվળʹ͍ͭͯJ04 8FC"1*ͷ෦෼Λࣥච͠· ͨ͠
  4. AR mode? 4

  5. Team 5 Product Manager Designer Engineer

  6. ARKit • iOS 11Ҏ߱Ͱ࢖͑ΔARػೳΛ࣮૷͢Δͷʹศ རͳFramework • AR mode͸Position TrackingΛඞཁͱ͢ΔͨΊ A9νοϓ͕౥ࡌ͞Εͨ୺຤ͷΈαϙʔτ

    • Android → ARCore 6
  7. ARKit + CoreLocation

  8. ARKit+CoreLocation 8 • ARConfiguration.worldAlignment.gravit yAndHeadingΛࢦఆ͢Δ • ݪ఺ͷҐஔ৘ใͱARKitʹΑΓߏங͞Ε ͨੈքۭؒͷݪ఺͸૬ޓม׵Մೳ AR ࣮ۭؒ

    N N (x n , z n ) (lat n , lon n )
  9. ARKit+CoreLocation 9 (0, 0) d [m] (x 1 , z

    1 ) (lat 0 , lon 0 ) d [m] (lat 1 , lon 1 )
  10. SCNNodeͷ഑ஔ • ϧʔτϥΠϯ (SCNPlane) • ؃൘ (3D) • ͚Μ͘͞+ΰʔϧϐϯ(3D) •

    ଍੻ (SCNPlane) 10
  11. ϧʔτϥΠϯ 11

  12. ϧʔτϥΠϯ 12 position eulerAngles.y

  13. ؃൘ 13

  14. ؃൘ 14 position

  15. ؃൘ 15 position

  16. ؃൘ 16 position • ϚʔδϯΛઃ͚ͯݟ΍͍͢ํ޲ʹճస • ౦੢ͲͪΒʹ഑ஔ͢Δ͔͸ɺਐߦํ޲ ͱ࣍ͷํ޲ͱͷࠩ෼͔Β൑அ͍ͯ͠Δ

  17. ଍੻ 17

  18. ଍੻ 18 position

  19. ଍੻ 19 position • ARSCNView͔ΒऔΕΔ pointOfViewͷpositionΛऔಘ • ݱࡏҐஔͷ࠲ඪΛ΋ͱʹҠಈڑ཭ ͱ֯౓Λܭࢉ •

    ଍੻͸ϥϯμϜͰग़͢Α͏ʹ materialʹઃఆ͍ͯ͠ΔUIImageΛ ಈతʹઃఆ͍ͯ͠Δ
  20. ͚Μ͘͞+ΰʔϧϐϯ 20 position SCNBillboardConstrain t

  21. LocationInfoProvider 21 public protocol LocationInfoProvidable { func location(completion: @escaping (CLLocation?)->())

    func nearbyRoutePoint(from origin: SCNVector3) -> SCNVector3? weak var delegate: LocationInfoProviderDelegate? { get set } 
 } protocol LocationInfoProviderDelegate: class { func locationInfoProvider(_ provider: LocationInfoProvidable, requestUpdateHeading heading: CLHeading) func ;ocationInfoProvider(_ provider: LocationInfoProvidable, requestUpdateLocation location: CLLocation, oldLocation: CLLocation?) 
 }
  22. LocationInfoProvider 22 locationInfoProvider.location { [weak self] location in guard let

    origin = location else { self?.displayError() return } self?.addNodes(origin: origin) }
  23. େྔͷSCNNodeͷ௥Ճ 23 func renderer(_ renderer: SCNSceneRenderer, updateAtTime time: TimeInterval) {

    // 5ͭͣͭ௥Ճ͢Δ } self.navigationView.worldNode.addScheduledNodes(quantity: 5) func addObjects(origin: CLLocation) { self.navigationView.origin = origin let routeLineNodes = routeNodes(withCoordinates: self.coordinates) self.navigationView.scheduleNodes(routeLineNodes, priority: .high) } // ARSCNViewDelegate
  24. ଞʹ΋… 24 • GPSɺిࢠίϯύεɺΧϝϥͷҐஔΛར ༻ۭͨؒ͠Ґஔิਖ਼ • ARϞʔυͰఆٛ͢Δۭؒͷ෼ׂํ๏ • SCNPlaneͷͭͳ͗໨ͷิਖ਼ ͳͲͳͲ

  25. Fin