OSVR-Leap-Motion icon indicating copy to clipboard operation
OSVR-Leap-Motion copied to clipboard

Adding OSVR Leap Rigged Hands example Unity project

Open protodeep opened this issue 9 years ago • 7 comments

Added Unity project that provides an example of Leap rigged hands driven by data from the OSVR Leap server plugin.

Requirements

  • Use OSVR-Core-Snapshot-v0.2-705-g533991b-build147-vs12-32bit
  • Use OSVR-Unity-v0.2-54-ge98758a-with-core-v0.2-705-g533991b-build179
  • The OSVR-Core-Snapshot-…/bin/ folder contains Leap.dll
  • The OSVR-Core-Snapshot-…/bin/osvr-plugins-0 folder contains com_osvr_LeapMotion.dll

Unity Project

  • Deprecated Leap Motion Core Assets
  • OSVR Unity
  • OSVR Leap C# Scripts
    • Extended LeapAnalogs.cs script to build OSVR interfaces for Leap bone data
    • Created OSVR variants of Leap’s HandModel.cs and FingerModel.cs scripts

Notes

  • Leap service version 2.3.1+31549
  • OSVR Hacker Dev Kit version 1.2

protodeep avatar Jan 14 '16 22:01 protodeep

Looking forward to trying this out. Can you share the com_osvr_LeapMotion.dll and osvr_server_config.json file you're using? I'll try to build it myself in the meantime.

Edit: built the dll but server config would still be helpful

DuFF14 avatar Jan 15 '16 21:01 DuFF14

I'm getting a few errors such as: "Assets/OSVRLeap/Scripts/LeapImagingCamera.cs(17,25): error CS0246: The type or namespace name `ImagingInterface' could not be found. Are you missing a using directive or an assembly reference?"

edit: ImagingInterface wasn't added until a later version of the OSVR-Unity plugin. It would be best if you can update to the current version. Use the latest Core as well -- I couldn't build the Leap plugin with v0.2.705 because it is looking for functions that don't exist until later releases. I'll see if I'm able to get it working with a new(er) version as well.

DuFF14 avatar Jan 15 '16 22:01 DuFF14

I was able to update to the latest OSVR-Unity plugin. I replaced OsvrContextProvider with the ClientKit prefab, and VrHead with the VRDisplayTracked prefab. I added the Leap objects to the VRDisplayTracked prefab, and it works! I created a new LeapVRDisplayTracked prefab and test scene in a new branch of a forked repo: https://github.com/DuFF14/OSVR-Leap-Motion/tree/LeapOsvrPrefab Nice work on this :+1:

DuFF14 avatar Jan 15 '16 23:01 DuFF14

Fantastic Greg!

And pardon the delayed response. My git account was sending me email notifications to an obscure personal address.

protodeep avatar Jan 18 '16 18:01 protodeep

Hey Greg, I see in this commit that Leap's old Core Assets v2.3.1 got merged into this Unity project. Those assets are not compatible with the Leap-OSVR assets in this project. So that might cause some confusion.

https://github.com/DuFF14/OSVR-Leap-Motion/commit/dc8c424bfd8fc40f68f6a8169cadffbef1bb31ed

protodeep avatar Mar 10 '16 19:03 protodeep

Thanks @protodeep. I figured it would break. We're waiting for an OSVR Skeleton interface instead of using Leap's SDK inside the OSVR-Unity plugin. The OSVR-Unity plugin should be able to use the Leap Motion data coming from the OSVR-LeapMotion plugin, and not have to reference Leap inside Unity. I was thinking this project would demonstrate Leap Core Assets with a generic OSVR skeletal interface (when it exists). An OSVR Gesture interface is also on the way, so this will all tie together eventually.

DuFF14 avatar Mar 10 '16 21:03 DuFF14

Got it. Thanks for the update!

protodeep avatar Mar 10 '16 22:03 protodeep