From GCtronic Wiki
Jump to: navigation, search

1 Overview

Elisa-3 is an evolution of the Elisa robot based on a different microcontroller and including a comprehensive set of sensors:

The robot is able to self charge using the charger station, as shown in the right side figure. The following figure illustrates the position of the various sensors:

1.1 Useful information

  • the top light diffuser and robot are designed to lock together, but the diffuser isn't fixed and can thus be removed as desired; the top light diffuser, as the name suggests, helps the light coming from the RGB led to be smoothly spread out, moreover the strip attached around the diffuser let the robot be better detected from others robots. Once the top light diffuser is removed, pay attention not to look at the RGB led directly. In order to remove the top light diffuser simply pull up it, then to place it back on top of the robot remember to align the 3 holes in the diffuser with the 3 IRs emitters and push down carefully untill the diffuser is stable; pay attention to not apply too much force on the IRs emitters otherwise they can bend and stop working.

  • when the top light diffuser is fit on top of the robot, then in order to change the selector position you can use the tweezers; the selector is located near the front-left IR emitter, as shown in the following figure:

  • if you encounter problems with the radio communication (e.g. lot of packet loss) then you can try moving the antenna that is a wire near the robot label. Place the antenna as high as possible, near the plastic top light diffuser; try placing it in the borders in order to avoid seeing a black line on the top light diffuser when the RGB led is turned on.

1.2 Robot charging

The Elisa-3 can be piloted in the charger station in order to be automatically self charged; there is no need to unplug the battery for charing. The following figures shows the robot approaching the charger station; a led indicates that the robot is in charge:

The microcontroller is informed when the robot is in charge and this information is also transferred to the PC in the flags byte; this let the user be able to pilote the robot to the charger station and be informed when it is actually in charge. More information about the radio protocol can be found in the section Communication.

Moreover the robot is also charged when the micro USB cable is connected to a computer; pay attention that if the USB cable is connected to a hub, this one need to be power supplied.

The following video shows the Elisa-3 piloted through the radio to the charging station using the monitor application:

1.3 Top light diffuser

From February 2013 on the Elisa-3 is equipped with a new top light diffuser designed to fit perfectly in the 3 IRs emitters of the robot. The diffuser is made of plastic (3d printed), it is more robust and it simplifies the removal and insertion. Here is an image:

2 Hardware

The following figures show the main components offered by the Elisa-3 robot and where they are physically placed:

2.1 Power autonomy

The robot is equipped with two batteries for a duration of about 3 hours at normal usage (motors run continuously, IRs and RGB leds turned on).

2.2 Detailed specifications

Feature Technical information
Size, weight 50 mm diameter, 30 mm height, 39 g
Battery, autonomy LiIPo rechargeable battery (2 x 130 mAh, 3.7 V). About 3 hours autonomy. Recharging time about 1h e 30.
Processor Atmel ATmega2560 @ 8MHz (~ 8 MIPS); 8 bit microcontroller
Memory RAM: 8 KB; Flash: 256 KB; EEPROM: 4 KB
Motors 2 DC motors with a 25:1 reduction gear; speed controlled with backEMF
Magnetic wheels Adesion force of about 1 N (100 g) depending on surface material and painting
Wheels diamater = 9 mm
Distance between wheels = 40.8 mm
Speed Max: 60 cm/s
Mechanical structure PCB, motors holder, top white plastic to diffuse light
IR sensors 8 infra-red sensors measuring ambient light and proximity of objects up to 6 cm; each sensor is 45° away from each other
4 ground sensors detecting the end of the viable surface (placed on the front-side of the robot)
IR emitters 3 IR emitters (2 on front-side, 1 on back-side of the robot)
Accelerometer 3D accelerometer along the X, Y and Z axis
LEDs 1 RGB LED in the center of the robot; 8 green LEDs around the robot
Switch / selector 16 position rotating switch
Communication Standard Serial Port (up to 38kbps)
Wireless: RF 2.4 GHz; the throughput depends on number of robot: eg. 250Hz for 4 robots, 10Hz for 100 robots; up to 10 m
Remote Control Infra-red receiver for standard remote control commands
Expansion bus Optional connectors: 2 x UART, I2C, 2 x PWM, battery, ground, analog and digital voltage
Programming C/C++ programming with the AVR-GCC compiler (WinAVR for Windows). Free compiler and IDE (AVR Studio / Arduino)

3 Communication

The radio base-station is connected to the PC through USB and transfers data to and from the robot wirelessly. In the same way the radio chip (nRF24L01+) mounted on the robot communicates through SPI with the microcontroller and transfers data to and from the PC wirelessly.
The robot is identified by an address that is stored in the last two bytes of the microcontroller internal EEPROM; the robot firmware setup the radio module reading the address from the EEPROM. This address corresponds to the robot id written on the label placed under the robot and should not be changed.

3.1 Packet format - PC to radio to robot

The 13 bytes payload packet format is shown below (the number in the parenthesis expresses the bytes):

Command (1) Red led (1) Blue led (1) Green led (1) IR + Flags (1) Right motor (1) Left motor (1) Small green leds (1) Flags2 (1) Remaining 5 bytes are unused
  • Command: 0x27 = change robot state; 0x28 = goto base-station bootloader (this byte is not sent to the robot)
  • Red, Blue, Green leds: values from 0 (OFF) to 100 (ON max power)
  • IR + flags:
    • first two bits are dedicated to the IRs:
      • 0x00 => all IRs off
      • 0x01 => back IR on
      • 0x02 => front IRs on
      • 0x03 => all IRs on
    • third bit is reserved for enabling/disabling IR remote control (0=>disabled, 1=>enabled)
    • fourth bit is used for sleep (1 => go to sleep for 1 minute)
    • fifth bit is used to calibrate all sensors (proximity, ground, accelerometer) and reset odometry
    • sixth bit is reserved (used by radio station)
    • seventh bit is used for enabling/disabling onboard obstacle avoidance
    • eight bit is used for enabling/disabling onboard cliff avoidance
  • Right, Left motors: speed expressed in 1/5 of mm/s (i.e. a value of 10 means 50 mm/s); MSBit indicate direction: 1=forward, 0=backward; values from 0 to 127
  • Small green leds: each bit define whether the corresponding led is turned on (1) or off (0); e.g. if bit0=1 then led0=on
  • Flags2:
    • bit0 is used for odometry calibration
    • remaining bits unused
  • Remaining bytes free to be used

3.1.1 Optimized protocol

The communication between the pc and the base-station is controlled by the master (computer) that continuously polls the slave (base-station); the polling is done once every millisecond and this is a restriction on the maximum communication throughput. To overcome this limitation we implemented an optimized protocol in which the packet sent to the base-station contains commands for four robots simultaneously; the base-station then separate the data and send them to the correct robot address. The same is applied in reception, that is the base-station is responsible of receiving the ack payloads of 4 robots (64 bytes in total) and send them to the computer. This procedure let us have a throughput 4 times faster.

3.2 Packet format - robot to radio to PC

The robot send back to the base-station information about all its sensors every time it receive a command; this is accomplished by using the "ack payload" feature of the radio module. Each "ack payload" is 16 bytes length and is marked with an ID that is used to know which information the robot is currently transferring. The sequence is the following (the number in the parenthesis expresses the bytes):

ID=3 (1) Prox0 (2) Prox1 (2) Prox2 (2) Prox3 (2) Prox5 (2) Prox6 (2) Prox7 (2) Flags (1)
ID=4 (1) Prox4 (2) Ground0 (2) Ground1 (2) Ground2 (2) Ground3 (2) AccX (2) AccY (2) TV remote (1)
ID=5 (1) ProxAmbient0 (2) ProxAmbient1 (2) ProxAmbient2 (2) ProxAmbient3 (2) ProxAmbient5 (2) ProxAmbient6 (2) ProxAmbient7 (2) Selector (1)
ID=6 (1) ProxAmbient4 (2) GroundAmbient0 (2) GroundAmbient1 (2) GroundAmbient2 (2) GroundAmbient3 (2) AccZ (2) Battery (2) Free (1)
ID=7 (1) LeftSteps (4) RightSteps (4) theta (2) xpos (2) ypos (2) Free (1)

Pay attention that the base-station could return "error" codes in the first byte if the communication has problems:

  • 0 => transmission succeed (no ack received though)
  • 1 => ack received (should not be returned because if the ack is received, then the payload is read)
  • 2 => transfer failed

Packet ID 3:

  • Prox* contain values from 0 to 1023, the greater the values the nearer the objects to the sensor
  • The Flags byte contains these information:
    • bit0: 0 = robot not in charge; 1 = robot in charge
    • bit1: 0 = button pressed; 1 = button not pressed
    • bit2: 0 = robot not charged completely; 1 = robot charged completely
    • the remainig bits are not used at the moment

Packet ID 4:

  • Prox4 contains values from 0 to 1023, the greater the values the nearer the objects to the sensor
  • Ground* contain values from 512 to 1023, the smaller the value the darker the surface
  • AccX and AccY contain raw values of the accelerometer; the range is between -64 to 64
  • TV remote contains the last interpreted command received through IR

Packet ID 5:

  • ProxAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light
  • Selector contains the value of the current selector position

Packet ID 6:

  • ProxAmbient4 contains values from 0 to 1023, the smaller the values the brighter the ambient light
  • GroundAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light
  • AccZ contains raw values of the accelerometer; the range is between 0 and -128 (upside down)
  • Battery contains the sampled value of the battery, the values range is between 780 (battery discharged) and 930 (battery charged)

Packet ID 7:

  • LeftSteps and RightSteps contain the sum of the sampled speed for left and right motors respectively (only available when the speed controller isn't used; refer to xpos, ypos and theta when the speed controller is used)
  • theta contains the orientation of the robot expressed in 1/10 of degree (3600 degrees for a full turn); available only when the speed controller is enabled
  • xpos and ypos contain the position of the robot expressed in millimiters; available only when the speed controller is enabled

4 Software

4.1 Robot

4.1.1 Requirements

In order to communicate with the robot through the micro USB the FTDI driver need to be installed. If a serial port is automatically created when connecting the robot to the computer you're done otherwise visit the following site and download the drivers for your architecture (32 or 64 bits) FTDI drivers.

4.1.2 AVR Studio 4 project

The projects are built with AVR Studio 4 released by Atmel. Basic demo

This project is thought to be a starting point for Elisa-3 newbie users and basically contains a small and clean main with some basic demos selected through the hardware selector that show how to interact with robot sensors and actuators. The project source can be downloaded from Elisa-3 basic firmware source; the hex file can be directly downloaded from Elisa-3 basic firmware hex.
Selector position and related demo:

  • 0: no speed controller activated => free running (all others positions have the speed controller activated)
  • 1: obstacle avoidance enabled
  • 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)
  • 3: both obstacle and cliff avoidance enabled
  • 4: random RGB colors and small green leds on
  • 5: robot moving forward with obstacle avoidance enabled and random RGB colors Advanced demo

This is an extension of the basic demo project, basically it contains some additional advanced demos. The project source can be downloaded from Elisa-3 advanced firmware source; the hex file can be directly downloaded from Elisa-3 advanced firmware hex.
Selector position and related demo:

  • 0: no speed controller activated => free running (all others positions have the speed controller activated)
  • 1: obstacle avoidance enabled
  • 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)
  • 3: both obstacle and cliff avoidance enabled
  • 4: random RGB colors and small green leds on
  • 5: robot moving forward with obstacle avoidance enabled and random RGB colors
  • 6: robot testing and address writing through serial connection
  • 7: automatic charging demo (refer to section Videos), that is composed of 4 states:
    • random walk with obstacle avoidance
    • search black line
    • follow black line that lead to the charging station
    • charge for a while
  • 8: autonomous odometry calibration
  • 9: write default odometry calibration values in EEPROM (hard-coded values); wait 2 seconds before start writing the calibration values
  • 10: robot moving forward (with pause) and obstacle avoidance enabled; random RGB colors and green led effect
  • 11: local communication: robot alignment
  • 12: local communication: 2 or more robots exchange data sequentially
  • 13: local communication: listen and transmit continuously; when data received change RGB color
  • 14: local communication: RGB color propagation
  • 15: clock calibration (communicate with the PC through the USB cable to change the OSCCAL register); this position could also be used to remote contol the robot through the radio (only speed control is enabled)

4.1.3 Arduino IDE project

