HOW TO CONTROL ROBOT

About the GUI application to design signal processing pipelines
Post Reply
asho6005
Posts: 3
Joined: Tue Mar 02, 2010 5:30 am

HOW TO CONTROL ROBOT

Post by asho6005 »

I have designed the modularEEG board by myself... Its work perfectly with openvibe..
Now i want to generate command to be send to microcontroller to control my robot to turn left, right and to go straight... i hav placed the electrode at cz for foot(straight), c3 and c4 for right and left...
but i dont know how to design the boxes in openvibe designer to generate those commands... CAN YOU HELP ME PLEASE???

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: HOW TO CONTROL ROBOT

Post by lbonnet »

Hi ash06005,
Thanks for your interest in this project !

I deleted the duplicate topics.
We are doing our best to answer questions on the forum with a reduced staff these weeks.
Please be patient, adding more and more topics doesn't help ;)
I have designed the modularEEG board by myself... Its work perfectly with openvibe..
Good job ! and thanks for the feedback...
Now i want to generate command to be send to microcontroller to control my robot to turn left, right and to go straight... i hav placed the electrode at cz for foot(straight), c3 and c4 for right and left...
Ok so you want to control a robot with a 3-classes BCI (movements of the feet/right hand/left hand), am I right ?
First, I must warn you: multiclass classification usually requires much more electrodes to be efficient. For example the given scenarios in share/openvibe-scenarios/bci/motor-imagery uses 10 electrodes to handle the 2 classes right/left hand movements.
but i dont know how to design the boxes in openvibe designer to generate those commands...
If you want the signal processing chain, we can't give you a plug-and-play solution. But you can look at the sample scenarios:
- motor-imagery-bci-classifier-trainer.xml shows how to train a 2-class classifier.
- motor-imagery-bci-online.xml shows how to use a classifier processor to generate the online classification results.

If you are talking about "how to connect openvibe to your robot controller", you can use VRPN protocol, with the 2 usual parts :
- A VRPN button server box for the openvibe side
- A home-made VRPN client that will read the classification results on the VRPN server and transmit orders to your robot.

hope this help !

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

asho6005
Posts: 3
Joined: Tue Mar 02, 2010 5:30 am

Re: HOW TO CONTROL ROBOT

Post by asho6005 »

Thank you very much for ur suggestion
I have tested with simple program to know what commands that vrpn server sends
1.JPG
1.JPG (60.47 KiB) Viewed 17146 times
I checked with the hyperterminal
2.JPG
2.JPG (72.74 KiB) Viewed 17146 times
but it receive only the vrpn version only once....
3.JPG
3.JPG (67.48 KiB) Viewed 17146 times
CAN OPENVIBE SEND COMMANDS DIRECTLY TO SERIAL PORT

lbonnet
Site Admin
Posts: 417
Joined: Wed Oct 07, 2009 12:11 pm

Re: HOW TO CONTROL ROBOT

Post by lbonnet »

I have tested with simple program to know what commands that vrpn server sends
If you are not running a VRPN client, the server won't send a thing to your hyperterminal. The server only sends the vrpn version number, and wait for the same number from a client side.
If you want to know more about VRPN protocol, I suggest you look here. You can also find under openvibe-application/vr-demo/branches/wip-lbonnet some examples of VRPN use (in this case to interact with a VR application made with Ogre3D). The file you may want to look is CAbstractVrpnPeripheral.cpp/h.
CAN OPENVIBE SEND COMMANDS DIRECTLY TO SERIAL PORT
No. But feel free to contribute by implementing a box that does that !

Regards

Laurent
Follow us on twitter >> openvibebci

Checkout my (old) blog for some OpenViBE tips & tricks : here !

nbaron
Posts: 23
Joined: Mon Jan 18, 2010 4:54 am

Re: HOW TO CONTROL ROBOT

Post by nbaron »

Hi.
To complete what you want you have to pass thought VRPN.
OpenVibe act as a VRPN device (aka VRPN server) and the "thing" you want to control have to be a VRPN client.
How to do ?
It's depend on your "thing". For a robot connected via USB or Serial port to a PC, you have to write a program to catch VRPN events and throw command using you transfert protocol.
If you can detect the brainstates with OV, send them via "VRPN Button" box... you just have to take a look at the VRPN website to know how to create a VRPN client.

ps : I am working on VRPN Manager to simplify VRPN Client code, If you can wait I think I can finish it for sunday night.

asho6005
Posts: 3
Joined: Tue Mar 02, 2010 5:30 am

Re: HOW TO CONTROL ROBOT

Post by asho6005 »

THANKYOU very much Mr.Naëm Baron,
HAV U SIMPLIFY THE VRPN CLIENT CODE. send the code as soon as u finish... since i am not familiar with codings give me guidance how to implement it.. I am using atmega8 microcontroller for controlling my robots....

pickku
Posts: 23
Joined: Tue Mar 08, 2011 12:43 pm

Re: HOW TO CONTROL ROBOT

Post by pickku »

