lsl_archived icon indicating copy to clipboard operation
lsl_archived copied to clipboard

LSL launch and connectivity with OpenVibe

Open hkn1304 opened this issue 8 years ago • 10 comments

Hello, I cannot see the exe files and launch LSL from Matlab. Is there a structured step by step tutorial on what to do from scrath to configuring in Matlab so that people who doesn't know much about coding world and visual studio like me can also utilize this in their research. Please help!

hkn1304 avatar Mar 26 '17 13:03 hkn1304

There are no exe files needed.

Did you see the Matlab examples folder? https://github.com/sccn/labstreaminglayer/tree/master/LSL/liblsl-Matlab/examples

cboulay avatar Mar 26 '17 14:03 cboulay

Yes, i saw it. However the problem is when i start Lab Recorder, i cannot link any of Apps(mouse, keyboard etc) because i can not see exe files for example in mouse app folder allowing me to link. image

I think because of the problem i described above, when i run ReceiveData.m in Matlab it just says "Resolving an EEG stream".

image

I am stucked at this point and lost a week from now on. Please help.

hkn1304 avatar Mar 26 '17 15:03 hkn1304

Right. For ReceiveData or LabRecorder to be able to resolve a stream, there must be a stream on the network. To put a stream on the network, you need an LSL App to poll a data source and push the data to the stream via the Outlet.

The Mouse application is one potential Outlet Application. It looks like you tried to build this already. Was the build unsuccessful? Look in the release or debug folders for the .exe. But you might not have to build an app. Some are already built for you.

If you follow the tutorials here, you'll see that a bunch of the links go to the ftp, where pre-built apps are available.

cboulay avatar Mar 26 '17 17:03 cboulay

Under the section 'Download Binary Releases' is a link to the binary releases (.exe).

ftp://sccn.ucsd.edu/pub/software/LSL/

On 26.03.2017 19:11, Chadwick Boulay wrote:

Right. For ReceiveData or LabRecorder to be able to resolve a stream, there must be a stream on the network. To put a stream on the network, you need an LSL App to poll a data source and push the data to the stream via the Outlet.

The Mouse application is one potential Outlet Application. It looks like you tried to build this already. Was the build unsuccessful? Look in the release or debug folders for the .exe. But you might not have to build an app. Some are already built for you.

If you follow the tutorials here https://github.com/sccn/labstreaminglayer/wiki/Tutorial, you'll see that a bunch of the links go to the ftp, where pre-built apps are available.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/183#issuecomment-289299072, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7s_KPcWnfpKQQ_IXYBSjiXC4su7uks5rppxAgaJpZM4MpbXp.

dmedine avatar Mar 27 '17 08:03 dmedine

Thanks gents. As you say i downloaded the exe versions which i am using properly now.

One more thing, is there a way to make script (apart from vis_stream) to get real time raw EEG data to store in matrix form (.mat file) and plot? so that i can incorporate into my ANN based EEG code(written by myself?

Lastly, i would like to control let's say a toy car(arduino based) . if i use online BCILAB analysis, is there a way to easily designate processed Right/Left hand imagery to control the car? Any simulink connection? Thanks very much.

hkn1304 avatar Mar 29 '17 20:03 hkn1304

real time raw EEG data to store in matrix form (.mat file) and plot

I'm not sure what you're asking here. Do you want access to the real-time data in Matlab? Then use the liblsl-Matlab library and create an inlet. Do you want to store the data to disc and load it later in Matlab? Then use LabRecorder to write to an xdf file, then use the Matlab load_xdf tools to read it in later.

I can't help you with BCILAB for online analysis but I know people use it. It seems like it has quite a few bugs from being neglected.

cboulay avatar Mar 29 '17 20:03 cboulay

Yes, i would like to store real time data as a variable in Matlab workspace. So that i can process afterwards. when i try to run lsl_inlet, it asks me input which i am not aware of. Is there a tutorial for this?

hkn1304 avatar Mar 30 '17 13:03 hkn1304

A good place to start:

https://github.com/sccn/labstreaminglayer/tree/master/LSL/liblsl-Matlab/examples

On 30.03.2017 15:50, hkn1304 wrote:

Yes, i would like to store real time data as a variable in Matlab workspace. So that i can process afterwards. when i try to run lsl_inlet, it asks me input which i am not aware of. Is there a tutorial for this?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/183#issuecomment-290416668, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7jG63BEej6oP4jxaPPr5KMyn3NzIks5rq7MygaJpZM4MpbXp.

dmedine avatar Mar 30 '17 14:03 dmedine

Hello,

I am using Emotiv Epoc v2.0.0.20(older) for some reason and can't use Emotiv Epoc App(as this requires v.3.3.0)

That's why i am using Openvibe acquisition server to collect data from Epoc into LabRecorder and LSL and when i type vis_stream it seems to be working and i can see the data coming in the plot .

When everything is set up as explained above, i am running "ReceiveDataInChunks under "liblsl-Matlab/examples" without any modification(i don't if i need to change and type openvibeSignal which i see in the Lab recorder when i streamed data from openvibe into) it just says: image and nothing shows up.

However, i thought i found a way. I thought i need 2 Matlab; 1 for "SendingDataInChunks" and other for "ReceiveDataInChunks" and hit run simultaneously and it started to give something to me but i wasn't quite sure. Codes: image image I could get something in my CommandWindow but still can't store the older chunk values in a variable as it moves forward before i stopped. I got the impression from randn(8,50) line in "SendingDataInChunks" i was getting virtual values that aren't related to Epoc.

I told you all the story. Now my questions are:

  1. Is Emotiv App must in order to get data from Epoc ?(through openvibe and Labrecorder,even if i see Openvibesignal in Labrecorder)
  2. Is there a way to get Epoc data under these conditions and what should i do in this case?
  3. How can i store ex-values in a variable when the new chunk is available?

Any further help would be much appreciated. Many thanks in advance.

hkn1304 avatar May 21 '17 19:05 hkn1304

SendDataInChunks and ReceiveDataInChunks are example programs that demonstrate how to use the matlab wrapper for liblsl. They don't actually /do/ anything other than setup a fake stream (in the case of send) and receive values (in the case of receive).

On 21.05.17 21:36, hkn1304 wrote:

  1. Is Emotiv App must in order to get data from Epoc ?(through openvibe and Labrecorder,even if i see Openvibesignal in Labrecorder)

You can use either the Emotiv App or openvibe to stream the data via LSL

  1. Is there a way to get Epoc data under these conditions and what should i do in this case?

You can use LabRecorder to record the data. If you want to interact with the data in real time, you need to write software to do this (e.g. with python or matlab using LSL), or else create a BCI with openvibe, neuropype, etc.

  1. How can i store ex-values in a variable when the new chunk is available?

Line 19 in ReceiveDataInChunks: [chunk, stampes] = inlet.pull_chunk();

dmedine avatar May 22 '17 06:05 dmedine