looking for source code of CursorTask

This forum deals with BCI2000 configuration issues.
Post Reply
tinui
Posts: 16
Joined: 14 May 2015, 02:11

looking for source code of CursorTask

Post by tinui » 18 May 2016, 01:45

Hi,


I am studying the BMI at the university.
So I would like to use the BCI2000.
I am looking for source code of CursorTask , such as the following.
Please tell me if you have source code of CursorTask or you know web site of CursorTask source code.
After that, I want to create a training tasks by changing the ball to the bar,such as the locus of the bar can be drawn. I want you to tell me I might be changed anywhere in the program.


regards,


tinui.
Attachments
cursortask.PNG

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 19 May 2016, 10:52

Tinui,

you will need to install the BCI2000 toolchain and download the source code. For this please perform the following steps. There is already an extension that provides different gauges. This extensions is not part of the SVN source tree yet, but once you have completed these steps, report back and I will send you the extension files.

Pre-requisites:
* Windows 32 or 64 bit OS.
* TortoiseSVN (https://tortoisesvn.net/downloads.html) [make sure to check "command line tools" on installation]
* CMake (https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.msi) [make sure to check "add to path for all users" on installation]
* Visual Studio 2012 Express (http://www.microsoft.com/en-us/download ... x?id=34673)
* Visual Studio 2012 Update 4 (https://www.microsoft.com/en-us/downloa ... x?id=39305)

Process:
* SVN check out the BCI2000 trunk (https://www.bci2000.org/svn/trunk) setting the revision to the one of the latest binary (see R-number in the binary section above).
* For 32-bit builds start "Make VS2012 Project Files.cmd" in the batch folder.
* For 64-bit builds start "Make VS2012 Win64 Project Files.cmd" in the batch folder.
* This cmd file will open a command window in which you can select which modules should be included in the build.
* To fine-tune (e.g., for debugging, disable the application bundling by unchecking USE_APPLICATION_BUNDES) open the "Configure.sh.cmd" to start the CMake GUI, check/uncheck the appropriate options and click at "Configure" and then "Generate" at the bottom left corner of this window.
* Open the "BCI2000.sln", select the "Release" or "Debug" and the select "Build Solution" from the "Build" menu.
* After building is completed, you can debug the "Debug" build by starting the appropriate BCI2000 configuration and selecting the corresponding BCI2000 module from "Attach to Process" from the Debug menu. Set appropriate breakpoints and perform your debugging.


Regards, Peter

tinui
Posts: 16
Joined: 14 May 2015, 02:11

Re: looking for source code of CursorTask

Post by tinui » 20 May 2016, 05:37

Hi,Peter.

Thank you for replying to my e-mail.
I completed your "Pre-requisites".

Pre-requisites:
* Windows 32 or 64 bit OS. ->32bit
* TortoiseSVN (https://tortoisesvn.net/downloads.html) [make sure to check "command line tools" on installation]->completed
* CMake (https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.msi) [make sure to check "add to path for all users" on installation]->completed
* Visual Studio 2012 Express (http://www.microsoft.com/en-us/download ... >completed
* Visual Studio 2012 Update 4 (https://www.microsoft.com/en-us/downloa ... >completed

After that, I run the process.
However, when I executed ' "Make VS2012 Project Files.cmd" in the batch folder ', the following error(Fig1.png) came out.
And, I executed ' To fine-tune (e.g., for debugging, disable the application bundling by unchecking USE_APPLICATION_BUNDES) open the "Configure.sh.cmd" to start the CMake GUI, check/uncheck the appropriate options and click at "Configure" and then "Generate" at the bottom left corner of this window" '.
However,I tried to various run, but I get an error. I can't click "Configure" and "Generate".

I looked web site, but I did not know whether I do what solved.
Could you tell me the solution?



Error's Content
CMake Error at cmake/Utils.cmake:25 (MATH):
math cannot parse the expression: "�p�X: C:\Users\gwang\trunk

Working Copy Root Path: C:\Users\gwang\trunk

URL: https://www.bci2000.org/svn/trunk

Relative URL: ^/trunk

���|�W�g���̃��[�g: https://www.bci2000.org/svn

���|�W�g�� UUID: 7ef59cdf-0624-0410-a474-e34ce222aafa

���r�W����: 5367

�m�[�h����: �f�B���N�g��

�������̏���: ���ɂȂ�

�ŏI�ύX��: mellinger

�ŏI�ύX���r�W����: 5367

�ŏI�ύX����: 2016-05-20 04:34:26 +0900 (2016/05/20 (��))


- 4230": syntax error, unexpected exp_DIVIDE, expecting exp_OPENPARENT or exp_NUMBER (84)
Call Stack (most recent call first):
CMakeLists.txt:31 (INCLUDE)

Silencing CMP0020 policy warning
Silencing CMP0022 policy warning
Silencing CMP0038 policy warning
Silencing CMP0043 policy warning
Silencing CMP0040 policy warning
Silencing CMP0042 policy warning
Using Qt 5.3.2 (C:/Users/gwang/trunk/build/CMakeFiles/extlib/qt-5.3.2/win32-msvc2012/bin)
Configuring project BCI2000 Version 3.05
Skipping custom extension DataGloveLogger
---- (to enable, set EXTENSIONS_DATAGLOVELOGGER to ON)
Skipping custom extension WebcamLogger
---- (to enable, set EXTENSIONS_WEBCAMLOGGER to ON)
Skipping custom extension EyetrackerLogger
---- (to enable, set EXTENSIONS_EYETRACKERLOGGER to ON)
Skipping custom extension WiimoteLogger
---- (to enable, set EXTENSIONS_WIIMOTELOGGER to ON)
Skipping custom extension GazeMonitorFilter
---- (to enable, set EXTENSIONS_GAZEMONITORFILTER to ON)
Skipping custom extension AudioExtension
---- (to enable, set EXTENSIONS_AUDIOEXTENSION to ON)
Skipping custom extension StimBoxFilter
---- (to enable, set EXTENSIONS_STIMBOXFILTER to ON)
Skipping custom extension CyberGloveLogger
---- (to enable, set EXTENSIONS_CYBERGLOVELOGGER to ON)
Skipping custom extension EyetrackerLoggerTobii3
---- (to enable, set EXTENSIONS_EYETRACKERLOGGERTOBII3 to ON)
Skipping custom extension EyetrackerLoggerTobiiX
---- (to enable, set EXTENSIONS_EYETRACKERLOGGERTOBIIX to ON)
Skipping custom extension ParallelPortFilter
---- (to enable, set EXTENSIONS_PARALLELPORTFILTER to ON)
Target #1: LibTiny_StaticCrt (Tiny utility library, STATIC_LIBRARY)
Target #2: LibTiny_DynamicCrt (Tiny utility library, STATIC_LIBRARY)
Target #3: BCI2000FrameworkCore_StaticCrt (Framework library, STATIC_LIBRARY)
Target #4: BCI2000FrameworkCore_DynamicCrt (Framework library, STATIC_LIBRARY)
Target #5: BCI2000FrameworkSigSrcModule (Framework library, STATIC_LIBRARY)
Target #6: BCI2000FrameworkSigProcModule (Framework library, STATIC_LIBRARY)
Target #7: BCI2000FrameworkAppModule (Framework library, STATIC_LIBRARY)
Target #8: NewBCI2000Module (Custom bootstrapping tool, CONSOLEAPP)
Target #9: NewBCI2000Filter (Custom bootstrapping tool, CONSOLEAPP)
Target #10: DylibTool (CONSOLEAPP)
CMake Error at CMakeFiles/extlib/qt-5.3.2/win32-msvc2012/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:109 (set):
Syntax error in cmake code at

C:/Users/gwang/trunk/build/CMakeFiles/extlib/qt-5.3.2/win32-msvc2012/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:109

when parsing string

-IC:/Users/gwang/trunk/src/shared/compat;-IC:/Users/gwang/trunk/src/shared/compat/C99Inttypes;-IC:/Users/gwang/trunk/src/shared/utils/Lib;-IC:/Users/gwang/trunk/build/CMakeFiles/buildutils/SchedulingTool;-IC:/Users/gwang/trunk/build/buildutils/SchedulingTool;-IC:/Users/gwang/trunk/build/CMakeFiles/buildutils/SchedulingTool;-DPROJECT_REVISION="�p�X: C:\Users\gwang\trunk

Working Copy Root Path: C:\Users\gwang\trunk

URL: https://www.bci2000.org/svn/trunk

Relative URL: ^/trunk

���|�W�g���̃��[�g: https://www.bci2000.org/svn

���|�W�g�� UUID: 7ef59cdf-0624-0410-a474-e34ce222aafa

���r�W����: 5367

�m�[�h����: �f�B���N�g��

�������̏���: ���ɂȂ�

�ŏI�ύX��: mellinger

�ŏI�ύX���r�W����: 5367

�ŏI�ύX����: 2016-05-20 04:34:26 +0900 (2016/05/20 (��))



";PROJECT_DATE="�p�X: C:\Users\gwang\trunk

Working Copy Root Path: C:\Users\gwang\trunk

URL: https://www.bci2000.org/svn/trunk

Relative URL: ^/trunk

���|�W�g���̃��[�g: https://www.bci2000.org/svn

���|�W�g�� UUID: 7ef59cdf-0624-0410-a474-e34ce222aafa

���r�W����: 5367

�m�[�h����: �f�B���N�g��

�������̏���: ���ɂȂ�

�ŏI�ύX��: mellinger

�ŏI�ύX���r�W����: 5367

�ŏI�ύX����: 2016-05-20 04:34:26 +0900 (2016/05/20
(��))";PROJECT_NAME="BCI2000";PROJECT_TIMESPAN="2000-2016";PROJECT_DOMAIN="bci2000.org";PROJECT_VERSION="3.05";WEBSEARCH_DOMAIN="www.google.com";BUILD_USER="gwang@";DISABLE_UNITTEST;DISABLE_BCITEST=1;_USE_MATH_DEFINES;NOMINMAX;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;COMPILER_NAME="MSVC-17.0.61030.0-x86";DISABLE_BCITEST;HAVE_LIB_TINY;USE_QT;-DWIN32


Invalid escape sequence \U
Call Stack (most recent call first):
CMakeFiles/extlib/qt-5.3.2/win32-msvc2012/lib/cmake/Qt5Core/Qt5CoreMacros.cmake:181 (qt5_create_moc_command)
cmake/FindQt.cmake:158 (QT5_WRAP_CPP)
cmake/Utils.cmake:207 (QT_WRAP_CPP)
cmake/AddTargetMacro.cmake:95 (UTILS_AUTOMOC)
buildutils/SchedulingTool/CMakeLists.txt:9 (BCI2000_ADD_TARGET)


Configuring incomplete, errors occurred!
See also "C:/Users/gwang/trunk/build/CMakeFiles/CMakeOutput.log".





Regards,
tinui
Attachments
Fig1.PNG

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 20 May 2016, 08:52

Tinui,

this is odd. Can you please check if you have at least Update 4 installed for Visual Studio 2012. You can see that in the Help / About Visual Studio menu that shows the about box with the version and update number.

Let me know.

Regards, Peter

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 20 May 2016, 09:54

Tinui,

I just realized that you are using a non-western Windows. It could be that CMake has issues processing the characters in your data and path format. You can try to change the localization on your Windows to US english, including the date format. Also please check that are not having any special non-western characters in your file paths for BCI2000.

If this does not work, try to use a western Windows, or install a virtual machine with a western Windows for compiling. The compiled version should then run fine on your non-western system.

Regards, Peter

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 20 May 2016, 10:10

Tinui,

please also try to set the the LANG environment variable to en_US. If this does not work, uninstall TortoiseSVN and then re-install it without the command line tools.

Code: Select all

set LANG=en_US
Delete the build folder and update to SVN 5368. This should hopefully then do the trick.

Regards, Peter

tinui
Posts: 16
Joined: 14 May 2015, 02:11

Re: looking for source code of CursorTask

Post by tinui » 23 May 2016, 03:39

Hi,Peter.

Thank you for replying to my e-mail.
I was able to resolve the error to thank for your reply.
And,when I did the build of "BCI2000.sln" and did debug, I was able to run well.
So,I completed process.

After that, I tried to run the batch file of CursorTask_SignalGenerator.
However, new errors have occurred.(BCI2000.PNG & System Log.PNG)
I looked web site, but I did not know whether I do what solved.
Could you tell me the solution?


Regards,
tinui
Attachments
BCI2000.PNG
System Log.PNG

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 23 May 2016, 09:03

Tinui,

are you running any audio output in the background, e.g., audio streaming?

What version and bit-ness (32/64) of Windows are you using?

What sound card are you using? can you post a screen shot from your device manager?

To further isolate the issue, can you please try to install and run the latest beta to see if the issue persists?

http://bci2000.org/downloads/bin/BCI200 ... p.exe.html

If the issue persists, can you try to make the following modification to the task:

Code: Select all

src/shared/utils/AV/AudioDevice.cpp
line 62
#define WASAPI_VIA_PA 1
Let me know if any of this resolves the issue.

Regards, Peter

tinui
Posts: 16
Joined: 14 May 2015, 02:11

Re: looking for source code of CursorTask

Post by tinui » 24 May 2016, 00:00

Hi,Peter.
Thank you for replying to my e-mail.
I was able to resolve the error to thank for your reply.

I am sorry to you to just question.
The main issue is, I think trying to make the training task, such as the following(training task.png).
By changing the ball to the bar, we want to make the training task that the trajectory of the bar is drawn.
When a participant has the right of the image , the bar extends to the right from the center.
If a participant has the left of the image,the bar extends to the left from the center.

Is it possible to create a training tasks by changing the source code of CursorFeedbackTask.cpp?



Regards,
tinui
Attachments
training task.PNG

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 24 May 2016, 10:30

Tinui,

you have three options:

1) Modify the CursorTask, however this task does a lot more than you need (e.g., 3D scenes)

2) Modify the FeedbackDemoTask, which should be easy as this is a simple 2D task. \

3) Generate your own task using the NewBCI2000Module.exe tool and selecting a new application in the Menu. BCI2000 has some classes that you should use for your graphic objects, such as RectangularShape

In the header file of your new application just define a rectangular shape object and a rect object for the position. Set the position and the initialize your rectangular shape object. You can see an example of that in the FeedbackScene2D.cpp and h file.

Code: Select all

RectangularShape	*mp_shaded_region;
GUI::Rect			m_gauge_target_rectangle;

Code: Select all

mp_shaded_region = new RectangularShape(mrDisplay);
mp_shaded_region->SetDisplayRect(m_gauge_target_rectangle);
mp_shaded_region->SetScalingMode(1);
mp_shaded_region->SetColor(RGBColor::White);
mp_shaded_region->SetFillColor(RGBColor(0x90EE90));
Regards, Peter
Regards, Peter

tinui
Posts: 16
Joined: 14 May 2015, 02:11

Re: looking for source code of CursorTask

Post by tinui » 26 May 2016, 05:11

Hi,Peter.

I am a beginner of C++.
I thought that I trying to make with you gave me proposed 2) or 3) .
I tried to run program at the day, but, I did not know what should I modify from anywhere.
First of all, what should do I think ?

Regards,
tinui.

pbrunner
Posts: 344
Joined: 17 Sep 2010, 12:43

Re: looking for source code of CursorTask

Post by pbrunner » 26 May 2016, 09:55

Tinui,

this will be a bit difficult without C++ experience. You can give it a try to create your own new application though. For this create a new custom application from the template using the NewBCI2000Module.exe and choosing new application in the menu. Try to create the RectangularShape object as detailed in the previous post. This entails defining the variable in the header. Creating the object in the constructor and manipulating it, every time the process function is called. If you manage to get this done, you have a good chance of getting the whole task implemented.

Regards, Peter

tinui
Posts: 16
Joined: 14 May 2015, 02:11

Re: looking for source code of CursorTask

Post by tinui » 30 Nov 2016, 23:11

Hello.
I’m writing this e-mail because I’d like to ask about the CursorTask of BCI 2000..

I think that the ball appearing in the center with the CursorTask can be moved using EEG.I have applied the C3, C4 electrodes to the classifier.However, I don’t know how to move the ball. What’s the EEG feature required to move the ball? Is the ball move when a difference is created between the electrodes simply when compared with the C3, C4 electrodes? Please let me know in detail.

Also, how is the AR model created at BCI 2000 created? If you have a program etc., I would like you to tell me where it is written about AR model.
The program was downloaded from https://www.bci2000.org/svn/trunk.

regards,
tinui.

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests