Search the Community
Showing results for tags 'technical problems'.
-
Hi All, I am fairly new to VR eye tracking and have run into a block, I am trying to output some data into a file and every time that I test this out Unity seems to freeze up I also get errors with System.IO and I could really use some help. (I have included my code to make it easier) Thank you in advance using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; using System; using System.IO; using Valve.VR; using Valve.VR.InteractionSystem; using ViveSR.anipal.Eye; using System.Runtime.InteropServices; using TMPro; public class TrackPlayer : MonoBehaviour { // Object references for use public GameObject playerObj = null; public GameObject attractorRef = null; public Rigidbody attractorrb; public Camera playercamera; // Participant Order public string UserID; public static string participantName; public static string Path = Directory.GetCurrentDirectory(); string File_Path; // Distance between variable public float DistanceBetweenAandB; // Attractor animation controls private float speed = 0f; public Animator deerAnimator; // Eye data variables private static EyeData eyeData = new EyeData(); private static bool eye_callback_registered = false; //Debug text display public TMP_Text uiText; private float updateSpeed = 0; private static float lastTime, currentTime; // Gaze Directon varibales private static Vector3 Eyeposition; // private static UInt64 eye_valid_L, eye_valid_R; // The bits explaining the validity of eye data. private static float openness_L, openness_R; // The level of eye openness. private static float pupil_diameter_L, pupil_diameter_R; // Diameter of pupil dilation. private static Vector2 pos_sensor_L, pos_sensor_R; // Positions of pupils. // Focus information vairables private static Ray testRay; private static FocusInfo focusInfo; // Variables that control how fast to report data back private float nextActionTime = 0.0f; public float period = .08f; private static int cnt_callback = 0; private const int maxframe_count = 120 * 1800; private void Start() { UserID = participantName; SRanipal_Eye_v2.LaunchEyeCalibration(); // Perform calibration for eye tracking just before running actual experiement. File_Path = Directory.GetCurrentDirectory() + "\\Test_" + participantName + ".txt"; Debug.Log(File_Path); if (participantName == "") { participantName = "Blank"; // make sure to fill in particpant ID } if (File.Exists(File_Path)) { Debug.Log("File with the same UserID already exists. Please change the UserID in the C# code."); // When the same file name is found, we stop playing Unity. if (UnityEditor.EditorApplication.isPlaying) { UnityEditor.EditorApplication.isPlaying = false; } } } // Update is called once per frame void Update() { //PlayerPositionTracking(); if (SRanipal_Eye_Framework.Status != SRanipal_Eye_Framework.FrameworkStatus.WORKING) return; if (SRanipal_Eye_Framework.Instance.EnableEyeDataCallback == true && eye_callback_registered == false) { SRanipal_Eye.WrapperRegisterEyeDataCallback(Marshal.GetFunctionPointerForDelegate((SRanipal_Eye.CallbackBasic)EyeCallback)); eye_callback_registered = true; } else if (SRanipal_Eye_Framework.Instance.EnableEyeDataCallback == false && eye_callback_registered == true) { SRanipal_Eye.WrapperUnRegisterEyeDataCallback(Marshal.GetFunctionPointerForDelegate((SRanipal_Eye.CallbackBasic)EyeCallback)); eye_callback_registered = false; } Vector3 GazeOriginCombinedLocal, GazeDirectionCombinedLocal; if (eye_callback_registered) { if (SRanipal_Eye.GetGazeRay(GazeIndex.COMBINE, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal, eyeData)) { } else if (SRanipal_Eye.GetGazeRay(GazeIndex.LEFT, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal, eyeData)) { } else if (SRanipal_Eye.GetGazeRay(GazeIndex.RIGHT, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal, eyeData)) { } else return; } else { if (SRanipal_Eye.GetGazeRay(GazeIndex.COMBINE, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal)) { } else if (SRanipal_Eye.GetGazeRay(GazeIndex.LEFT, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal)) { } else if (SRanipal_Eye.GetGazeRay(GazeIndex.RIGHT, out GazeOriginCombinedLocal, out GazeDirectionCombinedLocal)) { } else return; } Eyeposition = Camera.main.transform.TransformDirection(GazeDirectionCombinedLocal); Focus(); FocusName(); if (Time.time > nextActionTime) { nextActionTime += period; //Debug.Log(nextActionTime); // execute block of code here //uiText.text = Eyeposition.ToString(); //PlayerPositionTracking(); //AddPlayerEYELocationDataToFile(); AddPlayerLocationDataToFile(); AddCueLocationDataToFile(); //Debug.Log(FocusName()); //PLAYER HEAD ROTATION //Debug.Log("Player X ROTATION: " + playercamera.transform.rotation.x); //Debug.Log("Player Y ROTATION: " + playercamera.transform.rotation.y); } } private void OnDisable() { Release(); } void OnApplicationQuit() { Release(); } /// <summary> /// Release callback thread when disabled or quit /// </summary> private static void Release() { if (eye_callback_registered == true) { SRanipal_Eye.WrapperUnRegisterEyeDataCallback(Marshal.GetFunctionPointerForDelegate((SRanipal_Eye.CallbackBasic)EyeCallback)); eye_callback_registered = false; } } /// <summary> /// Required class for IL2CPP scripting backend support /// </summary> internal class MonoPInvokeCallbackAttribute : System.Attribute { public MonoPInvokeCallbackAttribute() { } } /// <summary> /// Eye tracking data callback thread. /// Reports data at ~120hz /// MonoPInvokeCallback attribute required for IL2CPP scripting backend /// </summary> /// <param name="eye_data">Reference to latest eye_data</param> [MonoPInvokeCallback] private static void EyeCallback(ref EyeData eye_data) { eyeData = eye_data; // do stuff with eyeData... while (cnt_callback < maxframe_count) { openness_L = eyeData.verbose_data.left.eye_openness; openness_R = eyeData.verbose_data.right.eye_openness; pupil_diameter_L = eyeData.verbose_data.left.pupil_diameter_mm; pupil_diameter_R = eyeData.verbose_data.right.pupil_diameter_mm; pos_sensor_L = eyeData.verbose_data.left.pupil_position_in_sensor_area; pos_sensor_R = eyeData.verbose_data.right.pupil_position_in_sensor_area; eye_valid_L = eyeData.verbose_data.left.eye_data_validata_bit_mask; eye_valid_R = eyeData.verbose_data.right.eye_data_validata_bit_mask; lastTime = currentTime; currentTime = eyeData.timestamp; //Player location variables and arrays string playerEyeX = Eyeposition.x.ToString(); string playerEyeY = Eyeposition.y.ToString(); string playerEyeZ = Eyeposition.z.ToString(); string playerEyeOpen_Left = openness_L.ToString(); string playerEyeOpen_Right = openness_R.ToString(); string playerEyeDiameter_Left = pupil_diameter_L.ToString(); string playerEyeDiameter_Right = pupil_diameter_R.ToString(); string playerEyePosInSenSorArea_Left_X = pos_sensor_L.x.ToString(); string playerEyePosInSenSorArea_Left_Y = pos_sensor_L.y.ToString(); string playerEyePosInSenSorArea_Right_X = pos_sensor_R.x.ToString(); string playerEyePosInSenSorArea_Right_Y = pos_sensor_R.y.ToString(); string playerEyeValid_Left = eye_valid_L.ToString(); string playerEyeValid_Right = eye_valid_R.ToString(); //string objectBeingLookedAt = FocusName(); string value = playerEyeX + "," + playerEyeY + "," + playerEyeZ + "," + playerEyeOpen_Left + "," + playerEyeOpen_Right + "," + playerEyeDiameter_Left + "," + playerEyeDiameter_Right + "," + playerEyePosInSenSorArea_Left_X + "," + playerEyePosInSenSorArea_Left_Y + "," + playerEyePosInSenSorArea_Right_X + "," + playerEyePosInSenSorArea_Right_Y + "," + playerEyeValid_Left + "," + playerEyeValid_Right + "," + //objectBeingLookedAt + DateTime.Now.ToString() + Environment.NewLine; File.AppendAllText("Test_" + participantName + ".txt", value); cnt_callback++; //string[] playerEYEData = { "\n" + "X = " + playerEyeX + ",", "" + "Y = " + playerEyeY + ",", "" + "Z = " + playerEyeZ + ",", //"" + "Eye Openess_L = " + playerEyeOpen_Left + ",", "" + "Eye Openess_R = " + playerEyeOpen_Right + ",", //"" + "Eye Diameter_L = " + playerEyeDiameter_Left + ",", "" + "Eye Diameter_R = " + playerEyeDiameter_Right + ",", //"" + "Eye Position In Sense Area_Left_X = " + playerEyePosInSenSorArea_Left_X + ",", "" + "Eye Position In Sense Area_Left_Y = " + playerEyePosInSenSorArea_Left_Y + ",", //"" + "Eye Position In Sense Area_Right_X = " + playerEyePosInSenSorArea_Right_X + ",", "" + "Eye Position In Sense Area_Right_Y = " + playerEyePosInSenSorArea_Right_Y + ",", //"" + "Eye Validation Bit Mask_Left = " + playerEyeValid_Left + ",", //"" + "Eye Validation Bit Mask_Rigth = " + playerEyeValid_Right + ",", //"" + "OBJECT = " + objectBeingLookedAt + "," + " " + System.DateTime.Now.ToString() }; // Content of the file // foreach (string playerInfo in playerEYEData) // { //File.AppendAllText(path, playerInfo); //} } } /// <summary> /// Checks for current object in focus. /// </summary> public static GameObject Focus() { if (eye_callback_registered == true) { if (SRanipal_Eye.Focus(GazeIndex.COMBINE, out testRay, out focusInfo)) { } else if (SRanipal_Eye.Focus(GazeIndex.LEFT, out testRay, out focusInfo)) { } else if (SRanipal_Eye.Focus(GazeIndex.RIGHT, out testRay, out focusInfo)) { } else return null; } if(focusInfo.collider.name != "Body Collider") { return focusInfo.collider.gameObject; } else return null; } /// <summary> /// Checks name for current object in focus. /// </summary> public static string FocusName() { if (Focus() is null) return ""; else return Focus().name; } TrackPlayer.cs
-
Hi, I am unable to receive eye data at 120 Hz. On several Vive Pro Eye headsets I am getting very low data report rates using the C++ SRAnipal API. Using the C++ sample project included the SRanipal SDK (link), I print out gaze data once every 120 samples. The data reports at a rate much slower than 120 Hz: ~30Hz when executing ViveSR::anipal::Eye::GetEyeData in a loop ~60Hz when executing callback My SRanipal runtime and tobii platform information is attached. Vive software and drivers are up to date.
-
So i am just trying to find out without a doubt two things. One if VivePort is needed to be installed to use the Vive Cosmos Elite and why is it that when i use Viveport that when i exit a game it causes my PC to freeze completely. I am able to turn the headset on, play a game and etc. but as soon as i exit a game or try to exit VR my PC just freezes completely. I have checked all sources to make sure that i have nothing in the background running that could cause any issues. It is literally ONLY happening when i use my Cosmos Elite but when using my Quest 2 via Link or Virtual Destkop. Literally no issues AT ALL. This is baffling and completely annoying and makes me want to toss this headset out the window.
-
My cosmos used to work perfectly but now whenever i plug in my headsets HDMI it says "Setting up device QUSB_BULK then says "Drivers unavailable" and then proceeds to not work and have 108 errors for steamvr and 001 errors for vive console. Any help would be appreciated i have tried wiping all data and uninstalling vive console and steamvr and all other reccomened options. Thanks!
-
I got my vive a couple of months ago and I had it working fine with my laptop (alienware m15) and I booted it up yesterday and it was incredibly laggy. The ms was hitting 111ms at its high and then swinging back down to 6. I shut everything down and tried again and it would work for one song of Beat Sabre and then just start lagging again. I don't really know what the issue could be... Alienware m15 Intel Core i7-8750H CPU @ 2.20GHz 2.21 GHz 16gb of RAM Windows 10 intel(r) uhd graphics 630
-
I have the Vive cosmos with the link box and all the original cable and I am getting error code 210. I'm not using ANY adapters, it is straight from the card to the link box. I reinstalled all of the vive software, updated my drivers, updated vbios, looked at the nvidia control panel. Nothing has worked. I also looked through the forums here and found people with similar problems but none of the solutions worked for me. I have a RTX 2080, Intel I-7, 16gb ram. @C.T. @stvnxu
-
Why do firmware updates always break base stations?
folkers_5150 posted a topic in Vive and Vive Pro
I've updated my Vive base stations when I first got it, and it worked completely fine. Ever since that first update in August of last year, updates NEVER work. There's always a new problem, hardware failure blinking lights that gets fixed when I roll back to original updates, the base station completely not turning on, etc. The worst part is that whenever I roll back, the tracking is terrible, constant grey screening. I can't stand it anymore. Why is it that NEW firmware updates completely break the product? Shouldn't the product keep improving with updates? I didn't expect this company to be like Apple with the whole killing the battery thing. I shouldn't have to buy new 2.0 base stations just to get the same tracking that I had when I first bought my Vive. 500 dollars going to waste because updates prevent sensors from working, what a load of B.S. Has anyone else experienced this problem before? Please let me know your solutions and stories.- 7 replies
-
- base station
- base station failure
-
(and 2 more)
Tagged with:
-
So a while back my base station randomly stopped working after an update. It had a blinking red light and steamvr showed a nondescript error code which I couldn't find any information on. Couldn't send it back to HTC as it was past the 90-day period. Fast forward a few months and I found a video stating that if you connected the base station to your computer and rolled back the firmware to factory default it could fix some of the errors and thats what i did. Successfully installed the old firmware in the base station and it no longer had a blinking red light and was no longer showing an error code, but still would not track at all (tested with other base station off) and If I attempted to update the base station again, it would behave the same way. Does anyone have a possible fix?
-
- base station failure
- technical problems
-
(and 1 more)
Tagged with: