[Solved] Acquisition server with Emotiv headset on Linux

Obtaining data from various hardware devices
DarkPatate
Posts: 47
Joined: Tue Apr 07, 2015 11:31 am

Re: Acquisition server with Emotiv headset on Linux

Post by DarkPatate »

Ok, I downloaded the right version.
Now, the patch seems to not work, see the attached log file.
Attachments
patch-log.txt
(1.94 KiB) Downloaded 292 times

gserrier
Posts: 71
Joined: Tue Apr 01, 2014 8:22 am

Re: Acquisition server with Emotiv headset on Linux

Post by gserrier »

In patchEmotiv.sh

Replace

Code: Select all

OPENVIBE_EMOTIV_PATH="${OPENVIBE_LOCATION}/${OPENVIBE_DIR}/openvibe-applications/acquisition-server/trunc/src/emotiv-epoc"
By

Code: Select all

OPENVIBE_EMOTIV_PATH="${OPENVIBE_LOCATION}/${OPENVIBE_DIR}/applications/platform/acquisition-server/src/drivers/emotiv-epoc"
Guillaume

DarkPatate
Posts: 47
Joined: Tue Apr 07, 2015 11:31 am

Re: Acquisition server with Emotiv headset on Linux

Post by DarkPatate »

So, I passed all the steps before the compilation. But the build aborted, see the log file.
Attachments
build_log.txt
(17.72 KiB) Downloaded 285 times

gserrier
Posts: 71
Joined: Tue Apr 01, 2014 8:22 am

Re: Acquisition server with Emotiv headset on Linux

Post by gserrier »

In file FindThirdPartyEmotivAPI.cmake

replace

Code: Select all

TARGET_LINK_LIBRARIES(${PROJECT_NAME}-dynamic ${LIB_EmotivAPI} )
by

Code: Select all

TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_EmotivAPI} )

DarkPatate
Posts: 47
Joined: Tue Apr 07, 2015 11:31 am

Re: Acquisition server with Emotiv headset on Linux

Post by DarkPatate »

An other error, see the log file :p
Attachments
build_log2.txt
(39.91 KiB) Downloaded 277 times

gserrier
Posts: 71
Joined: Tue Apr 01, 2014 8:22 am

Re: Acquisition server with Emotiv headset on Linux

Post by gserrier »

Looks like we just fall back to error we've got friday. With all windows related issues.

I took a second look to the first solution (the one from friday) we were try to set up. I think the problem comes from a mistake I made in the cmake file. So lets try with this solution and set it up to the end, and later I will insert all modifications in the openvibe repo to have it work properly. Sorry to use you as a tester :(

Replace the content of FindThirdPartyEmotivApi.cmake by

Code: Select all

# ---------------------------------
# Finds Emotiv SDK
# Adds library to target
# Adds include path
# ---------------------------------

# edkErrorCode.h EmoStateDLL.h
   #FIND_PATH(PATH_EmotivAPI edk.h  PATHS "/home/simeon/EmotivResearch_2.0.0.20"  "/home/simeon/EmotivResearch_2.0.0.20/doc/examples_Qt/example5" ${OV_CUSTOM_DEPENDENCIES_PATH})
   FILE(GLOB PATH_Candidates
      "C:/Program Files/Emotiv Development Kit*"
      "/home/simeon/EmotivResearch_2.0.0.20*"
   )
   FOREACH(Candidate_folder ${PATH_Candidates})
      # MESSAGE(STATUS "Found path ${PATH_Candidate}")
      LIST(APPEND PATH_Candidates ${Candidate_folder}/doc/examples_Qt/example5)
   ENDFOREACH(Candidate_folder ${PATH_Candidates})
   MESSAGE(STATUS "Emotiv paths found ${PATH_Candidates}")
   
   FIND_PATH(PATH_EmotivAPI edk.h  PATHS ${PATH_Candidates} ${OV_CUSTOM_DEPENDENCIES_PATH})
   IF(PATH_EmotivAPI)
      MESSAGE(STATUS "  Found Emotiv API...")
      INCLUDE_DIRECTORIES(${PATH_EmotivAPI})
      FIND_LIBRARY(LIB_EmotivAPI edk PATHS "${PATH_EmotivAPI}/../../../lib")
      IF(LIB_EmotivAPI)
         MESSAGE(STATUS "    [  OK  ] lib ${LIB_EmotivAPI}")
         TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIB_EmotivAPI} )
         # To delay load EDK.dll and redistribute binary
         #TARGET_LINK_LIBRARIES(${PROJECT_NAME} Delayimp.lib )
         #SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES LINK_FLAGS "/DELAYLOAD:edk.dll")
      ELSE(LIB_EmotivAPI)
         MESSAGE(STATUS "    [FAILED] lib Emotiv edk.lib")
      ENDIF(LIB_EmotivAPI)

      # Copying of DLL files is not needed anymore because of delay load library
     
      ADD_DEFINITIONS(-DTARGET_HAS_ThirdPartyEmotivAPI)
   ELSE(PATH_EmotivAPI)
      MESSAGE(STATUS "  FAILED to find Emotiv API")
   ENDIF(PATH_EmotivAPI)
Guillaume

DarkPatate
Posts: 47
Joined: Tue Apr 07, 2015 11:31 am

Re: Acquisition server with Emotiv headset on Linux

Post by DarkPatate »

No problem, if it works in the end, it is essential! To be honest, I was afraid to annoy you with all my log files!

So, the compilation aborted again, see the log file. That look like as programming error (parse error).

Thanks for your help!
Attachments
build_log3.txt
(36.86 KiB) Downloaded 286 times

gserrier
Posts: 71
Joined: Tue Apr 01, 2014 8:22 am

Re: Acquisition server with Emotiv headset on Linux

Post by gserrier »

Looks like you applied the modifications in the wrong directory. You need to apply them in /home/simeon/Logiciels/openvibe-1.0.0/

DarkPatate
Posts: 47
Joined: Tue Apr 07, 2015 11:31 am

Re: Acquisition server with Emotiv headset on Linux

Post by DarkPatate »

Hallelujah! It works!!! Many, many, many thanks!!! I could display raw data from my head in the designer! And with gyroscope!

Thanks again for taking your time to help me!

gserrier
Posts: 71
Joined: Tue Apr 01, 2014 8:22 am

Re: Acquisition server with Emotiv headset on Linux

Post by gserrier »

Nice.
I'll put everything clear later for next release.

Guillaume

jmann18
Posts: 8
Joined: Mon Feb 05, 2018 5:40 pm

Re: [Solved] Acquisition server with Emotiv headset on Linux

Post by jmann18 »

Hello, I am experiencing the same issues, but with windows. The emotiv driver does not appear on the server acquisition list. Could you please provide me a brief summary of what you did to resolve this?
-Thanks

Post Reply