Emotiv / cortex-example

Example with Cortex V2/V3 API
https://emotiv.com
MIT License
202 stars 115 forks source link

Get MentalCommand Data #139

Closed floriangamillscheg closed 3 years ago

floriangamillscheg commented 3 years ago

Hey,

  1. I want to use the mental commands for my application using Unity... I subscribe to sys and com data streams and then I load my profile.... But how am I able to retrieve the current mental commands? I can't find a method in DataStreamManager.... I know that the current command is printed in OnMentalCommandReceived but how can I actually get to the commands?

  2. The commands that I get seem very random.... Usually when I start the EmotivBCI App, it sometimes asks me to relax (I guess to get my current neutral mental command) with my eyes open and then with my eyes closed... Is there a way in Unity to do the same? And could it be that when I get the mental commands in unity that it doesn't actually use the profile as its basis?

tungntEmotiv commented 3 years ago

Hi @floriangamillscheg ,

Thanks for your patience.

  1. Yes, after subscribing the data and load profile. You can see the current mental commands. But you must load a training profile that contains training data for at least one action. Please reference the "Getting live actions" flow at link In the OnMentalCommandReceived function, we have parsing the data . You can uncomment the lines // TODO: emit event to other modules MentalCommandReceived(this, comEvent); To emit the event to BCITraining example. Currently, In BCITraining.cs we haven't example for live modes. But you can do similar to other event. We will update the example for training later
  2. Actually we do not need to add eye open and eye closed in your application. But i should relax before each training, it might help the training result better.