hi asho6005,
I am also doing my BCI project to control LEGO robot movement using EEG signal(eye movements -left, right and blink).Can you give me some idea how to proceed in the project and about this VRPN protocol

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: HOW TO CONTROL ROBOT

Post by yrenard »

Dear pickku,

you should be aware that eye movements -left, right and blink is not EEG. EEG stands for Electroencephalography ; this is a measurement method for brain activity. Eye movements and blinks mostly generate muscular activity and this is called Electromyography or EMG. By the way, both kind of information can be measured with the same device most of the time. And still, controlling a robot with EMG could be fun ;) but this is probably not BCI as the Brain is not involved here.

Hope this helps,
Yann

pickku
Posts: 23
Joined: Tue Mar 08, 2011 12:43 pm

Re: HOW TO CONTROL ROBOT

Post by pickku »

thankyou for reply. First step in my project I want to do is controlling robot using eye movements then if the process succeeds I will move on controlling robot using EEG.I read your post I hope you can help and guide me,since you have done somewhat related to my project.Can you help me sir,because this is new area in our domain and no one knows about openvibe or Emotiv.

Yesterday I acquired signal using Emotiv and it works fine for blink and left and right eye movements.After this I am strucked what to do.????:(

yrenard
Site Admin
Posts: 645
Joined: Fri Sep 01, 2006 3:39 pm
Contact:

Re: HOW TO CONTROL ROBOT

Post by yrenard »

Dear pickku,

thank you for this positive feedback. As regarding to your question "what to do next", I suggest you try to tell us more about what you want to do. Giving us more details will help you know what knowledge is missing, then you will be able to ask questions where we can help, not do it for you... hopefully you will even be able to find the answers in the documentation yourself ;)

I sincerely hope this helps you !
Yann

pickku
Posts: 23
Joined: Tue Mar 08, 2011 12:43 pm

Re: HOW TO CONTROL ROBOT

Post by pickku »

Thankyou for your reply sir.
My project is based on EEG.I acquired signals using Emotiv EPOC for eyemovements(left,right,up,down and blink)and visualized in openvibe, I want to extract the features saying eye blink or up/down movement happened and I want to classify it and training should be done if any eye movement is occuring to notify which type of eye movement occured whether blink,up or etc.

After this I want to use this signal to control the movement of NXT LEGO robot.

This I want to do with short period can u help me.

ashishviswanath
Posts: 2
Joined: Tue Jun 14, 2011 7:07 am

Re: HOW TO CONTROL ROBOT

Post by ashishviswanath »

sir, we are from India ....doing a project on brain actuated robotic control........
we need to communicate openvibe with the visual
basic program (created for our robot control)....as per my knowledge openvibe offers only one
possible way to communicate with an external device (robot ) as a VRPN
(VIRTUAL REALITY PERIPHERAL NETWORK) client.....ie we must initialize
our robot as a vrpn client and the vrpn server of the openvibe
communicates through this......unfortunately we cant understand the
initialization
(vrpn client) program......can you help us.......??
is there any other options for interfacing visual basic pgm with openvibe?

sir pls do answer its urgent,i need ur reply..............
..........anticipating your reply.

ddvlamin
Posts: 160
Joined: Thu Aug 13, 2009 8:39 am
Location: Ghent University
Contact:

Re: HOW TO CONTROL ROBOT

Post by ddvlamin »

Hi,

To my knowledge it is the best (and maybe only way) to communicate with an external device if you do not want to write your own box for communication over usb, serial port or even http...

On http://www.thewired.be/blog/wp-content/ ... enViBE.zip you can find a sample Analog VRPN project. The code you're interested in is in Openvibe.cpp

It first creates an analog vrpn object with a name that identifies the analog openvibe server (as defined in OpenViBE's corresponding box)

Code: Select all

ana = new vrpn_Analog_Remote("openvibe-vrpn@localhost");
then it registers a function handle that it will call to process the incoming data

Code: Select all

ana->register_change_handler(NULL, &handle_analog);
finally you call the vrpn mainloop

Code: Select all

	while ( 1 ){
		// Let the  analog device do its thing
		ana->mainloop();
	}
Then you still need to implement the function that you registered with the vrpn object

Code: Select all

void   VRPN_CALLBACK handle_analog(void *userdata, vrpn_ANALOGCB b){

}
Also, the example code that lbonnet posted above could help you out in finding out how VRPN works:
lbonnet wrote:If you want to know more about VRPN protocol, I suggest you look here. You can also find under openvibe-application/vr-demo/branches/wip-lbonnet some examples of VRPN use (in this case to interact with a VR application made with Ogre3D). The file you may want to look is CAbstractVrpnPeripheral.cpp/h.

Hope this puts you on the right track,

Best regards,
Dieter Devlaminck

ashishviswanath
Posts: 2
Joined: Tue Jun 14, 2011 7:07 am

Re: HOW TO CONTROL ROBOT

Post by ashishviswanath »

thank you sir .......thanks for the reply ..........happy that you people are there to help us....i will contact u if any doubt arises in between...........

Post Reply