OpenViBE forum

The OpenViBE community
It is currently Wed Jun 19, 2013 11:59 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Standalone application
PostPosted: Sat Feb 25, 2012 7:54 pm 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 97
Hi,

I would like to code a standalone application that starts OpenVibe and executes a scenario.

Do you have such demo? Where should I look into?

Which C++ classes do I have to use? I need a player, a scheduler?

I do not need any UI. I need stripped down code that focuses only on starting and executing a scenario.

Cheers,
Anton


Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 6:12 am 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 638
Dear Anton,

please see the following blog post : Starting the designer from a console.

Hope this helps,
Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 9:32 am 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 97
Hi,

My question was more form software development perspective.

I tried for example to decouple the Designer from using GTK and simply leave the functionality that

- imports a scenario
- creates a player
- plays the scenario

So far it turned to be very hard as I haven't still figured the API.

I just need a sample in C++ where scenario is imported and then played with the OpenVibe's "Player" C++ class.

This is for my own consumption, but I think it will be useful for every one.

Thanks,
Anton


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 10:33 am 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 638
Dear Anton,

the designer already does that, just use --no-gui flag and a well prepared Player Controller box and you're done ; hard to make it easier.

Regards,
Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 11:04 am 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 97
Dear Yann,

I want to completely get rid of the GTK dependencies.

When using the "--no-gui" the GTK is still there and the only difference is that Window.Show() (or something like that) is not executed. I am actually trying to execute the designer as a Dll from another C++ application. It is like I want to process something with the designer and then stop it. Imagine I want to start the designer, train a classifier and close the designer and do all that programatically.


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 4:04 pm 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 638
Dear Anton,

the kernel itself relies on GTK, you can't get rid of it :)

Really, have you read the blog post I pointed out ? From a standalone application (whatever app you want actually), if you want to train a classifier, just run the openvibe designer (if you use C or C++, system is a good command to start with for instance) with --no-gui flag, then use the player controller to stop the scenario when you need it - it will silently close the invisible designer. Based on what you ask, this solves your problem ; if it does not, then give us more details about the problem.

It takes some time to accurately support the problems users are facing and I proposed a solution to what you stated as your problem, please give it a try.

Regards,
Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 4:27 pm 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 97
Thank you for your patience indeed :)

I am kind of disappointed because of the hard-coded GTK dependency.

So one can send commands to the PlayerBox through the keyboard simulator or even using VRPN button client which connects to an external application.


Top
 Profile  
 
PostPosted: Tue Mar 20, 2012 5:38 pm 
Offline
Site Admin

Joined: Fri Sep 01, 2006 3:39 pm
Posts: 638
Dear Anton,

sorry for the hard dependency to GTK, this has been a long discussed choice with Vincent something like 3/4 years back from now. Providing an abstraction of such a toolkit is a huge effort and was not realistic based on the man power we had back then. Ogre is a different approach, only the kernel relies on Ogre which is totally hidden from the 3D boxes.

In order to trigger the stopping of the scenario, you could also use the Lua Stimulator or the output of the classifier trainer / spatial filter trainers for instance, so you don't have to stop it manually, it's totally automatic !

Regards,
Yann

_________________
CTO at Mensia Technologies | Image my blog | Image my tweets | Image my linkedin


Top
 Profile  
 
PostPosted: Mon Apr 09, 2012 2:08 pm 
Offline

Joined: Tue Apr 19, 2011 7:58 pm
Posts: 97
I had much bigger idea indeed about the designer.

If the GUI could be decoupled then the designer can be compiled in VC++ in managed mode. Then managed C# wrappers will be written for the main classes and then OpenVibe will have a managed API.

For example my Adastra application will be able to execute OpenVibe internally by instantiating a class and calling the "go" method.
I tried all this, but it did not work in the end. If the UI is decoupled then I will be able to trace the problem much more easily.

Currently the UI dlls must be loaded although no UI is required. In the end some of them do not load and this results in a exception.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 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:  
POWERED_BY
Translated by MaĆ«l Soucaze © 2009 phpBB.fr