OpenViBE forum

The OpenViBE community
It is currently Tue Oct 16, 2018 4:01 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Muse and OpenVibe 2.1.0
PostPosted: Fri Jun 01, 2018 10:44 am 
Offline

Joined: Thu May 31, 2018 9:38 pm
Posts: 3
Hello,
as topic i'm trying to interface Muse 2016 using muse-lsl (https://github.com/alexandrebarachant/muse-lsl) with openvibe.
I do following steps:
1)connect to muse via muse-lsl so to start the LSL stream
~/muse-lsl# python muse-lsl.py -n Muse-8E22
Found device Muse-8E22 : 00:55:DA:B0:8E:22
Connected
Streaming

2)Start Acquisition server,select LSL,click on driver properties and i can see as signal stream Muse.
I click apply,then connect

:~/meta/dist/extras-Release# ./openvibe-acquisition-server.sh
12870 (process ID) old priority 0, new priority 19
[ INF ] Created kernel loader, trying to load kernel module
[ INF ] Kernel module loaded, trying to get kernel descriptor
[ INF ] Got kernel descriptor, trying to create kernel
[ INF ] Adding kernel configuration file [/root/meta/dist/extras-Release/share/openvibe/kernel/openvibe.conf]
[ INF ] Logging to '/root/.config/openvibe-2.1.0/log/openvibe-acquisition-server.log'
[ INF ] Adding plugins from [/root/meta/dist/extras-Release/lib/libopenvibe-plugins-*-stream-codecs*.so]
[ INF ] Added 19 plugin object descriptor(s) from [/root/meta/dist/extras-Release/lib/libopenvibe-plugins-sdk-stream-codecs.so]
[ INF ] Loading plugin: ExternalStimulations (deprecated)
[ INF ] Loading plugin: TCP Tagging
[ INF ] Loading plugin: LSL Output
[ INF ] Loading plugin: Fiddler
[ INF ] Connecting to device [LabStreamingLayer (LSL)]...
[ INF ] Opened an LSL stream with 5 channels and a nominal rate of 256 hz adjusted to 256 hz.
[ INF ] Connection succeeded !

3)Start the openvibe designer with network-acquisition scenario
4)Press play on acquisition server and start see the following:
[ INF ] Starting the acquisition...
[ INF ] Now acquiring...
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 0, filled rest of block with NaN

5)Press play on the designer , channels are recognized but no signal
Image
Image

I tested also with
/root/meta/dependencies/arch/LSL/liblsl-Python/examples/SendData.py

[ INF ] Connecting to device [LabStreamingLayer (LSL)]...
[ INF ] Opened an LSL stream with 8 channels and a nominal rate of 100 hz adjusted to 100 hz.
[ INF ] Connection succeeded !
[ INF ] Starting the acquisition...
[ INF ] Now acquiring...
[ INF ] Received new connection...

and it works OK.I can see signal in designer.
While if i use
/root/meta/dependencies/arch/LSL/liblsl-Python/examples/SendDataAdvanced.py

[ INF ] Connecting to device [LabStreamingLayer (LSL)]...
[ INF ] Opened an LSL stream with 8 channels and a nominal rate of 100 hz adjusted to 100 hz.
[ INF ] Connection succeeded !
[ INF ] Starting the acquisition...
[ INF ] Now acquiring...
[ INF ] Timeout reading sample from 0, filled rest of block with NaN
[ INF ] Timeout reading sample from 8, filled rest of block with NaN
[ INF ] Timeout reading sample from 8, filled rest of block with NaN
[ INF ] Timeout reading sample from 8, filled rest of block with NaN
[ INF ] Timeout reading sample from 8, filled rest of block with NaN

I see less timeout than using muse,so i can see some signal on designer but with a lot of blank spaces.

Anyone can shed some light on this?
Regards and keep up with good works,
Giampaolo


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 05, 2018 7:54 am 
Offline

Joined: Tue Dec 04, 2012 3:53 pm
Posts: 757
Location: INRIA Rennes, FRANCE
Hi, if we look just at the advanced python example, the issue seems to be this,

