Eye calibration software automatic exit?
Hi all!
We are developing a solution that does not have any controller use. Now the problem is that the eye tracking calibration software cannot exit in any way apart from using the controller and pointing it to the virtual exit icon. This seems like a massive oversight to us.
It is easy to call the calibration application using the provided method, but that means that we are unable to at least simulate a virtual controller as the calibration software exits the VR/XR application and takes control over the interface. The only thing that seems to be left at that point is the Microsoft Mixed Reality software that has a permanent control over the hardware interface and we don't know how to hack that.
Can anyone provide a solution for exiting the calibration software automatically or even let us have the source code of the calibration so that we can recompile it without the exit menu altogether?
Thanks!
-
Hey Marijan - you make a great point! We cannot share the source code currently but-
We will be releasing an updated version of ETCal that has an auto-timeout feature. You can try it out today by downloading this .pak file and placing it in C:\Program Files\HP\HP Omnicept\HP Omnicept Eye Tracking Calibration\ETCal\Content\Paks
With this new version, you will see that after ETCal completes, a countdown timer starts that will auto-close the app. Let us know if you think this should be implemented differently (i.e. shorter countdown).
1 -
Hi Lauren, thank you so much for this solution!
It does save us from serious trouble. It is pretty much exactly what is needed and if we could choose, we would make the exit instantaneous just after the green checkmark or after the red x. For now, we can live with 20 second countdown but it would be nice to have another build with quicker exit. The reason for that is that in our application, different users are using the headset and we want to have the calibration as smooth and quick as possible.
Kind regards!
0 -
Hello everyone!
I have developed whole of the application and our customer is extremely pleased with the whole thing and so are we. But now I am stuck on this last bug I cannot fix no matter what I try. So the problem is the Calibration function which under certain conditions cannot exit back to Unity application.What the code does is once the calibration button on keyboard is pressed, it sets a flag and in the Update(), the Calibration function gets called if the flag is set. The flag get's reset so I am 100% sure it gets called only once. This also happens only in certain conditions. If the Calibration is called from the Start() then it gets executed correctly only once and exits as expected. If it is called in the editor it also exits correctly. If it gets executed while the application has been started manually, also works great. It only doesn't work in the actual application which is a standalone system where there is no other monitors attached to the computer, just the headset and the Unity application is automatically started from a batch file. It also doesn't work correctly if I start it manually and unplug the monitor. In this condition, the HP Calibration function just enters an endless loop. It starts correctly, then you do the calibration then it has the 20 second timeout, then it briefly enters Windows mixed reality portal and then instead of going back to Unity application, the calibration procedure starts all over again on it's own.
Can anyone shed any light on this or suggest any ideas please? It seems like it is something to do with the existence of the external monitor but it is so hard to verify that. I just know I am completely out of ideas as absolutely nothing has worked and I can't even think of a workaround.
Kind regards0 -
Hello,
Thanks for sharing all the details are you able to reproduce this by launching manually the calibration app? Or it's just happening when you are opening it from Unity?
Any hint of what code are you using will be helpful for us and try to reproduce this so we can try and get some insight and what could be happening.
0 -
Hello Sergi and thanks for your suggestion.
I have tested your suggestion and it turned out I could not reproduce it with a manual launch so it was definitively something to do with Unity.
Now the way I have fixed it was by setting a flag upon keypress that would start a timer. After the timer would then expire a second later, it would launch the Calibration() and this cured the issue. It seems to me like it had to do something with button press, possibly something within UnityRawInput method as the regular Input.GetKeyDown just didn't work for me due to application needing to be in focus for this to work.
Another problem I have discovered which I need to share with the community is what seems to be a bug in Unity/Microsoft mixed reality portal. It would cause the application to not return back from Mixed reality portal every second time. This was also visible if launching the application from the Editor. It wouldn't start on the headset every second time and you would just see the Mixed reality environment.
This was cured by implementing a CoRoutine that checked if the XR environment has been started. Seems like a somewhat known issue. It also required a slight modification to the HP recommended Calibration() code as follows:public void Calibration() //Eye tracking calibration function modified from HP example
{
string omniPath = System.Environment.GetEnvironmentVariable("HP_OMNICEPT_INSTALL");
UnityEngine.XR.Management.XRGeneralSettings.Instance.Manager.StopSubsystems();
UnityEngine.XR.Management.XRGeneralSettings.Instance.Manager.DeinitializeLoader();
Process eyeCalProcess = new Process();
eyeCalProcess.StartInfo.UseShellExecute = false;
eyeCalProcess.StartInfo.FileName = $"C:\\Program Files\\HP\\HP Omnicept\\HP Omnicept Eye Tracking Calibration\\ETCal\\Binaries\\Win64\\ETCal-Win64-Shipping.exe"; //Hard coded as the path stopped working at some point
eyeCalProcess.StartInfo.CreateNoWindow = true;
eyeCalProcess.Start();
eyeCalProcess.WaitForExit();
string text = File.ReadAllText($"C:\\Users\\{Environment.UserName}\\AppData\\Local\\ETCal\\Saved\\etcallog.log");
bool ok = text.Contains("Tobii Eye Calibration finished successfully");
}
public IEnumerator InitXR()
{
yield return XRGeneralSettings.Instance.Manager.InitializeLoader();
if (XRGeneralSettings.Instance.Manager.activeLoader == null)
{
Debug.LogError("Initializing XR Failed. Check Editor or Player log for details.");
}
else
{
Debug.Log("Starting XR...");
XRGeneralSettings.Instance.Manager.StartSubsystems();
calibration_finished = false; //Reset only once it has actually finished starting XR
yield return null;
}
}
And then else in the code bit that actually triggers the Calibration:
if(something){ *** code with the timer and all which gets triggered by the keypress ***
Calibration();
calibration_finished = true;
}
if (calibration_finished == true)
{
StartCoroutine(InitXR());
}I hope this helps someone out here!
Thanks!1 -
Awesome to see that you found the issue!
On the second half i will reference this post and change the suggested calibration launch code to reflect your fix.
Thank you so much 😊
0
Please sign in to leave a comment.
Comments
6 comments