Button VRPN Server question

Concerning processing components: filters, file load/save, visualizations, communication ...
Post Reply
cbr0wn
Posts: 9
Joined: Tue May 29, 2012 5:03 pm

Button VRPN Server question

Post by cbr0wn »

Can the Button VRPN Server work similarly to the Analog VRPN Server in terms of being able to export signals in the form of Boolean buttons to an external application?

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

Re: Button VRPN Server question

Post by jlegeny »

VRPN button server sends two values to the client application, these are captured by a callback.

Compared to the analog server the client does not receive an update for each channel every time a button is changed. Rather, for each change of a button state, the client is notified by the callback and receives a pair button number - state of the button. Sending boolean variables can be simulated by using two buttons, for example.

Regards
Jozef

cbr0wn
Posts: 9
Joined: Tue May 29, 2012 5:03 pm

Re: Button VRPN Server question

Post by cbr0wn »

Thank you for your response jlegeny. So what sets the state of the button(s)? I am working on an application where the goal is, given the proper brain stimulus, to have a button state be set to true or false which would correspond to a stop or go function in an external application. Is this possible to do with a button VRPN server, or would I have to use an analog VRPN server? my team and I have successfully been able to setup the VRPN server, but if our theory above could work, then that would be much better.

Thanks for the help!

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

Re: Button VRPN Server question

Post by jlegeny »

There is a tutorial on using VRPN Button Server in OpenViBE.

http://openvibe.inria.fr/vrpn-tutorial- ... plication/

When you insert a Button VRPN Server box into a scenario it will contain one button, you can add more through right click -> add input.

Every button takes two stimulations one for "Switch ON" the other for "Switch OFF". If you set both stimulations to the same one it will act as a toggle button.

There is a sample code for receiving input from vrpn in the tutorial. Note that notifications are only sent when the state of the button changes.

Hope this helps
Jozef

cbr0wn
Posts: 9
Joined: Tue May 29, 2012 5:03 pm

Re: Button VRPN Server question

Post by cbr0wn »

I have tried using the tutorial but in visual studio 2010 I get an error for the "vrpn_button_callback" on line 34 which prevented me from compiling. And the tutorial does not include the header files so I found the vrpn_Button.h on the VRPN site http://www.cs.unc.edu/Research/vrpn/Button_H.html as well as the vrpn_Connection.h http://www.cs.unc.edu/Research/vrpn/Connection_h.html and the rest were gathered from the web. Is the a specific vrpn_Analog.h and vrpn_Button.h header file that I need? Any ideas on how to fix this?

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: Button VRPN Server question

Post by ddvlamin »

the header files should be in the vrpn directory where you have downloaded the OpenViBE dependencies just before starting the compilation process.

maybe you just work with the binaries of OpenViBE and you do not have the source files in this case you can get them with git from http://www.cs.unc.edu/Research/vrpn/obtaining_vrpn.html (note that you might need more than just those two header files that you mention)

These headers should be included by setting the appropriate option in your project properties in visual studio.

Dieter

cbr0wn
Posts: 9
Joined: Tue May 29, 2012 5:03 pm

Re: Button VRPN Server question

Post by cbr0wn »

Thanks! Everything works fine now!

Post Reply