Code:
# next make an outlet; we set the outgoing buffer size to 360 seconds (max.) and the transmission chunk size to 32 samples
outlet = pylsl.stream_outlet(info,360,32)


If you replace the 360 with 0, it starts to behave like the other example. I assume the issue here is that on the sender side, LSL buffers for too long whereas openvibe expects to get a steady stream of samples; for example with chunk size 32 it'll poll the lsl until it has 32 samples, but it seems that sometimes the signal inlets pull_sample() call timeouts. I assume this could be because the source is not sending steadily.

Perhaps you can mod the muse version accordingly.

If any LSL guru has ideas how to fix this or make the driver more compliant, let me know.

Cheers,
Jussi


Top
 Profile  
Reply with quote  
PostPosted: Tue Jun 05, 2018 1:56 pm 
Offline

Joined: Thu May 31, 2018 9:38 pm
Posts: 3
jtlindgren wrote:
Hi, if we look just at the advanced python example, the issue seems to be this,

Code:
# next make an outlet; we set the outgoing buffer size to 360 seconds (max.) and the transmission chunk size to 32 samples
outlet = pylsl.stream_outlet(info,360,32)


If you replace the 360 with 0, it starts to behave like the other example. I assume the issue here is that on the sender side, LSL buffers for too long whereas openvibe expects to get a steady stream of samples; for example with chunk size 32 it'll poll the lsl until it has 32 samples, but it seems that sometimes the signal inlets pull_sample() call timeouts. I assume this could be because the source is not sending steadily.

Perhaps you can mod the muse version accordingly.

If any LSL guru has ideas how to fix this or make the driver more compliant, let me know.

Cheers,
Jussi


thank you for the reply Jussi, i've noticed the issue in the SendAdvanced and tried to tune muse-lsl accordingly specifying chunk size to 32.
Later i've noticed that the problem is in bluetooth side, somehow the connection from muse to bluetooth stops after some minutes
or after i receive a missing sample from muse.I'm still investigating on this.
Guess the problem is not open vibe afterall:)
Regards,
Giampaolo


Top
 Profile  
Reply with quote  
PostPosted: Wed Jun 06, 2018 2:43 pm 
Offline

Joined: Thu May 31, 2018 9:38 pm
Posts: 3
sorenopsy wrote:
jtlindgren wrote:
Hi, if we look just at the advanced python example, the issue seems to be this,

Code:
# next make an outlet; we set the outgoing buffer size to 360 seconds (max.) and the transmission chunk size to 32 samples
outlet = pylsl.stream_outlet(info,360,32)


If you replace the 360 with 0, it starts to behave like the other example. I assume the issue here is that on the sender side, LSL buffers for too long whereas openvibe expects to get a steady stream of samples; for example with chunk size 32 it'll poll the lsl until it has 32 samples, but it seems that sometimes the signal inlets pull_sample() call timeouts. I assume this could be because the source is not sending steadily.

Perhaps you can mod the muse version accordingly.

If any LSL guru has ideas how to fix this or make the driver more compliant, let me know.

Cheers,
Jussi


thank you for the reply Jussi, i've noticed the issue in the SendAdvanced and tried to tune muse-lsl accordingly specifying chunk size to 32.
Later i've noticed that the problem is in bluetooth side, somehow the connection from muse to bluetooth stops after some minutes
or after i receive a missing sample from muse.I'm still investigating on this.
Guess the problem is not open vibe afterall:)
Regards,
Giampaolo


For those who interested i've been able to stream to openvibe using lsl
with https://github.com/alexandrebarachant/muse-lsl under linux
and with https://github.com/kowalej/BlueMuse under windows

I've got timeout problems using the internal bluetooth of Lenovo T450, so i've bought a Trust Bluetooth Dongle (chipset CSR8510 ) which is also suggested by muse
http://developer.choosemuse.com/hardwar ... nnectivity and now everything works fine.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group
Americanized by Maƫl Soucaze.