TCP TAGGING

Obtaining data from various hardware devices
arianna
Posts: 3
Joined: Mon Dec 14, 2020 11:39 am

TCP TAGGING

Post by arianna »

Hi everyone. I would like to use openvibe scenario for 2 things: stream EEG signal + receive stimulations events from unity.
According to the documentation, the suggested approach to save EEG marker is to use TCP tagging. Do you agree?
I am trying to implement the code in Unity to send information to the acquisition driver via TCP tagging.
documentation reports:

Once the port is open, you can send triplets of uint64 numbers (24 bytes in total) to the AS while the TCP Tagging connection is open. The interpretation of these three numbers depends on the OpenViBE version as follows.

OV 2.0.1 and later tag format to send to the server:

[uint64 flags ; uint64 stimulation_identifier ; uint64 timestamp] ...

(http://openvibe.inria.fr/tcp-tagging/).

On C# code I have something like: Byte[] sendBytes = Encoding.UTF8.GetBytes("yah!! it works");
mySocket.GetStream().Write(sendBytes, 0, sendBytes.Length);

Can anybody help me to understand ho to write the code in order to receive a stimulation in openvibe? My final goal is to look at the EEG with signal display and see the stimulations coming from unity on it.
Thank you VERY VERY VERY MUCH for your help !!!!

Thibaut
Posts: 227
Joined: Wed Oct 31, 2018 9:14 am

Re: TCP TAGGING

Post by Thibaut »

HI,
Je have made two hello world game on unity one to receive data from openvibe on to send to openvibe, I must make a third to have bidirectionnal transmission but not yet. This hello world use lsl more easy to use than TCP.
You can check that at this address : https://gitlab.inria.fr/openvibe/unity-games with https://gitlab.inria.fr/openvibe/unity- ... llo-sender and https://gitlab.inria.fr/openvibe/unity- ... ello-world.
PS it's useless to send me a private message I check the new message in forum often.
Thibaut

arianna
Posts: 3
Joined: Mon Dec 14, 2020 11:39 am

Re: TCP TAGGING

Post by arianna »

Thank you very much for your answer and help !!

mhadji05
Posts: 21
Joined: Tue Mar 16, 2021 9:37 am

Re: TCP TAGGING

Post by mhadji05 »

I m trying to run Hello Bidirectionnal and Brain hero but OpenVibe has the following warning: Scenario contains unknown box algorithm(s)

How can I run this example. I cant find the Hello Bidirectionnal box on the side. Why?

Any idea?

Thanks.

Thomas
Posts: 68
Joined: Wed Mar 04, 2020 3:38 pm

Re: TCP TAGGING

Post by Thomas »

Hi Marios,

The Brain Hero unity app is at its early stage of development, and not integrated in OpenViBE yet, so you will not be able to use it until a future release of OpenViBE.

The Hello Bidirectionnal box is present on the development branches of the code base on our gitlab.
You need to checkout the development branch of each repository (meta, sdk, designer and extras) and build OpenViBE. Some instructions on how to build OpenViBE here!

Hope this helps.

Cheers,
Thomas

mhadji05
Posts: 21
Joined: Tue Mar 16, 2021 9:37 am

Re: TCP TAGGING

Post by mhadji05 »

Because I'm new to OpenVibe can someone give me more straight forward - specific instructions on the procedure i need to follow to run the Hello Bidirectionnal project?
Is there any tutorial or documentation?
I cant find something.

Any help I will appreciate it.
Untitled.png
Untitled.png (20.03 KiB) Viewed 857 times

mhadji05
Posts: 21
Joined: Tue Mar 16, 2021 9:37 am

Re: TCP TAGGING

Post by mhadji05 »

Can someone explain me how can I make my own box such as the Hello Bidirectional Game in the picture below?
If I understand right this box missing and must be created. How can I create this box?

Please if someone knows this answer let me know!

Thanks.
Untitled.png
Untitled.png (19.9 KiB) Viewed 841 times

Thomas
Posts: 68
Joined: Wed Mar 04, 2020 3:38 pm

Re: TCP TAGGING

Post by Thomas »

Hi Marios,

Sorry for the mistake in my previous message, the biderectionnal game box is not yet in the development branch.
To use it now, you need to build OpenVibe with the following branches for each repo:
- meta: development
- sdk: development
- designer: development
- extras: 61-feature-bidirectionnal-unity-games (where you got the scenario from)

Instructions on how to get the sources from git: http://openvibe.inria.fr/repo-instructions/
After you have run the "git submodule update", you can checkout each repo to the right branch with the command "git checkout <branch_name>"

You can then follow the build instructions: http://openvibe.inria.fr/build-instructions/

The biderctionnal game box shouldn't be missing anymore from this freshly built version of OpenViBE.

Hope this helps.

All the best,
Thomas

Thibaut
Posts: 227
Joined: Wed Oct 31, 2018 9:14 am

Re: TCP TAGGING

Post by Thibaut »

Hi,
Now it's on development branch
THibaut

mhadji05
Posts: 21
Joined: Tue Mar 16, 2021 9:37 am

Re: TCP TAGGING

Post by mhadji05 »

Dear @Thibaut

When will it be integrated into the executable OpenVibe for windows?

Thibaut
Posts: 227
Joined: Wed Oct 31, 2018 9:14 am

Re: TCP TAGGING

Post by Thibaut »

Hi,
For the next release we don't have an exact date yet sorry^^
Thibaut

m.casso-echalar
Posts: 21
Joined: Tue Jun 02, 2020 3:07 pm

Re: TCP TAGGING

Post by m.casso-echalar »

Hello,
I am implementing a paradigm in Openvibe v3.1.0 and I wanted to solve a doubt regarding the TCP tagging and the acquisition server.
In the motor imagery example, the Graz visualization box, receives the stimulation stream from the Lua script in the Graz MI stimulator and sends the stream of stimulations to the acquisition server through TCP tagging right?
So in my case, I wanted to know how could I send the stimulation stream to the AS? the TCP writer could do that?
For the moment I'm following the current structure:
https://drive.google.com/file/d/17qeDQf ... sp=sharing

Thank you in advance for your help,
Isabel

Thomas
Posts: 68
Joined: Wed Mar 04, 2020 3:38 pm

Re: TCP TAGGING

Post by Thomas »

Hi Isabel,

Indeed some boxes forward stimulations to the acquisition server directly through TCP Tagging.
Unfortunately, the TCP server doesn't do such thing.

However, in the scenario you shared, both the "Display Cue Image" and "Sound player" boxes will forward incoming stims to TCP Tagging.
They actually output stims on both their stimulation box output and on the TCP Tagging.

The actual drawback of this design at the moment is that they will both send each stim they receive to the TCP Tagging. Therefore the AS will receive each stimulation twice (once from each box). So each stimulation sent from Lua will end up being duplicated.

Hope this helps.

Cheers,
Thomas

m.casso-echalar
Posts: 21
Joined: Tue Jun 02, 2020 3:07 pm

Re: TCP TAGGING

Post by m.casso-echalar »

Hello Thomas,
Thank you for your response! It does help a lot!
So is there another way to send the stimulation labels from the Lua stimulator to the Acquisition server?
Is there a way to prevent double tagging? Otherwise, I have no other way to cue images to my subject
Thank you for your help!
Best,
Isabel

Thomas
Posts: 68
Joined: Wed Mar 04, 2020 3:38 pm

Re: TCP TAGGING

Post by Thomas »

I don't know of a box dedicated to TCP Tagging. You could write such a box if you feel like it.

As for the Sound player and Display cue image boxes, it is not possible to remove their outputs. Even though you could, that wouldn't remove the TCP tagging they perform. The two outputs (the actual output and TCP tagging) are two distinct mechanisms.

Note that it is in my todo list to make the TCP tagging of these boxes optional. In the meantime, if you are ok with recompiling OpenViBE, you could modify one of the two boxes to stop forwarding stims on TCP tagging.

Cheers,
Thomas

Post Reply