Code Monkey home page Code Monkey logo

unity-looxidlink-sranipal-recorder's Introduction

Unity-Looxidlink-SRanipal-Recorder

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.

Dependencies

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

Install

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.

image
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.

Usage

logsystem 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.

image
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

Data structure detailed in translator.ipynb(Korean)

Python Integration

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.