-
Notifications
You must be signed in to change notification settings - Fork 14
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
Bone-based tracker structure #3
Comments
In my simple Unity test client, using OSVR's Unity ClientKit, I'm finding that it takes a long time (~50 seconds) to obtain interface connections for all of these tracker paths. The Unity app is not responsive during this time. Once I have the connections, it takes another minute or so for all these connections to start providing data. The client's cubes (which each follow one pose) start reacting, one by one, to the hand movements during this time. Eventually, they are all reacting as expected, with the 46 cubes showing the elbow/hand/bone structure. |
My tests in Unity show that the right hand's rotations look correct, but the left hand's do not. The positions for both hands look correct. @jdonald, can you think of why this might occur? For example, are the hand/bone |
Well, there is this note in the API regarding Hand::basis() : * Note: Since the left hand is a mirror of the right hand, the * basis matrix will be left-handed for left hands. Could that explain it? |
Thanks @jdonald! I should have checked the docs before asking. The commit referenced above fixes the issue, using notes from the
|
I moved this comment to the issue referenced above.
I sidetracked this ticket a bit, but I think we can get back to this topic now. |
First question: is OSVR assuming that there will be at most 1 left hand and 1 right hand in the field of view? If so, how are frames that are not consistent with this assumption handled? |
@GabrielHare Currently, the plugin loops through the hand list, assigning each hand to either the left or right tracker outputs. If there are multiple left hands, for example, the last one in the list would be sent. The plugin does assume that there will be at most one left hand and one right hand. For VR usage, 0-2 hands seems like the vast majority of usage scenarios. Technically speaking, the plugin must set a fixed number of tracker channels at compile-time. To support 3+ hands, we could add more tracker channels (and the associated semantic+alias API paths), and then only use them if there are additional hands. Since the "standard" API paths for getting hands are |
After a long delay, which I really regret... I have more feedback. My concern here is that choosing the last hand from all left hands or the last hand from all right hands will effectively reduce the reliability of the Leap service since spurious background hands can replace the user's actual hands. On the application side this is usually addressed by hiding spurious hands using a visual fade based on confidence, since the spurious hands usually are not near interactive elements. However, I do not think that a cut on hand confidence will be safe, since in some poses the user's hand can have a low confidence. After talking this through with Alex and Wilbur the best approach seems to be to allow for later refactors. To this end:
That being said, the best approach seems to be based on the longevity of tracking of real hands. The logic for the left hand would be as follows:
|
This does seem like quite a bit of work to get around limitations of a spec that was sketched out but not really vetted months ago. Even if we resolve this with a best-hand-chooser, there are long term costs to maintaining something that has different high-level behavior from our existing API and plugins. Could we rename the semantic paths to make this a non-issue? Is it possible to have lists in the path? e.g. /com_osvr_LeapMotion/Controller/semantic/arms[1]/hand/... |
Plugins define a fixed number of output channels (see my comment above), so we would need to plan ahead for which scenarios we want to handle. For each hand, we have 23 "tracker" channels, plus several "analog" channels to pass hand-related values (like the confidence level). Even if we supported two left hands and two right hands, we may still need some logic to choose the best hands in a (very unusual) 3+ left/right hand scenario. With the current delay to "connect" to these channels in Unity (see issue #6), these channels could create a significant amount of additional wait time. I'm not sure what other penalties there may be for adding extra channels. |
Oh I see. The number of output channels is a limitation of the plugin interface, and would be there regardless of how we map our path tree aliases. Oh well, that brings us back to Gabe's suggestions for introducing GetBestLeftHand()-related logic. |
First pass at the hand-selection logic is available in the
I need to shift the usage of this new class into the core part of the plugin (instead of just the "tracker" module), because other areas (notably, the "analog" module) also need to know about the active hand(s). |
I'm not entirely sure how to test the hand selections:
|
…pdated all plugin modules to use the LeapData wrapper.
The new |
Hand selection logic based on confidence looks good to me. |
The plugin currently sends a pose (position + rotation) for elbow, wrist, palm, and all finger bones. See
Tracker.cpp
and the device descriptor for full details.Let's use this ticket to discuss the naming/organization of these points. Here's the current structure, as a starting point for everyone to review.
Raw paths are in the format:
...where
NUMBER
is an integer from0
to45
.Semantic paths map raw paths to human-readable names, and they use this hierarchy:
...where the comma-separated items represent separate branches in the tree. Items marked with
*
contain the pose data.2 arms with (3 points for elbow, wrist, palm + 5x4 bones) each = 2x23 = 46 points.
Alias paths can re-map the semantic paths however we want, creating a path that starts at the root. For now, the structure copies the semantic tree, placed at the root like
/arms/.../...
.The text was updated successfully, but these errors were encountered: