Jump to content
 

jboss

Verified Members
  • Content Count

    37
  • Joined

  • Last visited

Community Reputation

1 Neutral

About jboss

  • Rank
    Explorer

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. The same bug applies to the combined gazeray. When I move my gaze to the left the ray goes to the right and vice versa. Up/down is fine. If gaze_orgin_C is the measured combined origin and gaze_direct_C the measured combined direction you need to do the below calculation to use it: fixed_gaze_origin_C = new Vector3(gaze_origin_C.x*-1f, gaze_origin_C.y, gaze_origin_C.z)/1000f, fixed_gaze_direction_C = new Vector3(gaze_direct_C.x*-1f, gaze_direct_C.y, gaze_direct_C.z), Note the division by 1000, as I'm using version 2 of the eyetracking API and there the measured values are in mm and Unity units are meters.
  2. One think I noticed now that I'm using version 2 is that measured values for origin are in mm, so to use it in Unity I need to divide by 1000. In version 1 this was not necessary, I could use the origin values right away.
  3. @VibrantNebula I agree that if you start the SR-runtime manually first before any application it works fine. But as a user (enterprise or consumer, I don't think this is an enterprise problem) you have to remember that. Every time! Because if you forget, it breaks the immersiveness of VR. You have your headset on and you get the message "next up... Your application' and it just stays there. Because on screen there is the UAC popup. So you have to take off the headset, click OK and put the headset on again. Not a good experience of VR. I changed the properties of SR-runtime.exe to always run as administrator, but that makes no difference, as other users have reported as well. I then had a brainwave, what if I run SR-runtime at startup automatically. Then you can't forget. Well, that didn't work either. I had to copy (not link, actual copy; weird Windows logic....) it to the Startup folder, but when I then started calibration the three blue dots froze and disappeared. And then the Vive Pro Eye option was gone from the SteamVR in-world system menu. So I copied it back to the original location. Since you mention it is related to the Tobii runtime environment, I hope you will take this up with them. I think I will do that as well, but if the request comes from HTC it may have more leverage.
  4. @VibrantNebula my problem is not so much with the calibration itself, but with the UAC popup. If you want me to start a new thread, let me know. Here's what happens. Every first time I run calibration after starting up my PC I get the UAC popup asking if it is ok to allow Vive-Super-Reality-SR_Runtime to make changes to this PC. It makes no difference if I start calibration from SteamVR, from the Unity editor or from a Unity application.exe. If I click Allow, then all subsequent starts work right away. Also if I first run it from my application.exe and then from SteamVR. Since the popup blocks the whole screen I can not go to the SR-runtime icon and pack-log. This is a new MSI laptop, Windows 10, with a clean install of SteamVR and SRanipal. I created only one account on this PC and according to Windows accounts it has administrator rights. I did not change any access rights settings for SRanipalRuntime.exe yet, because I see mixed reactions. I do see that there are settings for users, administrators and for applications. maybe that is a clue? I attached the settings (I hope the order is the same in all languages 🙂) I hope you can help me with this. I need to install a Vive with eyetracking at a customer later this month and since it is a large organisation I'm sure the IT department will not allow me to disable UAC control completely. And I don't want to tell the customer 'Well, if you want to use eyetracking you need to start this manually first', or that they need to take off the headset, click ok in the popup and then continue the application. Thanks!
  5. Hi @imarin18 I realise I forgot to mention something. I made a small adaptation to the script. In the while loops in the Coroutine Sequence I added a check for a boolean called taskInterrupted. This boolean is set when I press the application menu button on the Vive controller. When that boolean is true this breaks the while loop showing the targets. And then the last part of the Sequence Coroutine is executed and there saccadeEndTime is set. And that actually also breaks the while loop in the EyeCallback method, I see now. Even though cnt_callback < maxframe_count. // ====================================================================== // 1. Perform saccadic eye movement assessment: 60 pro-saccade trials. // ====================================================================== Debug.Log("1st pro-saccade test has started."); debugWindow.text="1st pro-saccade test has started."; // JB last step for testing, no changes in the rest of the procedure for (int i = 0; i < pro_n; i++) { yield return StartCoroutine(TargetAppear(prosac_time_1[i], prosac_direct_1[i], i)); if (taskInterrupted) { break; } } /* Skip rest of the test Debug.Log("Take 1 minute break. Press space key to start 4 practice trials of anti-saccade task."); So now that I write this answer I realise that the problem must be in how I stop the eyetracking in my application. And I understand better how your application works as well. 🙂 So thanks for your reaction,
  6. I'm sorry that my last post was what rude. I just got taken by surprise that there was a time-limit on editing a post. I'd really apreciate some help getting this working. Especially the freezing of the editor is killing me. After every test run I have to use task manager to end the editor and then start it again. That is not workable. @imarin18 I checked what happens in your application at the end becase that application ends normally and copied that to a Coroutine in my application (see code below) and then use Update to call this Coroutine when the X key is pressed. I can see in the log that the Coroutine is executed, but still the editor freezes. IEnumerator EndEyeTracking() { // Stuff from saccade test project that is done at the end of the test //debugWindow.text = "Test finished. Waiting " + Endbuffer.ToString() + " seconds"; yield return new WaitForSeconds(Endbuffer); SaccadeEndTime = DateTime.Now.Ticks; // JB changed because original code causes build errors if (Application.isPlaying) { Application.Quit(); } Debug.Log("Eyetracking finished"); } I know that in the editor Application.IsPlaying is false, so the application does not quit by itself. Instead I get the debug line below it. In the other forum thread that mentions the freezing of the editor there are several options and I get confused which is which. One uses new Thread() and then use OnApplicationQuit and OnDisable() to abort the eyetracking, but in the saccade test this is not used. https://forum.vive.com/topic/5897-getting-verbosedata-at-the-fastest-rate-possible/page/2/ So I hope someone can help me with this. I attached the editor.log file, maybe that helps. Editor_Freeze_OnePitch.log
  7. Well, screwed by technology again. Apparently I pressed some button to post this before it was fininshed and now I can not edit it anymore. So here's the full version. Now I'm converting the saccade test project to my own project and I get new errors, so I hope someone can help me with those. First I had to remove the static keyword from the eyecallback method, because I am logging the data and my CreateNewLogEntry method derives from a non-static base method. I can not judge the impact of that, but at least I got no compile errors. Then I need to link the eyetracking log to my motion log where I log the ball and baseball bat, which is logged in Unity's fixedUpdate process, at 250 fps. Since timestamp may have too much variation, I decided to use frame-number. But then I got the error that Time.frameCount can only be used in the main thread, so I cannot read that in the eyecallback thread. So I figured I should use eyedata.frame_sequence, but that has completely different values. Did a comparison with debug lines and found: FixedUpdate in LoggerEyetracking at frame 31 EyeCallback called at eyedata.frame 276386, loggingActive=False How can these vallues be so far apart? And is there another way I can link the eyecallback thread to the frames in the main thread? And every time there is an error the Unity editor freezes so I have to use Taskmanager to kill it and restart it. But why does this have to be so complicated? This is costing me so much time that I can not spend on new content for my application. Why can't it be connected to the FixedUpdate process in the main thread? Use 90fps and 90Hz as default (like it's now in VIU, link Physics Rate to Refresh Rate), and if I as developer change fixedDeltaTime to something between 90 and 120 the eyetracking frequency changes accordingly (or you can keep it at 90Hz, if that's too complicated). And when I set fixedDelateTime to anything higher than 120 the eyetracking frequency is 120Hz. If it is running in the fixedUpdate proces, I can simply combine the motion log with the eyetracking data that is available at that moment, even if it may have been recorded 1 or 2 frames earlier.
  8. Now I'm converting the saccade test project to my own project and I get new errors, so I hope someone can help me with those. First I had to remove the static keyword from the eyecallback method, because I am logging the data and my CreateNewLogEntry method derives from a non-static base method. I can not judge the impact of that, but at least I got no compile errors. Then I need to link the eyetracling log to my motion log where I log the ball and baseball bat. Since timestamp may have too much variation, I decided to use frame-number. But then I got the error that Time.frameCount can only be used in the main thread, so I cannot read that in the eyecallback thread. So I figured I should use eyedata.frame_sequence, but that has completely different values. Did a comparison with debug lines and found: FixedUpdate in LoggerEyetracking at frame 31 EyeCallback called at eyedata.frame 276386, loggingActive=False How can these vallues be so far apart
  9. I found a good Black Friday deal, so I bought a new laptop. And now it looks like I get 8 ms intervals. The values in the 100ns column increase by 40000 per row (which I think relates to 4 ms) and then I get the same SRanipal output, in two rows so that would be 8 ms. I still will try to test this with Unity update rates higher than 120 fps, as I need that for my application. But I expect that the eyetracking will still run at 120Hz
  10. @monetl Yes, thanks, I looked at that article and am trying out the script.
  11. Thanks @imarin18 I did let the test run for a while. I did the practice tests and the first run (60 seconds, if I remember correctly). But even at the end of the output file the interval is 16/17 ms. Do you know if there is a way to check the clock cycle, besides running an empty while loop. Is that related to the CPU frequency? And thanks for the explanation of the 'hanging'. I didn't actually examine the script, I just ran the test. I did notice that he output file size was still increasing when I thought the editor was hanging, so now I understand.
  12. @imarin18 Thanks a lot for this link. I helps me understand the eyetracking a lot better. And I used the project as a check to see if I could get 120Hz. But even at the end of the output file I still see 16/17 ms between samples. So I think this indicates that my computer is simply too slow (it's a five year old laptop, high-end at the time, but not anymore 😃). Strangely, I did get errors in Unity when I wanted to build the application to see if that made any differences in the sample speed compared to running it in the editor: 'Assets\Scripts\Saccade_measure_rev1.cs(227,17): error CS0234: The type or namespace name 'EditorApplication' does not exist in the namespace 'UnityEditor' (are you missing an assembly reference?)' I used Unity 2019.2.17, since I had that already installed, but I find it weird that those errors don't show up when I run the application in the editor. I did notice that after running the application in the editor and clicking Play again to stop the application the editor is hanging. And I think I've seen that in another forum post somewhere.
  13. @monetl To be honest, I don't really remember what I was looking for at that time 😃 I think I solved it by using an avatar head at the camera position and use the line renderer as a component of that with local coordinates. It may not be 100% accurate, but it looks good enough for now. My issue right now is getting the 120Hz output of the eyetracker to see if that makes the eyetracking more accurate:
  14. Thanks @Dario What I want is that the grab occurs at the start of the scene. Some background: I have a tennis application that is used for training (not a game) and the athlete can choose from a number of drills. It starts with a selection scene where the athlete can select if they are right- or lefthanded and if they use the controller in their hand or the tracker on the racket. And then they select the drill they want to do. Typically during a practice session they will do several drills. Each drill is a separate Unity scene, so at the start of each scene the racket should be attached automatically to the correct controller or to the tracker and at the correct position and rotation. You're right, the stickyness itself is not related to the collision detection. But if I use the Transform option the collision is not detected. And I do need the stickyness to avoid that the racket is released right at the next frame after attaching, because the trigger is no longer pressed. This is what happened when I tried the SteamVR interaction system earlier this year (https://steamcommunity.com/app/250820/discussions/7/3148519094654061096/). I created a new topic for the Following Duration question:
×
×
  • Create New...