Sample scenarios

About the GUI application to design signal processing pipelines
yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: Sample scenarios

Post by yrenard »

EEGHelp, I don't understand what you want to say here.

Yann

EEGHelp
Posts: 14
Joined: Tue Sep 15, 2009 3:20 am

Re: Sample scenarios

Post by EEGHelp »

Hello, I'm sorry Yann, I had not understood what you meant by saying "GDF file", as this is all more or less new for me :oops:

Well, now I did what you said and loaded another GDF file that now works excellent both with realtime 2D/3D

Thanks for the patience!

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

Re: Sample scenarios

Post by yrenard »

No problem, I'm happy that it's working

ariandy
Posts: 25
Joined: Fri Aug 14, 2009 3:11 am

Re: Sample scenarios

Post by ariandy »

Hello, I'm close to accidentally click "Post new topic" until I found this thread :oops:

In OV new release (0.4.0 rev 1737), where is sample scenarios located? I looked into dist/share/ but no "openvibe-scenarios" like in previous version. I search for xml files using linux find, also no result.

:?:

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

Hi,

Does anyone have any suggestions on any available Virtual Reality software that I can utilize in use with OpenViBE?

Or simply put, what are the recommended Virtual Reality software to use with OpenViBE for neurofeedback purposes?

Best regards,
Will

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

Re: Sample scenarios

Post by yrenard »

will9twl,

you can use any VR software you want in conjunction with OpenViBE. We actually used to have OpenMASK installed but it won't be supported anymore in the future... We'll move to Ogre3D, which is not exactly VR oriented, but just a 3D engine. The communication between the applications can be done with VRPN. OpenViBE already has the right boxes to send some information through VRPN and most VR application have the necessary tools to receive VRPN inputs...

Does theese information answer your request ?

Best regards,
Yann

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

Hi Yann,

So I'll have to write a game program on Orge3D, and then configure it to 'seek and receive' VRPN inputs from OpenViBE?

Furthermore, does that mean I have to download and install VRPN separately or would OpenViBE take care of transmitting VRPN inputs to Orge3D automatically through the designer boxes?

Thank you for your time!

Best regards,
Will
yrenard wrote:will9twl,

you can use any VR software you want in conjunction with OpenViBE. We actually used to have OpenMASK installed but it won't be supported anymore in the future... We'll move to Ogre3D, which is not exactly VR oriented, but just a 3D engine. The communication between the applications can be done with VRPN. OpenViBE already has the right boxes to send some information through VRPN and most VR application have the necessary tools to receive VRPN inputs...

Does theese information answer your request ?

Best regards,
Yann

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

Re: Sample scenarios

Post by yrenard »

will9twl,

VRPN is automatically installed with OpenViBE and there are two existing boxes that you can find in the designer under the VRPN category...

However, you will have to include VRPN to your Ogre3D project yourself...

Yann

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

yrenard wrote:Hello,

here is a sample tie-fighter like scenario. In the archive, you will find a GDF file that you should put in your openvibe-scenarios/signals folder. The XML scenario file can be put wherever you want.

This scenario was used in order to lift the tie fighter in our VR-demos. It is based on beta rebound on feet movement imagination. So the scenario is based on a single Cz channel.

The crop and the last simple DSP boxes should be tuned according to the user's base activity.

I hope this helps,
Best regards
Yann

PS: this scenario and the associated signal file will be included in the next release
Hi Yann,

To help me understand how to implement VRPN boxes, I studied the Neurofeedback.xml. Please help me check if my understanding is correct.

So from what I understand from the flowchart, it calculates the strength of beta wave activity in Cz. After all the processing, the final processed numerical values corresponds to beta wave activity, and they are fed into the VRPN analog server, which is then picked up by the VR software.

So in the VR software, the logic has to be written that IF the processed numerical values from the VRPN analog server exceeds 0 (positive value), it means that there's a predominance of beta wave activity, and a command is given to lift the 'Tie Fighter'. Am I correct?

Furthermore, I've downloaded Orge3D SDK, and am currently trying to integrate VRPN into it. Any advice on where I could find more information on how to do it?

Any help would be much appreciated! :)

Will

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

Re: Sample scenarios

Post by yrenard »

Dear will9twl,
To help me understand how to implement VRPN boxes
You don't have to implement VRPN boxes for openvibe. The two existing boxes (VRPN analog server & VRPN button server) should fit your needs most of the time.
So from what I understand from the flowchart, it calculates the strength of beta wave activity in Cz. After all the processing, the final processed numerical values corresponds to beta wave activity, and they are fed into the VRPN analog server, which is then picked up by the VR software.