The project is built with the Arduino IDE 1.0 freely available from the official Arduino website. In order to build the Elisa-3 firmware with the Arduino IDE 1.0 the following steps has to be performed:

  1. download the Arduino IDE 1.0 (later versions should be also fine, refer to Arduino Software) and extract it, let say in a folder named "arduino-1.0"
  2. download the Elisa-3 library and extract it within the libraries folder of the Arduino IDE, in this case "arduino-1.0\libraries"; you should end up with a "Elisa3" folder within the libraries. If you start the Arduino IDE now you can see that the Elisa-3 library is available in the menu "Sketch=>Import Library..."
  3. the file boards.txt in the Arduino IDE folder "arduino-1.0\hardware\arduino" need to be changed to contain the definitions for the Elisa-3 robot, add the following definitions at the end of the file:

elisa3.name=Elisa 3 robot



  1. download the Elisa-3 project file and open it with the Arduino IDE (you should open the file "elisa3.ino")
  2. select "Elisa-3 robot" from the "Tools=>Board" menu; click on the "Verify" button to build the project
  3. to upload the resulting hex file, attach the micro usb and set the port from the "Tools=>Serial Port" menu consequently; turn on the robot and click on the "Upload" button

You can download the Arduino IDE 1.0.5 for Linux (32 bits) containing an updated avr toolchain (4.5.3) and the Elisa3 library from the following link arduino-1.0.5-linux32.zip.
If the Tools->Serial Port menu is grayed out then you need to start the Arduino IDE in a terminal typing sudo path/to/arduino.

If you want to have access to the compiler options you can download the following project Elisa3-arduino-makefile.zip that contains an Arduino IDE project with a Makefile, follow the instructions in the "readme.txt" file in order to build and upload to the robot.

4.1.4 Aseba

Aseba is a set of tools which allow novices to program robots easily and efficiently, refere to https://aseba.wikidot.com/ for more information.

The following steps explain how to start playing with the Aseba Studio:

  1. download and install Aseba https://aseba.wikidot.com/en:wininstall
  2. download the Elisa-3 target for Aseba (git repo https://github.com/stefanomorgani/aseba-target-elisa3.git, or directly the elisa3-aseba.hex) and upload it to the robot, it is an AVR Studio 4 project; this project depends on Aseba Headers and Libraries and it need to be placed within the target directory of Aseba (aseba/targets/elisa3-aseba) in order to be built
  3. turn on the robot and connect it to the computer (at the moment serial communication is used, in the future we will maybe add RF support too)
  4. start Aseba Studio and select custom inserting the following string to open the connection with the robot; port=3 refers to the COM3 port of the robot:

Once the connection is opened click on the checkbox auto to start updating the sensors data automatically; we can now interact with the robot, for instance on the left side we can see all the sensors values (proximity, ground, accelerometer, ...) and we can change the motor speed and turn on/off all the leds.
For an example of code you can download the following basic demos:

  1. extract the zip, the directory contains some file with aesl extension, this is the Aseba Studio code extension
  2. start Aseba and connect to the robot as explained previously
  3. click on File => Open... and select one of the examples extracted from the zip
  4. click on Load and then on Run; now the code is running on the robot but isn't stored in flash, thus when you turn off the robot it returns to its initial state; if you want finally save the program in memory you need to click on Tools => Write the program(s)... => inside the elisa3 and wait for the programming termination

When you're ready you can start programming the robot on your own, have a look at the aseba homepage for more information.

4.1.5 Matlab

The ePic2 Matlab interface was adapted to work with the Elisa-3 robot. The communication is handled with the radio module. Both Matlab 32 bits and 64 bits are supported (tested on Matlab R2010a) Follow these steps to start playing with the interface:

  1. program the robot with the advanced demo
  2. place the selector in position 15 (to pilot the robot through the interface with no obstacle and no cliff avoidance)
  3. connect the radio base-station to the computer
  4. download the ePic2 for Elisa-3 and extract it
  5. open (double click) the file main.m; once Matlab is ready type main+ENTER and the GUI should start
  6. click on the + sign (top left) and insert the robot address (e.g 3307), then click on Connect

4.1.6 Webots simulator

The following features have been included in the Elisa-3 model for the Webots simulator:

  • proximity sensors
  • ground sensors
  • accelerometer
  • motors
  • green leds around the robot
  • RGB led
  • radio communication

You can donwload the Webots project containig the Elisa-3 model (proto) and a demonstration world in the following link Elisa-3-webots.zip.

You can download a Webots project containing a demonstration world illustrating the usage of the radio communication between 10 Elisa-3 robots and a supervisor in the following link Elisa-3-webots-radio.zip. Here is a video of this demo:

4.1.7 Onboard behaviors

The released firmware contains two basic onboard behaviors: obstacle and cliff avoidance. Both can be enabled and disabled from the computer through the radio (seventh bit of flags byte for obstacle avoidance, eight bit of flags byte for cliff avoidance).

The following videos show three robots that have their obstacle avoidance enabled:

4.1.8 Programming

The robot is pre-programmed with a serial bootloader. In order to upload a new program to the robot a micro USB cable is required. The connection with the robot is shown below:

The avrdude utility is used to do the upload, the command to use is:

avrdude -p m2560 -P COM10 -b 57600 -c stk500v2 -D -Uflash:w:Elisa3-avr-studio.hex:i -v

where COM10 must be replaced with your com port and Elisa3-avr-studio.hex must be replaced with your application name.
The Basic demo and Advanced demo have this command contained in the file program.bat in the default directory within the project.
If you encounter some problem during programming (e.g. timeout problems) you can try following this sequence: turn on the robot, unplug the robot from the computer, plug the robot into the computer and then execute the programming command.
Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.

4.1.9 Internal EEPROM

The internal 4 KB EEPROM that resides in the microcontroller is pre-programmed with the robot ID in the last two bytes (e.g. if ID=3200 (0x0C80), then address 4094=0x80 and address 4095=0x0C). The ID represents also the RF address that the robot uses to communicate with the computer and is automatically read at startup (have a look a the firmware for more details).
Moreover the address 4093 is used to save the clock calibration value that is found during production/testing of the robots; this value hasn't to be modified otherwise some functionalities such as tv remote control could not work anymore. For more information on clock calibration refers to the applicaiton note AVR053: Calibration of the internal RC oscillator.
The Elisa-3 robot supports an autonomous calibration process and the result of this calibration is saved in EEPROM starting at address 3946 to 4092.
The size of usable EEPROM is thus 3946 bytes (0-3945) and the remaining memory must not be modified/erased.

In order to program the eeprom an AVR programmer is required, we utilize the Pocket AVR Programmer from Sparkfun (recognized as USBtiny device); then with the avrdude utility the following command has to be issued:

avrdude -p m2560 -c usbtiny -v -U eeprom:w:Elisa3-eeprom.hex:i -v -B 1

where Elisa3-eeprom.hex is the EEPROM memory saved as Intel Hex format (eeprom example); a possible tool to read and write Intel Hex format is Galep32 from Conitec Datensysteme.
Alternatively a program designed to writing to these EEPROM locations can be uploaded to the robot, in case an AVR programmer isn't available. The project source can be downloaded from Elisa3-eeprom-write.zip; it is simply needed to modify the address, rebuild and upload to the robot.

4.2 Base-station

Refer to section http://www.gctronic.com/doc/index.php/Elisa#Base-station of the Elisa robot wiki.

4.3 PC side

4.3.1 Elisa-3 library

This library simplify the implementation of applications on the pc side (where the RF module is connected) that will take control of the robots and receive data from them. Some basic examples will be provided in the following sections to show how to use this library.
The project is built with Code::Blocks (mingw) and requires libusb-1.0 since it is used to communicate with the radio base-station: http://libusb-winusb-wip.googlecode.com/files/libusb_2011.07.06.7z. The source code of the library can be downloaded from pc-side-elisa3-library.

Compilation on Windows:

  • within the libusb-1.0 package you'll find the header "libusb.h" (under /include/libusb-1.0/) and the library "libusb-1.0.a" (in this case under /MinGW32/static/ since we use MinGW) that should be copied or referenced in the compiler headers/libraries
  • add the linker flag "-lusb-1.0" in the project in order to build successfully (the Code::Blocks project has already set it)

Compilation on Linux / Mac OS X:

  • required libraries: libusb-1.0, libusb-1.0-dev, libncurses5, libncurses5-dev
  • build: under the "/linux" folder within the project directory there is a makefile, simply type make on a terminal to build the library

4.3.2 Multiplatform monitor

The demo is a command line monitor that shows all the sensors information (e.g. proximity, ground, acceleromter, battery, ...) and let the user move the robot and change its colors and behavior with the keyboard. The data are sent using the protocol described in the previous section.
The following figures show the monitor on the left and the available commands on the right.

The project is built with Code::Blocks (mingw) and requires the Elisa-3 library.
The source can be downloaded from pc-side single robot. Windows


  • install the driver contained in the nRFgo Studio tool if not already done; this let the base-station be recognized as a WinUSB device (bootloader), independently of whether the libusb library is installed or not
  • once the driver is installed, the pre-compiled "exe" (under \bin\Debug dir) should run without problems; the program will prompt you the address of the robot you want to control

the Code::Blocks project should already be setup to reference the Elisa-3 library headers and lib files, anyway you need to put this project within the same directory of the Elisa-3 library, e.g. you should have a tree similar to the following one:

  • Elisa-3 demo (parent dir)
    • pc-side-elisa3-library (Elisa-3 library project)
    • pc-side-elisa3-library-1-robot (current project) Linux / Mac OS X

The project was tested to work also in Ubuntu and Mac OS X (no driver required).

  • you need to put this project within the same directory of the Elisa-3 library
  • build command: go under "linux" dir and type "make"


  • sudo ./main

4.3.3 Communicate with 4 robots simultaneously

This example shows how to interact with 4 robots simlutaneously, basically it shows the sensors information (proximity and ground) coming from 4 robots and let control one robot at a time through the keyboard (you can change the robot you want to control). The project requires the Elisa-3 library; the source can be downloaded from pc-side 4 robots. For building refer to the section Multiplatform monitor.

4.3.4 Obstacle avoidance

This demo implements the obstacle avoidance behavior controlling the robot from the pc through the radio; this means that the robot reacts only to the commands received using the basic communication protocol and has no intelligence onboard. The demo uses the information gathered from the 3 front proximity sensors and set the motors speed accordingly; moreover the rgb leds are updated with a random color at fixed intervals.
The project requires the Elisa-3 library; the source can be downloaded from pc-side-obstacle-avoidance. For building refer to the section Multiplatform monitor.
The following video shows the result:

It is available also the same example but with 4 robots controlled simultaneously; the source can be downloaded from pc-side-obstacle-avoidance-4-robots
It is easy to extend the previous example in order to control many robots, here is the code that controls 8 robots simultaneously pc-side-obstacle-avoidance-8-robots.

4.3.5 Cliff avoidance

This demo implements the cliff avoidance behavior controlling the robot from the pc through the radio; as with the obstacle avoidance demo, the robot reacts only to the commands received from the radio. The demo uses the information gathered from the 4 ground sensors to stop the robot when a cliff is detected (threshold tuned to run in a white surface); moreover the rgb leds are updated with a random color at fixed intervals.
The project requires the Elisa-3 library; the source can be downloaded from pc-side-cliff-avoidance. For building refer to the section Multiplatform monitor.
The following video shows the result:

4.3.6 Set robots state from file

This project show how to send data to robots for which we will know the address only at runtime, in particular the content of the packets to be transmitted is parsed from a csv file and the interpreted commands are sent to the robots one time. The project requires the Elisa-3 library; the source can be downloaded from pc-side from file. For building refer to the section Multiplatform monitor.

5 Odometry

The odometry of Elisa-3 is quite good even if the speed is only measured by back-emf. On vertical surfaces the absolute angle is given by the accelerometer measuring g... quite a fix reference without drifting ;-)
A fine calibration of the right and left wheel speed parameters might give better results. However the current odometry is a good estimate of the absolute position from a starting point. The experiments are performed on a square labyrinth and the robot advances doing obstacle avoidance. The on-board calculated (x,y,theta) position is sent to a PC via radio and logged for further display.

