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

Cannot test whether grip position can be obtained from a WSA hand #1824

Closed
PJBowron opened this issue Mar 12, 2018 · 15 comments
Closed

Cannot test whether grip position can be obtained from a WSA hand #1824

PJBowron opened this issue Mar 12, 2018 · 15 comments

Comments

@PJBowron
Copy link

PJBowron commented Mar 12, 2018

Overview

Forgive me if this covered elsewhere: it no longer seems possible to 'properly' test if a position can be obtained from a WSA 'hand' input source (via InteractionInputSource). Browsing through the current code, it appears that though a hand supplies a position through its 'grip' ability, and this gets reflected up through the SourceCapabilities, asking for the capability fails because GetSupportedInputInfo doesn't consider grip info (position or rotation) at all.

Expected Behavior

Asking for 'Position' support will succeed for an InteractionInputSource with an underlying WSA hand source

Actual Behavior

The only supported info from a hand is 'Selected', IIRC.

Repro

Set up a default scene including the InputManager with an InteractionInputSource.
Add a script that implements a Handler interface (e.g. IInputClickHandler)
In the Interface delegate, ask the InputEventData if its InputSource supports the SupportedInputInfo.Position info

Mixed Reality Toolkit Release Version

Local version is some flavour of 2017.2, but current code as browsed on GitHub looks the same

@StephenHodgson
Copy link
Contributor

I'm not sure the API even supports grip for hands, but I'll double check.

Do you have repro steps for me to test this?

@StephenHodgson StephenHodgson added the No Repro The developer couldn’t reproduce the bug label Mar 12, 2018
@PJBowron
Copy link
Author

PJBowron commented Mar 12, 2018

@StephenHodgson I've updated the issue - marked some key changes in bold and added a repro.

I guess the issue revolves around whether GetSupportedInputInfo should consider 'Grip' data (I can't see that it shouldn't) and whether the SupportedInputInfo enum should distinguish between Pointer and Grip position and rotation support.

@PJBowron
Copy link
Author

@StephenHodgson Regarding the question of API support for Grip: WSA.Input does, via InteractionSourceState.sourcePose, and although the toolkit exposes this via TryGetGripPosition, you just can't test for support with GetSupportedInputInfo.

I'm happy to update the code to address this.

@StephenHodgson StephenHodgson removed the No Repro The developer couldn’t reproduce the bug label Mar 14, 2018
@StephenHodgson
Copy link
Contributor

I'm happy to update the code to address this.

Yes please :)

@PJBowron PJBowron changed the title Obtaining grip position from a WSA hand Cannot test whether grip position can be obtained from a WSA hand Mar 14, 2018
@keveleigh
Copy link
Contributor

keveleigh commented Mar 14, 2018

Ahh, good catch! Yep, the hand's positional data is routed through the "grip" position, I'd think because that also aligns with where the hand would be placed on a motion controller. GetSupportedInputInfo should definitely distinguish between Pointer and Grip position and rotation support, like you've already proposed. Thanks!

Your mention of Select being supported is interesting too. It looks like that data only comes through state.anyPressed, while currently the Toolkit's input system only cares about state.selectPressed, where I didn't see any hand data come through from my tests just now.
We could probably update GetSelect to take into account if the source is a hand, then to check state.anyPressed instead of state.selectPressed.

EDIT: That statement was only partially right. On RS1, that is the behavior. In the future™, it looks like that info is also routed through state.selectPressed and state.selectPressedAmount.

@PJBowron
Copy link
Author

I've just put up an initial drop of my changes -
@keveleigh I didn't go near the select issue yet as I wasn't entirely clear on it :) But maybe it would warrant its own PR anyway.

@timGerken
Copy link
Contributor

via #1870

@StephenHodgson
Copy link
Contributor

Do we also need to fix this in the master branch?

@timGerken
Copy link
Contributor

@StephenHodgson good question.
@PJBowron ?

@PJBowron
Copy link
Author

Hi guys.
Apologies, I'm not sure of the scope of the question; if it's: does this situation exist in the master branch - then yes.
If it's more to do with the release schedule, then I'm not too familiar with how things work. If we're talking about merging to master so it turns up in a future release - then sure.
If you're considering a hotfix to the existing release? Probably not important enough for that. The facility to obtain both pointer and grip data already exists, this update just lets you properly test for the capabilities.

@timGerken
Copy link
Contributor

@PJBowron I think, if the fix is righteous, the right thing to do is cherry-pick it from the Dev_Working_Branch into Patch4_Dev. That branch will merge into master "real soon now".

@PJBowron
Copy link
Author

Apologies for letting this go stale; @davidkline-ms is it too late for me to cherry-pick this for Patch4_Dev? I'm assuming you're done with that, now that 2017.2.1.4-rc2 is out?

@david-c-kline
Copy link

@PJBowron,

2017.2.1.4 is scheduled to be released in the next couple of days. Please feel free to target your fix to the may18_dev branch.

Thanks!
David

@PJBowron
Copy link
Author

PJBowron commented May 5, 2018

@davidkline-ms
Finally gotten around to resubmitting new PR: #2050

@david-c-kline
Copy link

This was released in the 2017.4.0.0 release candidate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants