Upgrade to Pro — share decks privately, control downloads, hide ads and more …

remote controlling Oculus Quest even with macOS

Toru
November 20, 2019

remote controlling Oculus Quest even with macOS

It's hard to develop Oculus Quest app with non-Windows pc. but the A-npanRemote enables it.

Toru

November 20, 2019
Tweet

More Decks by Toru

Other Decks in Programming

Transcript

  1. A-npanRemoteͱ͸ Unity Editor΁ͱ͍Ζ͍Ζͳ֎෦πʔϧͷΠϯϓοτΛೖྗ͢Δ΍ͭ ͜ΕΒUP6OJUZ&EJUPS͕Մೳɻ ‣ "3,JU J04࣮ػ  ‣ 0DVMVT2VFTU

    ‣ 0DVMVT3JGU ‣ )PMPMFOTͱ͔ ΍ͬͨ͜ͱͳ͍ ͨͿΜͰ͖Δ  ‣ "3ܥͱ͔ଞ ·ͩݟ͵Πϯϓοτ΋ରԠՄೳ
  2. ͜ΕΒUP6OJUZ&EJUPS͕Մೳɻ ‣ "3,JU ‣ 0DVMVT2VFTU ‣ 0DVMVT3JGU ‣ )PMPMFOTͱ͔ ΍ͬͨ͜ͱͳ͍

    ͨͿΜͰ͖Δ  ‣ "3ܥͱ͔ଞ ·ͩݟ͵Πϯϓοτ΋ରԠՄೳ A-npanRemoteͱ͸ Unity Editor΁ͱ͍Ζ͍Ζͳ֎෦πʔϧͷΠϯϓοτΛೖྗ͢Δ΍ͭ ͜Ε͕͋Δͱͳʹ͕͍͍ͬͯ ࣮ػϏϧυͳ͠Ͱ ΤσΟλ͚ͩͰΞϓϦ։ൃ͕Ͱ͖ΔΜͩΑͳʂ ΠςϨʔγϣϯͩΜͪʂʂ
  3. A-npanRemote ߏ੒ ▸ ࣮ػ → Unity Editor͸WebSocketͰ઀ଓ ▸ ͋ΒΏΔೖྗσʔλ͕EditorʹདྷΔͷͰɺ
 EditorͰੜͷΠϯϓοτΛड͚ͳ͕ΒΞϓϦΛ࡞

    ੒Ͱ͖Δ ▸ ࣮ػϏϧυجຊతʹෆཁ Unity Editor Quest ӈखɺࠨखɺ಄ͷ܏͖ etc WS Client → WS Server
  4. A-npanRemote iOSͷFaceTrackingΛA-npanRemoteରԠͯ͠ΈΑ͏ʂ ૊ΈࠐΈBefore // ී௨ʹإೝࣝ(FaceTracking)Λ։࢝ͤ͞Δ fTrack.StartTracking( () => { //

    إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot) => { // إೝࣝͷUpdate } );
  5. // ී௨ʹإೝࣝ(FaceTracking)Λ։࢝ͤ͞Δ fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4

    facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot) => { // إೝࣝͷUpdate } ); A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote ૊ΈࠐΈAfter
  6. // ී௨ʹإೝࣝ(FaceTracking)Λ։࢝ͤ͞Δ fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4

    facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot) => { // إೝࣝͷUpdate } ); A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote ૊ΈࠐΈAfter ͜Ε͚ͩͰ ࣮ػˠ&EJUPSసૹʂ
  7. // ී௨ʹإೝࣝ(FaceTracking)Λ։࢝ͤ͞Δ fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4

    facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot) => { // إೝࣝͷUpdate } ); A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote ૊ΈࠐΈAfter ͜Ε͚ͩͰ ࣮ػˠ&EJUPSసૹʂ ࣮࣭ 1 ߦॻ͍ͯऴΘΓɻͶɺ؆୯Ͱ͠ΐ͏ʁ
  8. fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, …

    { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote࣮ߦ࣌ͷग़དྷࣄ Unity Editor peerͷน ͜͏͍͏؀ڥΛ࡞ͬͨͱͯ͠ɺ fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, … { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); ࣮ػ
  9. fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, …

    { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote࣮ߦ࣌ͷग़དྷࣄ Unity Editor peerͷน fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, … { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); ಧ͘ʂ ࣮ػ ಉ͡ίʔυͷಉ͡ϝιου΁ͱσʔλ͕ಧ͘ɻૉఢɻ
  10. A-npanRemote ৄࡉ:૊ΈࠐΈ  ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ ✔ Matrix4x4 facePosAndRot, Dictionary<string,

    float> faceBlendShapes, Quaternion cameraRot public class FTPayload : IRemotePayload3 { [SerializeField] public Matrix4x4 facePosAndRot; [SerializeField] public string[] keys; [SerializeField] public float[] values; [SerializeField] public Quaternion cameraRot; …
  11. Matrix4x4 facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot A-npanRemote ৄࡉ:૊ΈࠐΈ 

    ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ ✔ public class FTPayload : IRemotePayload3 { [SerializeField] public Matrix4x4 facePosAndRot; [SerializeField] public string[] keys; [SerializeField] public float[] values; [SerializeField] public Quaternion cameraRot; … ࡾͭͷύϥϝʔλΛ ಛఆܕʹม׵
  12. Matrix4x4 facePosAndRot, Dictionary<string, float> faceBlendShapes, Quaternion cameraRot A-npanRemote ৄࡉ:૊ΈࠐΈ 

    ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ ✔ public class FTPayload : IRemotePayload3 { [SerializeField] public Matrix4x4 facePosAndRot; [SerializeField] public string[] keys; [SerializeField] public float[] values; [SerializeField] public Quaternion cameraRot; … ͜ͷϕʔεܕ͕ࣗಈతʹ৭ʑ΍ͬͯ͘ΕΔɻ ఆٛ͑͢͞Ε͹༏উɻ
  13.  ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ  "@OQBO3FNPUF4FUVQΛߦ͏ A-npanRemote ৄࡉ:૊ΈࠐΈ ✔ ✔

    ipΛೖΕͯSetupɻ 1Ͱpublicʹͨؔ͠਺͕ड͚औΔܕ + 2Ͱ࡞ͬͨܕΛηοτ͠ɺ ؔ਺ࣗମΛrefͰ౉͢ɻ A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate );
  14.  ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ  "@OQBO3FNPUF4FUVQΛߦ͏ A-npanRemote ৄࡉ:૊ΈࠐΈ ✔ ✔

    ipΛೖΕͯSetupɻ 1Ͱpublicʹͨؔ͠਺͕ड͚औΔܕ + 2Ͱ࡞ͬͨܕΛηοτ͠ɺ ؔ਺ࣗମΛrefͰ౉͢ɻ A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate );
  15.  ࣮ػͰσʔλΛड͚औΔؔ਺ΛQVCMJDʹͯ͠࿐ग़ͤ͞Δ  సૹ͍ͨ͠σʔλΛ4USFBNʹม׵͢ΔܕΛ༻ҙ͢Δ  "@OQBO3FNPUF4FUVQΛߦ͏ A-npanRemote ৄࡉ:૊ΈࠐΈ ✔ ✔

    ipΛೖΕͯSetupɻ 1Ͱpublicʹͨؔ͠਺͕ड͚औΔܕ + 2Ͱ࡞ͬͨܕΛηοτ͠ɺ ؔ਺ࣗମΛrefͰ౉͢ɻ A_npanRemote.Setup<Matrix4x4, Dictionary<string, float>, Quaternion, FTPayload>( ipText, ref fTrack.OnTrackingUpdate );
  16. fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, …

    { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); A-npanRemote࣮ߦ࣌ͷग़དྷࣄ Unity Editor peerͷน fTrack.StartTracking( () => { // إೝࣝ։࢝ }, (Matrix4x4 facePosAndRot, … { } ); A_npanRemote.Setup<Matrix4x4, … ipText, ref fTrack.OnTrackingUpdate ); ಧ͘ʂ ΍ͬͨͥʂ ࣮ػ