So in the VR software, the logic has to be written that IF the processed numerical values from the VRPN analog server exceeds 0 (positive value), it means that there's a predominance of beta wave activity, and a command is given to lift the 'Tie Fighter'. Am I correct?
This is all correct !
Furthermore, I've downloaded Orge3D SDK, and am currently trying to integrate VRPN into it. Any advice on where I could find more information on how to do it?
I don't know much about Ogre3D myself but you will probably get much more help on their dedicated forum. On the VRPN side, the class you should look at is vrpn_Analog_Remote. This class is very easy to use... You basically have to create an instance of it, connect it to the VRPN peripheral which should be observed (e.g. openvibe-vrpn@localhost), register a callback for data arrival notification and repeatedly call its mainloop function. One example of usage of this class can be found in the CAbstractVrpnPeripheric class of the vr-demo project of OpenViBE.

Tell me if it helps and congratulations for your efforts.
Yann

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

yrenard wrote:
On the VRPN side, the class you should look at is vrpn_Analog_Remote. This class is very easy to use... You basically have to create an instance of it, connect it to the VRPN peripheral which should be observed (e.g. openvibe-vrpn@localhost), register a callback for data arrival notification and repeatedly call its mainloop function. One example of usage of this class can be found in the CAbstractVrpnPeripheric class of the vr-demo project of OpenViBE.

Tell me if it helps and congratulations for your efforts.
Yann
Hi Yann,

Thanks for your advice earlier on. I've tried creating an instance of the vrpn_Analog_Remote class in my Orge3D demo, however, my callback doesn't seem to be working. I tried looking for the vr-demo but in vain. Is it possible you drop me a link for me to download so I can refer to the CAbstractVrpnPeripheric class?

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

Re: Sample scenarios

Post by yrenard »

Dear will9twl,

did you download the code from the SVN repository ? If so, you will find the CAbstractVrpnPeripheric class in openvibe-applications/vr-demo/trunc/src/ovaCAbstractVrpnPeripheric.*.

The code is as simple as this :

Code: Select all

void VRPN_CALLBACK handle_analog(void* pUserData, const vrpn_ANALOGCB a)
{
	// a.num_channel contains the number of channels of the analog device
	// a.channel[i] contains ith analog value
}

void init(void)
{
	// m_pAnalog=new vrpn_Analog_Remote("device_name@host_name");
	// m_pAnalog->register_change_handler(this, &handle_analog);
}

void loop(void)
{
	// m_pAnalog->mainloop();
}
The callback will be called at each mainloop if new data arrived.

In case something bad happend about the VRPN connection, you should have explicit messages in your console.
Hope it helps,
Yann

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

Hi Yann,

I've been trying to write a very simple program (view code below) just to test out the VRPN connection, but it doesn't seem to be working with the 2 errors I've included below.

I've questioned myself over the header files, but I've included all the header files downloaded from VRPN into my header files.

Perhaps you could give me some advice over the 2 errors that I've encountered. I'll keep working on it.

Thanks for your time!

Regards,
will9twl

Code: Select all

/* This is a test program for VRPN connection in OpenViBE to external programs
*/

#include <stdlib.h>
#include <stdio.h>
#include "vrpn_Analog.h"

vrpn_Analog_Remote		*ana;

/***************************************************************************** 
 * 
   Callback handler 
 * 
 *****************************************************************************/ 
 
void	VRPN_CALLBACK handle_analog(void *userdata, vrpn_ANALOGCB b) 
{ 
	for (int i=0; i< b.num_channel; i++)
	{
		printf("Chan[%d] = %lf\n", i, b.channel[i]);
	}
} 
 
int main(int argc, char *argv[]) 
{	
	int	done = 0; 
	vrpn_Analog_Remote *ana; 
 
	/* initialize the analog */ 
	ana = new vrpn_Analog_Remote("openvibe-vrpn@localhost"); 
 
	// Set up the analog callback handler 
	ana->register_change_handler(NULL, &handle_analog); 
 
	/*  
	* main interactive loop 
	*/ 
	while ( ! done ) 
    { 
		// Let the  analog device do its thing 
		ana->mainloop(); 
    } 
 
}   /* main */

Code: Select all

Error	1	error LNK2019: unresolved external symbol "public: __thiscall vrpn_Analog_Remote::vrpn_Analog_Remote(char const *,class vrpn_Connection *)" (??0vrpn_Analog_Remote@@QAE@PBDPAVvrpn_Connection@@@Z) referenced in function _main	main.obj

Error	2	fatal error LNK1120: 1 unresolved externals	C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\TestVRPN_v1\Debug\TestVRPN_v1.exe

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

Re: Sample scenarios

Post by yrenard »

Dear will9twl,

have you added vrpn.lib and quat.lib to your link flags ?

Best regards,
Yann

will9twl
Posts: 13
Joined: Sun Nov 01, 2009 7:03 am

Re: Sample scenarios

Post by will9twl »

Hi Yann,

Thanks for the advice. I've been able to continue working on the integration of OpenViBE and my Ogre3D game.

Also, I saw the posting the robotic arm video on the homepage. Hopefully, after I stabilize my tests, I can contribute on the section as well.

Best wishes,
Will

Post Reply