Details about the code can be found in the advanced-demo project, in particular the motors.c source file. The PC application used for logging data is the monitor.

5.1 Autonomous calibration

Since the motors can be slightly different a calibration can improve the behavior of the robot in terms of maneuverability and odometry accuracy. An autonomous calibration process is implemented onboard: basically a calibration is performed for both the right and left wheels in two modes that are forward and backward with speed control enabled. In order to let the robot calibrate istelf a white sheet in which a black line is drawed is needed; the robot will measure the time between detection of the line at various speeds. The calibration sheet can be downloaded from the following link calibration-sheet.pdf.
In order to accomplish the calibration the robot need to be programmed with the advanced firmare and a specific command has to be sent to the robot through the radio module or the TV remote; if you are using the radio module you can use the monitor application in which the letter l (el) is reserved to launch the calibration, otherwise if you have a TV remote control you can press the button 5. The sequence is the following:
1. put the selector in position 8
2. place the robot near the black line as shown below; the left motor is the first to be calibrated. Pay attention to place the right wheel as precise as possible with the black line

3. once the robot is placed you can type the l (el) command (or press the button 5); wait a couple of minutes during which the robot will do various turns at various speed in the forward direction and then in the backward direction
4. when the robot terminated (robot is stopped after going backward at high speed) you need to place it in the opposite direction in order to calibrate the right motor, as shown below.

