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

Leap Motion Data Provider #7639

Merged
merged 21 commits into from
Apr 20, 2020

Conversation

CDiaz-MS
Copy link
Contributor

@CDiaz-MS CDiaz-MS commented Apr 10, 2020

Overview

A Leap Motion Controller is required to use this data provider.

The Leap Motion Data Provider enables articulated hand tracking for VR and could be useful for rapid prototyping in the editor. The data provider can be configured to use the leap motion controller mounted on a headset or placed on a desk face up.

LeapControllerOrientation: Headset (Default) LeapControllerOrientation: Desk
LeapHeadsetOrientationExampleMetacarpals LeapDeskOrientationExampleMetacarpals
LeapDevManagerHeadset LeapDevManagerDesk

Testing

  • Read Verification section below

Changes

  • Fixes: LeapMotion cross platform support #6076
  • Added initial provider, MRTK/Providers/LeapMotion
  • Added new example scene, MRTK/Examples/Demos/HandTracking/LeapMotionHandTrackingExample
  • Added initial documentation

TODO

- Add menu item to force Leap and MRTK integration for Unity 2018
- Unity 2018 and 2019 behave differently on Leap Motion Core Asset import

  • Add configuration tests

Verification

Read the documentation on how to test this branch. There are different steps required to test the data provider if the MRTK source is from the repo instead of a unity package. The MRTK repo treats warnings as errors but the unity packages do not. The Leap Motion Core Assets were last released in June 2018 and they contains obsolete warnings. Our repo then converts the obsolete warnings to errors and halts configuration, this will not be the case once the unity packages are generated.

BEFORE importing the Leap Core assets into the project, Mixed Reality Toolkit > Utilities > Leap Motion > Configure CSC File for Leap Motion. Updating the csc file filters out the obsolete warnings produced by the Leap Motion Core Assets. Unity 2019.3 is recommended for testing.

@wiwei
Copy link
Contributor

wiwei commented Apr 10, 2020

Marking at this as ready for review, so that we can run the CI checks (linters, etc).

@wiwei wiwei marked this pull request as ready for review April 10, 2020 15:59
@wiwei
Copy link
Contributor

wiwei commented Apr 10, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@CDiaz-MS CDiaz-MS requested a review from julenka April 10, 2020 16:12
@CDiaz-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@CDiaz-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

Comment on lines 58 to 59
- Navigate to **File > Build Settings**
- Only Standalone builds are supported if using the Leap Motion Data Provider.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Step by step documentation for unity mrtk users #7685 will be linked here after it is complete.

@julenka
Copy link
Contributor

julenka commented Apr 18, 2020

I tested importing leap motion and using my VR headset and it worked! Was really cool to see my hands working. I was even able to teleport using the motion controller, and interact with things using my hands. I found a few issues which @CDiaz-MS has filed follow-ups for, to be checked in as part of stabilization:

  • Configurable pinch thresholds
  • Near Interaction Grab support
  • new VR setup documentation

@CDiaz-MS
Copy link
Contributor Author

Here is the issue tracking the changes for issues Julia found: #7689

{
using (UpdatePerfMarker.Auto())
{
base.Update();
Copy link
Contributor

Choose a reason for hiding this comment

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

@davidkline-ms for perf markers in subclasses, do we recommend having the base function be invoked OUTSIDE of the subclass's marker?

i.e. should base.Update() be moved outside of this using clause? Otherwise this marker ends up capturing the work of the base class (which I believe has its own instrumentation).

Copy link
Contributor

Choose a reason for hiding this comment

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

I'd vote for leaving it as-is. When it's in scope like this and the base class has its own marker, the Unity profiler shows these nested in the call hierarchy and it becomes more obvious which class' base is being called.

Copy link
Contributor

@wiwei wiwei left a comment

Choose a reason for hiding this comment

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

Cool stuff, definitely get a thumbs up from @julenka / @keveleigh before going in!

@CDiaz-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@CDiaz-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

…ender location, updated DeviceInputType comment
@CDiaz-MS
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@CDiaz-MS CDiaz-MS merged commit 31c768b into microsoft:mrtk_development Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cross Platform Platform - Leap Motion Issues related to Leap Motion hand tracking
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LeapMotion cross platform support
5 participants