Problem with Button VRPN server box

Come here to discuss about OpenViBE in general!
Post Reply
toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Problem with Button VRPN server box

Post by toncho11 »

I am using an VRPN client for .NET connecting to "openvibe-vrpn@localhost".

I added a "Button VRPN server" connected to a classifier. Scenario attached.

I can not receive any result. I only see that connection is established, but something is not configured right.

Please help.

What should be the parameters of Button ON/OFF. I tried "xxx_LEFT" and "xxx_RIGHT", but with no effect.

Please assist, this is driving me mad.
Attachments
motor-imagery-bci-4-replay-VRPN.xml
My scenario.
(44.49 KiB) Downloaded 264 times
PrintVals.zip
.NET project I am using as a client.
(125.68 KiB) Downloaded 267 times

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: Problem with Button VRPN server box

Post by lbonnet »

Hello toncho,

I tried your scenario and .net code, and it does not work on my side either.
The connection is made, and nothing but a "button pressed" message is visible once, even with a simple scenario with a keyboard stimulator and a VRPN server.

however, I got a warning on version mismatch. VrpnNet is based on 7.21, the openvibe vrpn server is based on 7.26.
check_vrpn_cookie(): VRPN Note: minor version number doesn't match: (prefer 'vrpn: ver. 07.26', got 'vrpn: ver. 07.21 0'). This is not normally a problem.
Maybe we are in a case outside the "normally"...

I don't know how to help you about that. I'm definitely not a .NET specialist, but I can say that the implementation of a VRPN client in C++ or C is not much time-consuming for a decent developer. I didn't investigate much further the VrpnNet library either, maybe you can contact the developer for help.

Another solution is to implement your own "connection" box and get rid of VRPN. A simple TCP/IP connection through sockets should do the trick for instance.
But you will have to implement the corresponding openvibe Server Box in C++, and the client code on the application side.

Cheers !

Laurent-
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

pickku
Posts: 23
Joined: Tue Mar 08, 2011 12:43 pm

Re: Problem with Button VRPN server box

Post by pickku »

Sir,
I have VC++ code that can acquire siganls from Emotiv EPOC headset can I acquire those signals through VRPN server and transmit to the serial communication.Because I developed signal processing code in MATLAB.My problem is I am not able to interface Emotiv Epoc and my program.Please give me a solution.

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Problem with Button VRPN server box

Post by toncho11 »

I was able to build and use the "printvals" application from "client_src" from the vrpn c/c++ implementation that is provided from the VRPN home page. So the problem seems to be in the .NET wrapper code.

Currently what bothers me is whether the Button VRPN is a good idea for my application. I need 5 operations for cursor movement: LEFT,RIGHT, UP, DOWN, CLICK. I think I should use the "Analog VRPN Server" for this purpose.

How to bind operations such as "OVTK_GDF_Left" in the "Analog VRPN Server"? I am a bit confused.

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Problem with Button VRPN server box

Post by toncho11 »

I got both the "Analog VRPN" server (inside OpenVibe) and a my C++ client application working using this tutorial: http://www.vrgeeks.org/vrpn/tutorial--- ... le-client-

I am receiving one number per measurement, which I do not know how to interpret. This should be the "Classification state", but I do not know how to decode for Left and Right, etc(if there were more actions streamed). I was expecting two numbers (two channels) - one for LEFT and one for RIGHT.

Any suggestions?

-Anton

jlegeny
Posts: 239
Joined: Tue Nov 02, 2010 8:51 am
Location: Mensia Technologies Paris FR
Contact:

Re: Problem with Button VRPN server box

Post by jlegeny »

Hi Anthon,

a Classifier Processor box has two outputs : one is of Stimulation type (violet) and the other is a Streamed Matrix (green). The stimulation output holds the classification output which you are expecting (you can define a stimulation for each of the two classes) and can be used with a VRPN button server.

As for the Streamed Matrix output, it holds the measure of the "precision" of the classification (distance to the classification hyperplane in the case of LDA, likehood of being the selected class in the case of a SVM). Basically the larger the number the "more sure" you are the class was selected correctly. The actual class is given by the sign of the value.

Cheers
Jozef

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Problem with Button VRPN server box

Post by toncho11 »

Thank you for your reply. :)

"Class trainer" has 2 inputs. + and - also means that only two classes are supported.

Is there a way to support more classes?

1. Do I have to write a new classifier?

2. Or there is some way to arrange this in the Designer?

Cheers,
Anton

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Problem with Button VRPN server box

Post by yrenard »

jlegeny wrote:As for the Streamed Matrix output, it holds the measure of the "precision" of the classification (distance to the classification hyperplane in the case of LDA, likehood of being the selected class in the case of a SVM). Basically the larger the number the "more sure" you are the class was selected correctly. The actual class is given by the sign of the value.
Let me rephrase this :)

I quote the Classifier Processor box documentation here :
classifier processor documentation wrote: 2. Classification state
This output reflects the classification algorithm status in the form of a matrix of value. The content of this matrix is dependent of the choosen classification algorithm. For example, the LDA classifier sends the hyperplane distance as its status. Given that this value is dependent of the choosen algorithm, you should be very carefull with the use of this output stream. Unexepected behavior may (will) occur when changing the classifier.
As you can see here, there is no guarantee of any kind that the value should actually be bigger for a class. This assumption is only valid for LDA and SVM (which however covers 100% of the case included in OpenViBE for now).

There has been an interesting discussion about this issue in this post for future evolutions.

As for multi class, this is also discussed in previous thread and the short answer is "the framework allows it - but none of the implemented classifier support it yet"

Hope that helps,
Yann

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Problem with Button VRPN server box

Post by toncho11 »

Hi,

I managed to recompile VrpnNet 1.1.1. The provided by VrpnNet pre-complied dll did not work for me. I did this against version VRPN 7.21 (newest is 7.29). The resulting VrpnNet.dll works fine with OpenVibe 0.10.1 Analog Server box. I was able to see the output from OpenVibe's LDA classifier in my C# console application.

I have attached my sample project with my VrpnNet.dll.

-Anton
Attachments
PrintVals.zip
Print values from an Analog Vrpn server in C#.
(141.4 KiB) Downloaded 272 times

toncho11
Posts: 124
Joined: Tue Apr 19, 2011 7:58 pm

Re: Problem with Button VRPN server box

Post by toncho11 »

VrpnNet contains unmanaged code and this might be a problem on 32/64 bit systems.

You can try Adastra: http://code.google.com/p/adastra where I use VrpnNet extensively.

Post Reply