5. once the robot is placed you can type again the l (el) command (or press the button 5)
6. when the robot finish, the calibration process is also terminated.

The previous figures show a robot without the top diffuser, anyway you don't need to remove it!

6 Tracking

6.1 SwisTrack

Some experiments are done with the SwisTrack software in order to be able to track the Elisa-3 robots through the back IR emitter, here is a resulting image with 2 robots:

The pre-compiled SwisTrack software (Windows) can be downloaded from the following link SwisTrack-compiled.

The following video shows the tracking of 5 robots:

The SwisTrack software lets you easily log also the resulting data that you can then elaborate, here is an example taken from the experiment using 5 robots:

The following video shows the test done with 20, 30 and 38 Elisa-3 robots, the tracking is still good; it's important to notice that we stopped to 38 Elisa-3 robots because are the ones we have in our lab.

6.2 Position control

We developed a simple position control example that interacts with Swistrack through a TCP connection and control 4 robots simultaneously; the orientation of the robots is estimated only with the Swistrack information (delta position), future improvements will integrate odometry information. The following video shows the control of 4 robots that are driven in a 8-shape.

All the following projects require the Elisa-3 library, for building refer to the section Multiplatform monitor.

One of the characteristics of the Elisa-3 robot is that it can move in vertical thanks to its magnetic wheels, thus we developed also a vertical position control that use accelerometer data coming from the robot to get the orientation of the robot (more precise) instead of estimating it with the Swistrack information, you can download the source code from the following link:

We developed also an example of position control that control a single robot (code adapted from previous example) that can be useful during the initial environment installation/testing; you can download the source code from the following link:

Another good example to start playing with the tracking is an application that lets you specify interactively the target point that the robot should reach; you can download the source code of this application from the following link:

6.3 Utilities

In order to adjust the IR camera position it is useful to have an application that turn on the back IR of the robots. The following application back-IR-on-4-robots-rev182-30.06.14.zip is an example that turn on the back IR of 4 robots, their addresses are asked to the user at the execution.

7 Local communication

The advanced firmware is needed in order to use the local communication. You can find some examples on how to use this module in the main, refers to demos in selector position from 11 to 14.
Here are some details about the current implementation of the communication module:

  • use the infrared sensors to exchange data, thus during reception/transmission the proximity sensors cannot be used to avoid obstacles; in the worst case (continuous receive and transmit) the sensor update frequency is about 3 Hz
  • bidirectional communication
  • the throughput is about 1 bytes/sec
  • maximum communication distance is about 5 cm
  • no reception/transmission queue (only one byte at a time)


This chapter explains how to use ROS with the elisa-3 robots; basically all the sensors are exposed to ROS and you can also send commands back to the robot through ROS. The ROS node is implemented in cpp. Here is a general schema:
Click to enlarge

First of all you need to install and configure ROS, refer to http://wiki.ros.org/Distributions for more informations. Alternatively you can download directly a virtual machine pre-installed with everything you need, refer to section virtual machine; this is the preferred way.

  • This tutorial is based on ROS Hydro.
  • If you downloaded the pre-installed VM you can go directly to section Running the ROS node.

The ROS elisa-3 node based on roscpp can be found in the following repository https://github.com/gctronic/elisa3_node_cpp.

8.1 Initial configuration

The following steps need to be done only once after installing ROS:

1. If not already done, create a catkin workspace, refer to http://wiki.ros.org/catkin/Tutorials/create_a_workspace. Basically you need to issue the following commands:
  mkdir -p ~/catkin_ws/src
  cd ~/catkin_ws/src
  cd ~/catkin_ws/
  source devel/setup.bash 
2. You will need to add the line source ~/catkin_ws/devel/setup.bash to your .bashrc in order to automatically have access to the ROS commands when the system is started
3. Clone the elisa-3 ROS node repo from https://github.com/gctronic/elisa3_node_cpp; you'll have a directory named elisa3_node_cpp that is the repo local copy
4. Copy the repo directory elisa3_node_cpp (this is the actual ros package) inside the catkin workspace source folder (~/catkin_ws/src)
5. Install the ROS dependencies:
  • sudo apt-get install ros-hydro-slam-gmapping
  • sudo apt-get install ros-hydro-imu-tools
6. Open a terminal and go to the catkin workspace directory (~/catkin_ws) and issue the command catkin_make, there shouldn't be errors
7. The USB radio module by default requires root priviliges to be accessed; to let the current user have access to the radio we use udev rules:
  • plug in the radio and issue the command lsusb, you'll get the list of USB devices attached to the computer, included the radio:
Bus 002 Device 003: ID 1915:0101 Nordic Semiconductor ASA
  • issue the command udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/003), beware to change the bus according to the result of the previous command. You'll receive a long output showing all the informations regarding the USB device, the one we're interested is the product attribute:
ATTR{product}=="nRF24LU1P-F32 BOOT LDR"
  • in the udev rules file you can find in /etc/udev/rules.d/name.rules add the following string changing the GROUP field with the current user group:
SUBSYSTEMS=="usb", ATTRS{product}=="nRF24LU1P-F32 BOOT LDR", GROUP="viki"
To know which groups your user belongs to issue the command id
  • disconnect and reconnect the radio module
8. Program the elisa-3 robot with the last advanced firmware (>= rev.221) and put the selector in position 15

8.2 Running the ROS node

First of all get the last version of the elisa-3 ROS node from github:

  • clone the repo https://github.com/gctronic/elisa3_node_cpp and copy the elisa3_node_cpp directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)
  • build the driver by opening a terminal and issueing the command catkin_make from within the catkin workspace directory (e.g. ~/catkin_ws).

Now you can start the ROS node, for this purposes there is a launch script (based on roslaunch), as explained in the following section. Before starting the ROS node you need to start roscore, open another terminal tab and issue the command roscore.

8.2.1 Single robot

Open a terminal and issue the following command: roslaunch elisa3_node_cpp elisa3_single.launch elisa3_address:='1234' where 1234 is the robot id (number on the bottom).

If all is going well rviz will be opened showing the informations gathered from the topics published by the elisa ROS node as shown in the following figure:
Click to enlarge

The launch script is configured also to run the gmapping (SLAM) node that let the robot construct a map of the environment; the map is visualized in real-time directly in the rviz window. Here is a video:

8.3 Virtual machine

To avoid the tedious work of installing and configuring all the system we provide a virtual machine which includes all the system requirements you need to start playing with ROS and elisa. You can download the image as open virtualization format from the following link ROS-Hydro-12.04.ova (based on the VM from http://nootrix.com/2014/04/virtualized-ros-hydro/); you can then use VirtualBox to import the file and automatically create the virtual machine. Some details about the system:

  • user: gctronic, pw: gctronic
  • Ubuntu 12.04.4 LTS (32 bits)
  • ROS Hydro installed
  • Webots 8.0.5 is installed (last version available for 32 bits linux)
  • git-cola (git interface) is installed
  • the catkin workspace is placed in the desktop

9 Videos

9.1 Autonomous charge

The following videos show 3 Elisa-3 robots moving around in the environment avoiding obstacles thanks to their proximity sensors and then going to the charging station autonomously; some black tape is placed in the charging positions to help the robots place themselves thanks to their ground sensors. The movement and charging is indipendent of the gravity. It works also vertically and up-side-down.

9.2 Remote control

The following video shows 38 Elisa-3 robots moving around with onboard obstacle avoidance enabled; 15 of them are running autonmously, the remaining 23 are controlled from one computer with the radio module.