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

Hmd Calibration: Verify if any solution exist from SteamVR #239

Open
bastianilso opened this issue Dec 13, 2022 · 13 comments
Open

Hmd Calibration: Verify if any solution exist from SteamVR #239

bastianilso opened this issue Dec 13, 2022 · 13 comments
Assignees

Comments

@bastianilso
Copy link

In the prism effect issue #97 we discovered that the hmd calibration interferes with the camera rotation. In addition the Hmd calibration also interferes with other modifiers like controller offset. It would be better if we could "teleport the player to 0,0,0" for example via a SteamVR API call or similar, rather than by moving a parent object of the camera rig.

@Xav1204 if you could investigate whether that is possible, or whether others have asked for this before from SteamVR that would be great.

@Xav1204
Copy link
Collaborator

Xav1204 commented Dec 16, 2022

@bastianilso The function that I used to define the position and the orientation of the virtual world is the following function :
Valve.VR.OpenVR.System.ResetSeatedZeroPose();

As the definition of the function that I've found on the OpenVr github say, this function define our position as the position 0 in the virtual world.

image

In order to enable the function, we need to have the following parameter in steamVR settings :

image

So, when we close the instruction panel, our position and where we are looking will be the current parameters of our position in the virtual world.

@bastianilso
Copy link
Author

@Xav1204 Thanks. What implications does "Tracking Universe Seated", beyond allowing us to call this function? Does it have implications for VR users' experience?

Does an equivalent ResetStandingZeroPose() function exist in the OpenVR API? (Just curious)

@Xav1204
Copy link
Collaborator

Xav1204 commented Dec 16, 2022

@bastianilso For the tracking space, if we use "Standing" case, the environment assumes 0,0,0 to be on the floor in the center of the Play Area set during Room Setup and in the "Seated" case, the environment assumes 0,0,0 to be the player's head. As in our case, the game is played from a seated position, use Tracking Universe Seated makes more sense.

Moreover, I tried to find the function ResetStandingZeroPose() but it doesn't exist.

@bastianilso
Copy link
Author

@Xav1204 assuming the "Tracking Universe Seated" option, what does it do? Can VR players still walk around in the scene?

@Xav1204
Copy link
Collaborator

Xav1204 commented Dec 16, 2022

@bastianilso I've tested and yes, we can move in the vr environment.

@Xav1204
Copy link
Collaborator

Xav1204 commented Dec 19, 2022

@bastianilso You have said last Friday that we need to test some features with the camerarig rotation and especially something about the fact that we can play the game in a standing position. Is it right ?

if yes, could you please list me all the test that I need to do to be sure that we can use the function "ResetSeatedZeroPose()".

@bastianilso
Copy link
Author

hey @Xav1204, yes, here is a list of tests using the new ResetSeatedZeroPose:

  • Start Whack-A-Mole with someone in VR, verify that after calling ResetSeatedZeroPose, the therapist UI shows that head rotation and position is 0,0,0 or close to 0.
  • Play the TestRetest treatment program. Save the data locally to disk. Open the Sample CSV file and verify that headPosition XYZ and headRotation Y are fairly close to 0,0,0 / 0 degrees throughout the game.
  • Rotate real-world chair 90 degrees and restart Whack-A-Mole. Play the TestRetest treatment program again and save data locally. Compare the data in MoleID and MoleWorldPositionXYZ between both Playthroughs, the numbers should be the same (for example. MoleID 0905 should have same XYZ position in game 1 as in game 2).

@Xav1204 could you also please watch, havent seen it, but wanted to verify whether the guy is suggesting to use the same function as you found or what he is doing.
https://www.youtube.com/watch?v=EmjBonbATS0

@Xav1204
Copy link
Collaborator

Xav1204 commented Dec 21, 2022

@bastianilso, when I made tests for the first time, I saw that the value didn't equal to the expected values.
So, I tried to compare the values with the current CameraRig rotation that we have in constraint script.
1.
image
With the current implementation, we have y close to 1 and X/Z have an offset and the rotation are not good because, when we turn our head on the left, we don't go in negative value rotation but in 350 - 360°.
image
However, with ResetSeatedZeroPose, X/Z are close to 0 and we have similar value for Y. Moreover, we have the same problem with the rotation on the left with Y.
2. As we have nonsense values in the therapist UI, we have also nonsense values in the csv files.
Current :
image
ResetSeatedZeroPose :
image
3. For the mole position, we don't have any problem.

@bastianilso
Copy link
Author

@Xav1204 Rotation values cannot be negative. Instead they wrap around when they are negative (3, 2, 1, 0, 359, 358, 357). So if the values are around those values, its good.

@Xav1204
Copy link
Collaborator

Xav1204 commented Jan 3, 2023

@bastianilso as we change parameters in SteamVR settings, isn't it better to upgrade SteamVr plugin before doing this issue ? Like that, we are sure that the function ResetZeroPose() will work with the new version of SteamVR plugin.

@bastianilso
Copy link
Author

@Xav1204 that's a good idea. Let's do that as a first point.

@Xav1204
Copy link
Collaborator

Xav1204 commented Jan 31, 2023

@bastianilso I've made a lot of tests with the fonction ResetZeroPose() in different program sessions and with the different modifiers and it looks good.
Can you just test on the dashboard with the datas to be sure that it's all right?
CSV.zip

@bastianilso
Copy link
Author

@Xav1204 data looks like what I would expect, so I think it's good.

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

2 participants