Hi!
Finally i have created a driver for a bluetooth EMG system, and i put the data coming from the system in the buffer m_sample.
After i have tried to read the data with the Openvibe Designer, through the creation of a very simple block system constituted from only two blocks: Acquisition Client and Signal Display. The data are effectively visualized, but always appear green and red vertical dotted lines. I have seen in the Stimulation of Signal Display that there are two Stimulation color (of the same colors of the dotted lines) named OVTK_GDF_Incorrect (associated to the green) and OVTK_GDF_Correct (associated to the red).
What are these lines and what does it mean their presence?
And why with the generic oscillator any lines appears?
Thank you in advance,
Anne
Green and red dotted lines
Re: Green and red dotted lines
Hi Ann,
and thanks for the update !
The 2 stimulations you mentioned are sent automatically by the Acquisition Server if it detects some jittering in the acquisition.
If the driver is drifting from its theorical sampling rate, the Server tries to correct the sample flow.
If it is missing some samples (for example it should acquire at 512 Hz but sends data at 510 Hz), the server adds some samples to catch up.
The "artificial" part is delimited by these 2 stimulations.
If the driver is going too fast than it should, then the stimulation mark where a small cut started (e.g. 10 samples removed).
The Acquisition Server behavior can be configured. The configuration token AcquisitionServer_DriftToleranceDuration is set to 2 milliseconds by default.
It means that a drift of more than 2ms triggers the correction mechanism. You can set this parameter in your personal configuration file.
Anyway, if you have a lot of corrections, it means the driver may have some unstable behavior. This may come for various reasons: the Bluetooth connection, the acquisition device...
If you need high temporal precision it can be a problem.
Hope this helps
Laurent
and thanks for the update !
The 2 stimulations you mentioned are sent automatically by the Acquisition Server if it detects some jittering in the acquisition.
If the driver is drifting from its theorical sampling rate, the Server tries to correct the sample flow.
If it is missing some samples (for example it should acquire at 512 Hz but sends data at 510 Hz), the server adds some samples to catch up.
The "artificial" part is delimited by these 2 stimulations.
If the driver is going too fast than it should, then the stimulation mark where a small cut started (e.g. 10 samples removed).
The Acquisition Server behavior can be configured. The configuration token AcquisitionServer_DriftToleranceDuration is set to 2 milliseconds by default.
It means that a drift of more than 2ms triggers the correction mechanism. You can set this parameter in your personal configuration file.
Anyway, if you have a lot of corrections, it means the driver may have some unstable behavior. This may come for various reasons: the Bluetooth connection, the acquisition device...
If you need high temporal precision it can be a problem.
Hope this helps
Laurent
Re: Green and red dotted lines
Thank you for your explanation, that is very clear
Effectively I have put the data in wrong way, so that explain why the graphic was full of line!
Now I have a new question, because I have some other problems with these lines, and i would like to understand the situation:
while the Openvibe acquisition server is running, sometimes doesn't appear in the Signal display any line (neither green or red, also for very long acquisition), while some other times appear vertical green and red lines.
The strange thing is that during the Signal display if I play the Stop and immediately after the Start button the lines situation can change, for example from the perfect situation (without any vertical lines) to a worse situation with vertical lines, or can happen the opposite.
I would like to understand why this happens because this changing seems to be independent from how i put the data in the m_psample vector, considering that sometimes i can see the perfect Signal display!
Thank you in advance and i hope to have been clear!
Anne
Effectively I have put the data in wrong way, so that explain why the graphic was full of line!
Now I have a new question, because I have some other problems with these lines, and i would like to understand the situation:
while the Openvibe acquisition server is running, sometimes doesn't appear in the Signal display any line (neither green or red, also for very long acquisition), while some other times appear vertical green and red lines.
The strange thing is that during the Signal display if I play the Stop and immediately after the Start button the lines situation can change, for example from the perfect situation (without any vertical lines) to a worse situation with vertical lines, or can happen the opposite.
I would like to understand why this happens because this changing seems to be independent from how i put the data in the m_psample vector, considering that sometimes i can see the perfect Signal display!
Thank you in advance and i hope to have been clear!
Anne
Re: Green and red dotted lines
Hi Anne,
If a correction appears at random, it may reflect an unexpected event (maybe the bluetooth connection lagged for a short time, I don't know...).
Is it happening a lot ? Is it ever happening directly on a first recording session, or after a while ?
I don't know if it is the real source of your problem (as it seems to happen somehow randomly) and if this solution will fit in your implementation but it's worth the try.
Laurent-
I'm glad you got it working ! If you device doesn't print any lines it means it is relatively stable.while the Openvibe acquisition server is running, sometimes doesn't appear in the Signal display any line (neither green or red, also for very long acquisition), while some other times appear vertical green and red lines.
If a correction appears at random, it may reflect an unexpected event (maybe the bluetooth connection lagged for a short time, I don't know...).
Is it happening a lot ? Is it ever happening directly on a first recording session, or after a while ?
When you press "stop" in the Acquisition Server, openvibe calls the "stop" function of your driver. If you didn't disconnect your driver from the device, it may keep on receiving data. Thus when you start again, some data may be waiting in the buffer. I don't know how you handle the buffer(s) in your driver, but you should always start the data recovery with an empty buffer, for example by dropping every outdated samples before asking for new ones.The strange thing is that during the Signal display if I play the Stop and immediately after the Start button the lines situation can change, for example from the perfect situation (without any vertical lines) to a worse situation with vertical lines, or can happen the opposite.
I don't know if it is the real source of your problem (as it seems to happen somehow randomly) and if this solution will fit in your implementation but it's worth the try.
Laurent-
Re: Green and red dotted lines
Hi!
Thank you again for the replay
I can't understand that, because the Openvibe acquisition server runs in background as usual and the playing of the "stop" button seems to change something.
I don't know if could be interesting, but i'm using 4 channel at 1024 Hz.
Thank you,
Anne
Thank you again for the replay
The first session usually is ok (without any lines), but during the other session the things seems to be random (with number of lines very variable).Is it happening a lot ? Is it ever happening directly on a first recording session, or after a while ?
I agree on that, but the problem is that the lines appears when I play the stop button in the Signal Display, while using the block Signal Display in the Openvibe Designer. So, even if is the first session, if I play the "stop" button of the Signal Display, after there are many probability that the vertical lines appear!When you press "stop" in the Acquisition Server, openvibe calls the "stop" function of your driver.
I can't understand that, because the Openvibe acquisition server runs in background as usual and the playing of the "stop" button seems to change something.
I don't know if could be interesting, but i'm using 4 channel at 1024 Hz.
Thank you,
Anne
Re: Green and red dotted lines
Hi Anne,
It's really strange indeed...
What is your scenario ? Only an acquisition client box and a signal display box ?
I assume you are using the default settings of the Acquisition Server (Sample count per block to 32) ?
Laurent
Ok... so when you stop the scenario in the Designer, and play it again without touching the acquisition Server in background, it seems like there is a lot of correction happening.I agree on that, but the problem is that the lines appears when I play the stop button in the Signal Display, while using the block Signal Display in the Openvibe Designer. So, even if is the first session, if I play the "stop" button of the Signal Display, after there are many probability that the vertical lines appear!
It's really strange indeed...
What is your scenario ? Only an acquisition client box and a signal display box ?
1024 Hz is faster than many other device (usually we have 512Hz or lower), but it not a problem.don't know if could be interesting, but i'm using 4 channel at 1024 Hz.
I assume you are using the default settings of the Acquisition Server (Sample count per block to 32) ?
Laurent
Re: Green and red dotted lines
Hi!
Today I have noticed a strange warning:
<<No stencil buffer defined - couldn't pick object... this should never happen>>
I don't know if it's related with the problem.
Today I have noticed that if I play the "Pause" button instead of the "Stop" button, nothing change.
Thank you,
Anne
Exactly, only that two blocksWhat is your scenario ? Only an acquisition client box and a signal display box ?
Exactly, I have tried to change, but the better situation is with 32.I assume you are using the default settings of the Acquisition Server (Sample count per block to 32) ?
Today I have noticed a strange warning:
<<No stencil buffer defined - couldn't pick object... this should never happen>>
I don't know if it's related with the problem.
Today I have noticed that if I play the "Pause" button instead of the "Stop" button, nothing change.
Thank you,
Anne
Re: Green and red dotted lines
Hi Anne,
However it should not happen... it has been corrected in older version.
What version of openvibe are you using ?
The latest SVN trunk or a tag (0.X.0) ?
Laurent-
It is just the size of each block of samples sent to the Acquisition Client. At 1024 Hz a block of 32 samples represents ~30 ms.Exactly, I have tried to change, but the better situation is with 32.
This is a gtk related warning. I'm not sure it's related to our problem hereToday I have noticed a strange warning:
<<No stencil buffer defined - couldn't pick object... this should never happen>>
I don't know if it's related with the problem.
However it should not happen... it has been corrected in older version.
What version of openvibe are you using ?
The latest SVN trunk or a tag (0.X.0) ?
Ok... I still don't figure out. If you want you can send me (private message please) your source code. I won't be able to test it but I can take a look.Today I have noticed that if I play the "Pause" button instead of the "Stop" button, nothing change.
Laurent-
Re: Green and red dotted lines
Hi!
Anne
I'm using the SVN trunk that I have downloaded on november.What version of openvibe are you using ?
The latest SVN trunk or a tag (0.X.0) ?
Thank you very much!! I'll send you the private message!If you want you can send me (private message please) your source code. I won't be able to test it but I can take a look.
Anne