Difference between revisions of "How to use the real e-pucks with Aseba"

From IridiaWiki
Jump to navigationJump to search
Line 1: Line 1:
 
In order to use the e-puck with Aseba you need to complete several steps: [tested on Ubuntu 9.10 - March 2010]
 
In order to use the e-puck with Aseba you need to complete several steps: [tested on Ubuntu 9.10 - March 2010]
  +
  +
First of all you need to retrieve all the necessary files from the svn repository:
   
 
==== Download, compile and patch Dashel (v.127) and Aseba (v. 381) ====
 
==== Download, compile and patch Dashel (v.127) and Aseba (v. 381) ====
Line 7: Line 9:
 
''Step-by-step solution:''
 
''Step-by-step solution:''
 
* DASHEL
 
* DASHEL
** download Dashel v. 127
+
:* download Dashel v. 127
*** svn -r127 co http://svn.gna.org/svn/dashel/trunk dashel
+
svn -r127 co http://svn.gna.org/svn/dashel/trunk dashel
** patch it - (TODO this is necessary because... )
+
:* patch it - (TODO this is necessary because... )
*** cd dashel
+
cd dashel
*** patch -p0 < dashel_with_fpic_r127.patch
+
patch -p0 < dashel_with_fpic_r127.patch
** compile it
+
:* compile it
*** cmake .
+
cmake .
*** make
+
make
** install it in /usr/local (you can avoid this but then you need to modify the CMakeLists.txt in Aseba)
+
:* install it in /usr/local (you can avoid this but then you need to modify the CMakeLists.txt in Aseba)
*** sudo make install
+
sudo make install
   
 
* ASEBA
 
* ASEBA
** download Aseba v. 381
+
:* download Aseba v. 381
*** svn -r381 co http://svn.gna.org/svn/aseba/trunk aseba
+
svn -r381 co http://svn.gna.org/svn/aseba/trunk aseba
** patch it - (this is necessary in order to make Aseba communicate with the simulator )
+
:* patch it - (this is necessary in order to make Aseba communicate with the simulator )
*** cd aseba
+
cd aseba
*** patch -p0 < aseba_complete_r381.patch
+
patch -p0 < aseba_complete_r381.patch
** compile it
+
:* compile it
*** cmake .
+
cmake .
*** make
+
make
** install it in /usr/local
+
:* install it in /usr/local
*** sudo make install
+
sudo make install
** test if it works
+
:* test if it works
*** cd studio
+
cd studio
*** ./studio
+
./studio
** a window should appear, you are not able to connect now, it's normal
+
:* a window should appear. You are not able to connect now, it's normal
   
 
Now you should have Aseba working under your system ready to communicate with the simulator and the real e-pucks
 
Now you should have Aseba working under your system ready to communicate with the simulator and the real e-pucks
  +
  +
==== Bluetooth Configuration ====
  +
  +
* bluetooth/rfcomm.conf has to be copied in /etc/bluetooth
  +
* bluetooth/passwords/ has to be copied in /etc/bluetooth
  +
* bluetooth/90-local.rules has to be copied in /etc/udev/rules.d/
  +
  +
now you have to restart the services
  +
sudo /etc/init.d/bluetooth stop
  +
sudo /etc/init.d/udev restart (or sudo restart udev)
  +
sudo /etc/init.d/bluetooth start
  +
  +
check if in /dev/ there are some files called rfcomm**, if not do:
  +
sudo rfcomm bind all
  +
  +
you should now have all the necessary files to connect to the robots.
  +
  +
  +
NOTE:
  +
The above files have been created by us and are not complete. This means that if you want to use an e-puck that is not in the list you should add it.
  +
  +
To do that you have to first get the MAC address of the epuck you want to add: turn on the selected e-puck and do:
  +
hcitool scan
  +
modify rfcomm.conf and 90-local.rules using the existing lines as examples.
  +
  +
As a last step you need to add the password file in the passkeys directory. Go in /etc/bluetooth/passwords/ and do (with the correct epuck number and MAC):
  +
echo 'epuck_1442' > '08:00:17:2D:1A:15'
  +
  +
Once you have done this please update the corresponding file in the svn. Eventually we will be able to have the complete list for all the e-pucks (or, at least, the most used ones)

Revision as of 18:37, 10 March 2010

In order to use the e-puck with Aseba you need to complete several steps: [tested on Ubuntu 9.10 - March 2010]

First of all you need to retrieve all the necessary files from the svn repository:

Download, compile and patch Dashel (v.127) and Aseba (v. 381)

Fast solution:

  • use the script done by Arne (TODO put the path)

Step-by-step solution:

  • DASHEL
  • download Dashel v. 127
svn -r127 co http://svn.gna.org/svn/dashel/trunk dashel
  • patch it - (TODO this is necessary because... )
cd dashel
patch -p0 < dashel_with_fpic_r127.patch
  • compile it
cmake .
make
  • install it in /usr/local (you can avoid this but then you need to modify the CMakeLists.txt in Aseba)
sudo make install
  • ASEBA
  • download Aseba v. 381
svn -r381 co http://svn.gna.org/svn/aseba/trunk aseba
  • patch it - (this is necessary in order to make Aseba communicate with the simulator )
cd aseba
patch -p0 < aseba_complete_r381.patch
  • compile it
cmake .
make
  • install it in /usr/local
sudo make install
  • test if it works
cd studio
./studio
  • a window should appear. You are not able to connect now, it's normal

Now you should have Aseba working under your system ready to communicate with the simulator and the real e-pucks

Bluetooth Configuration

  • bluetooth/rfcomm.conf has to be copied in /etc/bluetooth
  • bluetooth/passwords/ has to be copied in /etc/bluetooth
  • bluetooth/90-local.rules has to be copied in /etc/udev/rules.d/

now you have to restart the services

sudo /etc/init.d/bluetooth stop
sudo /etc/init.d/udev restart (or sudo restart udev)
sudo /etc/init.d/bluetooth start

check if in /dev/ there are some files called rfcomm**, if not do:

sudo rfcomm bind all

you should now have all the necessary files to connect to the robots.


NOTE: The above files have been created by us and are not complete. This means that if you want to use an e-puck that is not in the list you should add it.

To do that you have to first get the MAC address of the epuck you want to add: turn on the selected e-puck and do:

hcitool scan 

modify rfcomm.conf and 90-local.rules using the existing lines as examples.

As a last step you need to add the password file in the passkeys directory. Go in /etc/bluetooth/passwords/ and do (with the correct epuck number and MAC):

echo 'epuck_1442' > '08:00:17:2D:1A:15'

Once you have done this please update the corresponding file in the svn. Eventually we will be able to have the complete list for all the e-pucks (or, at least, the most used ones)