Problem with Matlab scripting box in openvibe

Working with OpenViBE signal processing scenarios and doing scenario/BCI design
Post Reply
Ehatisham
Posts: 1
Joined: Tue Jul 30, 2013 1:46 am

Problem with Matlab scripting box in openvibe

Post by Ehatisham »

Assalam U Alaikum!

I am trying to use matlab scripting box in open vibe to run a matlab function on the start of a scenario.
Matlab scripting box provides us facilty to call 3 matlab functions while:

1. Initializing function.
2. Processing function.
3. Uninitializing function.

I am using the example of the tutorials of the open vibe. But these matlab functions are not being called.
I get the error message as:
No such method found with the argument of type 'struct'.

But the same example exactly runs on the tutorial shown at openvibe website.
I shall be thankful if someone will help regarding this issue.
thanks a lot.

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Problem with Matlab scripting box in openvibe

Post by jtlindgren »

Hello Ehatisham,

to address this, we need a bit more information:

- Which version of OpenViBE and Matlab are you using?
- Which tutorial exactly causes this problem?
- Please tell us what step of the tutorial you are at when you get this issue?


Cheers,
Jussi

sasa
Posts: 3
Joined: Thu Sep 19, 2013 7:47 pm

Re: Problem with Matlab scripting box in openvibe

Post by sasa »

hello
I have the same problem

- Which version of OpenViBE and Matlab are you using?
openvibe 0.15.0
matlab R2012a
- Which tutorial exactly causes this problem?
first tutorial "signal filter"
- Please tell us what step of the tutorial you are at when you get this issue?
from the initialization step

undefined function 'tuto1_signal_filter_Initialize' for input argument of type 'struct'

and the same occured at process and uninitialize steps


thanks in advance

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Problem with Matlab scripting box in openvibe

Post by jtlindgren »

Hello Sasa,

your problem points to a direction that Matlab is not able to find the .m file in question. There could be a problem in the paths you provide to the box. If you're on Windows, you could use 'Process Explorer' to find out if Matlab is able to open the .m file. On Linux, the command is 'strace'. Seeing from those tools where it looks for the file could be used as a clue to debug this.

I also recommend trying a later version of OpenViBE, such as 0.16.0 or even git version and see if that makes any difference. There have been some tweaks to the Matlab boxes, for example.


Good luck,
Jussi

sasa
Posts: 3
Joined: Thu Sep 19, 2013 7:47 pm

Re: Problem with Matlab scripting box in openvibe

Post by sasa »

Thank you for answering

but after path modifications the problem now is that the initialization doesn't work while the uninitialization works although they are in the same location and I haven't changed the given names or paths

as demonstrated in the following log

[ ERROR ] At time 0.000 sec <Box algorithm::Signal filter> Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\box-tutorials\matlab\tuto1_signal_filter_Initialize.m'
[WARNING] Box algorithm <Signal filter> has been deactivated because initialization phase returned bad status
[ INF ] At time 4.602 sec <Box algorithm::Signal filter>
---- MATLAB BUFFER - INFO ----
Matlab uninitialize function has been called.


so what could be the problem?
thanks in advance

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Problem with Matlab scripting box in openvibe

Post by jtlindgren »

One thing that looks suspicious is that in

Cannot open 'C:\'Program Files (x86)'\openvibe\share\openvibe\scenarios\box-tutorials\matlab\tuto1_signal_filter_Initialize.m'

There is an extra ' in the middle of that path.


Cheers,
Jussi

jtlindgren
Posts: 775
Joined: Tue Dec 04, 2012 3:53 pm
Location: INRIA Rennes, FRANCE

Re: Problem with Matlab scripting box in openvibe

Post by jtlindgren »

I found out there was a problem with the Matlab boxes if the working directory names contained any spaces. This has now been fixed in git. As your report helped us to discover this problem, thank you.

If the same issue is behind the boxes not working for you, you can try to solve it by just moving the scenario .xml files to a directory whose path contains no spaces in any of the names.


Cheers,
Jussi

sasa
Posts: 3
Joined: Thu Sep 19, 2013 7:47 pm

Re: Problem with Matlab scripting box in openvibe

Post by sasa »

this really seems to be the problem

thank you very much

rabnawaz
Posts: 3
Joined: Wed May 02, 2018 4:19 am

Re: Problem with Matlab scripting box in openvibe

Post by rabnawaz »

Hi,

I am trying to open the Matlab box tutorial scenario but unable to do so. I am facing the error. I will explain step by step below;

1- I open the Matlab scripting tutorial file named tuto1-signal-filter.xml
2- Then I configure the Matlab scripting box as shown in the screenshot attached
3- When I try to save the scenario I get the following error :cry:
[ERROR] {Error description} : {Failed to open file C:/Program Files (x86)/openvibe-2.1.0/share/openvibe/scenarios/box-tutorials/matlab/tuto1-signal-
filter.xml}, {Error type} : {ErrorType::BadFileRead (code 40)}, {Error location{C:\ovm\sdk\kernel\src\kernel\scenario\ovkCScenarioManager.cpp::501}

I am using OpneVibe 2.1.0 and Matlab R2015a 32-bit. The operating system is Windows 10.
Any help to figure out this issue will be appreciated. Thank you
Attachments
OpenVibeScen.png
OpenVibeScen.png (123.47 KiB) Viewed 6123 times

Post Reply