It is tool for recording Eye Tracking data from HTC vive, Raw EEG data from LooxidLink and converting stored data into Dictionary to be able to pass data to python into Json type.
Follow this instruction to install SteamVR and LooxidLink SDK and Follow this instruction for install SRanipal Setup. (HTC Vive Eye tracker).
For SRaniapl(Eye tracking), If sdk's version does not match with SRanipal Runtime version project will be crashed.
The version of SRanipal used in this project is 1.3.5.5. It is latest version from 2022/12/04.
This asset requires these assets and execute files.
Name | Location | Project Used Version | Latest URL |
---|---|---|---|
SteamVR Asset | At unity project | - | Download at here |
LooxidLink Unity SDK | At unity project | Download at here(LooxidLink_Unity_SDK_1.0.1.unitypackage) | Download at here |
LooxidLink Core | At computer | - | Download at here |
SRanipal SDK | At unity project | Download at here(ViveSR.unitypackage) | Download at here |
SRanipal Runtime | At computer | 1.3.5.5 | Download at here |
To install log system, you need to import package from From release page of this repository . after import, you can import SteamVR, LooxidLink, SRanipal SDK to work with this system.
To create log system to record eye tracking data and eeg signal, create empty GameObject and add SRanipal_Eye_Framework and LogSystem, EyeSys, Brain components(scripts) at single GameObject. and set Enable Eye Data Callback to True and select Version 2 at Enable Eye Version of SRanipal_Eye_Framework.
Log system follows singleton pattern, once you made GameObject following above instruction, you can access logsystem and call RecordStart() method and RecordStop() method by accessing static variable instance of LogSystem class.
you can record multiple times by calling recordstart many times, the result will be stored at RecordStore list as type of DfRaw.
DfRaw have ToDict() methods, which converts all stored data into dictionary which consisted compatible data type to python and javascript and so on.
There is example scene and script part in the package, you can start or stop record by pressing left plant button and save it to file by pressing right plant button at htc vive controller. plant button is custom button created by following this tutorial, to create new input button from HTC Vive controller check this article and tweak LogSystem's update method.
if(LogSystem.instance.RecordStore.Count>0) {
File.WriteAllText("./out.json",JsonConvert.SerializeObject(LogSystem.instance.RecordStore[0].ToDict()));
}
Data structure detailed in translator.ipynb(Korean)
Tested for importing json data exported from LogSystem. To see sample codes importing eeg data and draw PSD and filtered EEG signal, see interpolation.ipynb