<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://www.gctronic.com/doc/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WikiSysop</id>
	<title>GCtronic wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://www.gctronic.com/doc/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=WikiSysop"/>
	<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=Special:Contributions/WikiSysop"/>
	<updated>2026-07-12T18:33:51Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3212</id>
		<title>Elisa-3</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3212"/>
		<updated>2026-06-22T13:23:23Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: /* Internal EEPROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:elisa3]]&lt;br /&gt;
[[Category:all]]&lt;br /&gt;
=Overview=&lt;br /&gt;
[[File:Elisa3_and_charger.JPG|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Elisa-3 is an evolution of the [https://www.gctronic.com/doc/index.php/Elisa Elisa] robot based on a different microcontroller and including a comprehensive set of sensors:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/atmega640-1280-1281-2560-2561_datasheet.pdf Atmel 2560] microcontroller (Arduino compatible)&lt;br /&gt;
* central RGB led&lt;br /&gt;
* 8 green leds around the robot&lt;br /&gt;
* IRs emitters&lt;br /&gt;
* 8 IR proximity sensors ([https://projects.gctronic.com/elisa3/tcrt1000.pdf Vishay Semiconductors Reflective Optical Sensor])&lt;br /&gt;
* 4 ground sensors ([https://projects.gctronic.com/elisa3/QRE1113-D.PDF Fairchild Semiconductor Minature Reflective Object Sensor])&lt;br /&gt;
* 3-axis accelerometer ([https://projects.gctronic.com/elisa3/MMA7455L.pdf Freescale MMA7455L])&lt;br /&gt;
* RF radio for communication ([https://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P Nordic Semiconductor nRF24L01+])&lt;br /&gt;
* micro USB connector for programming, debugging and charging&lt;br /&gt;
* IR receiver&lt;br /&gt;
* 2 DC motors&lt;br /&gt;
* top light diffuser&lt;br /&gt;
* selector&lt;br /&gt;
The robot is able to self charge using the charger station, as shown in the previous figure. The following figure illustrates the position of the various sensors: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-mainComp-digital-white.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful information==&lt;br /&gt;
* the top light diffuser and robot are designed to lock together, but the diffuser isn&#039;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.&lt;br /&gt;
[[File:Diffuser-pull-up.jpg|200px]] [[File:Diffuser-push-down.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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:&lt;br /&gt;
[[File:selector-tweezers.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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.&lt;br /&gt;
[[File:Antenna-position.jpg|200px]] [[File:Antenna-diffuser.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Robot charging==&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-charger-out.jpg|300px]] [[File:Elisa3-charger-in.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The microcontroller is informed when the robot is in charge and this information is also transferred to the PC in the &#039;&#039;flags&#039;&#039; 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Communication Communication].&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following video shows the Elisa-3 piloted through the radio to the charging station using the monitor application: {{#ev:youtube|kjliXlQcgzw}}&lt;br /&gt;
&lt;br /&gt;
==Top light diffuser==&lt;br /&gt;
From February 2013 onwards 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-new-case.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
The following figures show the main components offered by the Elisa-3 robot and where they are physically placed: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-hw-schema-top.jpg|550px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-hw-schema-bottom3.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Power autonomy==&lt;br /&gt;
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).&lt;br /&gt;
[[File:Power-autonomy.jpg|800px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Detailed specifications==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Feature&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Technical information&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
|Size, weight&lt;br /&gt;
|50 mm diameter, 30 mm height, 39 g&lt;br /&gt;
|-&lt;br /&gt;
|Battery, autonomy&lt;br /&gt;
|LiIPo rechargeable battery (2 x 130 mAh, 3.7 V). About 3 hours autonomy. Recharging time about 1h e 30.&lt;br /&gt;
|-&lt;br /&gt;
|Processor&lt;br /&gt;
|Atmel ATmega2560 @ 8MHz (~ 8 MIPS); 8 bit microcontroller&lt;br /&gt;
|-&lt;br /&gt;
|Memory&lt;br /&gt;
|RAM: 8 KB; Flash: 256 KB; EEPROM: 4 KB&lt;br /&gt;
|-&lt;br /&gt;
|Motors&lt;br /&gt;
|2 DC motors with a 25:1 reduction gear; speed controlled with backEMF&lt;br /&gt;
|-&lt;br /&gt;
|Magnetic wheels&lt;br /&gt;
|Adesion force of about 1 N (100 g) depending on surface material and painting&amp;lt;br/&amp;gt; Wheels diamater = 9 mm &amp;lt;br/&amp;gt;Distance between wheels = 40.8 mm&lt;br /&gt;
|-&lt;br /&gt;
|Speed&lt;br /&gt;
|Max: 60 cm/s&lt;br /&gt;
|-&lt;br /&gt;
|Mechanical structure&lt;br /&gt;
|PCB, motors holder, top white plastic to diffuse light&lt;br /&gt;
|-&lt;br /&gt;
|IR sensors&lt;br /&gt;
|8 infra-red sensors measuring ambient light and proximity of objects up to 6 cm; each sensor is 45° away from each other &amp;lt;br/&amp;gt; 4 ground sensors detecting the end of the viable surface (placed on the front-side of the robot)&lt;br /&gt;
|-&lt;br /&gt;
| IR emitters&lt;br /&gt;
| 3 IR emitters (2 on front-side, 1 on back-side of the robot) &lt;br /&gt;
|-&lt;br /&gt;
|Accelerometer&lt;br /&gt;
|3D accelerometer along the X, Y and Z axis&lt;br /&gt;
|-&lt;br /&gt;
|LEDs&lt;br /&gt;
|1 RGB LED in the center of the robot; 8 green LEDs around the robot&lt;br /&gt;
|-&lt;br /&gt;
|Switch / selector&lt;br /&gt;
|16 position rotating switch&lt;br /&gt;
|-&lt;br /&gt;
|Communication&lt;br /&gt;
| Standard Serial Port (up to 38kbps)&amp;lt;br/&amp;gt; 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&lt;br /&gt;
|-&lt;br /&gt;
|Remote Control&lt;br /&gt;
|Infra-red receiver for standard remote control commands&lt;br /&gt;
|-&lt;br /&gt;
|Expansion bus&lt;br /&gt;
|Optional connectors: 2 x UART, I2C, 2 x PWM, battery, ground, analog and digital voltage&lt;br /&gt;
|-&lt;br /&gt;
|Programming&lt;br /&gt;
|C/C++ programming with the AVR-GCC compiler ([https://winavr.sourceforge.net/ WinAVR] for Windows). Free compiler and IDE (AVR Studio / Arduino)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Communication=&lt;br /&gt;
==Wireless==&lt;br /&gt;
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 ([https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P nRF24L01+]) mounted on the robot communicates through SPI with the microcontroller and transfers data to and from the PC wirelessly.&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa-communication.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - PC to radio to robot===&lt;br /&gt;
The 13 bytes payload packet format is shown below (the number in the parenthesis expresses the bytes):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Command (1) &lt;br /&gt;
| Red led (1) &lt;br /&gt;
| Blue led (1) &lt;br /&gt;
| Green led (1) &lt;br /&gt;
| IR + Flags (1) &lt;br /&gt;
| Right motor (1) &lt;br /&gt;
| Left motor (1) &lt;br /&gt;
| Small green leds (1) &lt;br /&gt;
| Flags2 (1)&lt;br /&gt;
| Reserved (1)&lt;br /&gt;
| Remaining 4 bytes are unused &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Command: 0x27 = change robot state; 0x28 = goto base-station bootloader (this byte is not sent to the robot)&lt;br /&gt;
* Red, Blue, Green leds: values from 0 (OFF) to 100 (ON max power)&lt;br /&gt;
* IR + flags:&lt;br /&gt;
** first two bits are dedicated to the IRs:&lt;br /&gt;
*** 0x00 =&amp;gt; all IRs off&lt;br /&gt;
*** 0x01 =&amp;gt; back IR on&lt;br /&gt;
*** 0x02 =&amp;gt; front IRs on&lt;br /&gt;
*** 0x03 =&amp;gt; all IRs on&lt;br /&gt;
** third bit is reserved for enabling/disabling IR remote control (0=&amp;gt;disabled, 1=&amp;gt;enabled)&lt;br /&gt;
** fourth bit is used for sleep (1 =&amp;gt; go to sleep for 1 minute)&lt;br /&gt;
** fifth bit is used to calibrate all sensors (proximity, ground, accelerometer) and reset odometry&lt;br /&gt;
** sixth bit is reserved (used by radio station)&lt;br /&gt;
** seventh bit is used for enabling/disabling onboard obstacle avoidance&lt;br /&gt;
** eight bit is used for enabling/disabling onboard cliff avoidance&lt;br /&gt;
* 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&lt;br /&gt;
* 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&lt;br /&gt;
* Flags2:&lt;br /&gt;
** bit0 is used for odometry calibration&lt;br /&gt;
** remaining bits unused&lt;br /&gt;
* Remaining bytes free to be used&lt;br /&gt;
&lt;br /&gt;
====Optimized protocol====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
- ack returned must be up to 16 bytes (max 64 bytes for the usb buffer); the same number of bytes returned by the robot as ack payload has to be read then by the pc!!&lt;br /&gt;
- la base-station ritorna &amp;quot;2&amp;quot; quando l&#039;ack non è stato ricevuto;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - robot to radio to PC===&lt;br /&gt;
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 &amp;quot;ack payload&amp;quot; feature of the radio module. Each &amp;quot;ack payload&amp;quot; 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):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|ID=3 (1)&lt;br /&gt;
|Prox0 (2)&lt;br /&gt;
|Prox1 (2)&lt;br /&gt;
|Prox2 (2)&lt;br /&gt;
|Prox3 (2)&lt;br /&gt;
|Prox5 (2)&lt;br /&gt;
|Prox6 (2)&lt;br /&gt;
|Prox7 (2)&lt;br /&gt;
|Flags (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=4 (1)&lt;br /&gt;
|Prox4 (2)&lt;br /&gt;
|Ground0 (2)&lt;br /&gt;
|Ground1 (2)&lt;br /&gt;
|Ground2 (2)&lt;br /&gt;
|Ground3 (2)&lt;br /&gt;
|AccX (2)&lt;br /&gt;
|AccY (2)&lt;br /&gt;
|TV remote (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=5 (1)&lt;br /&gt;
|ProxAmbient0 (2)&lt;br /&gt;
|ProxAmbient1 (2)&lt;br /&gt;
|ProxAmbient2 (2)&lt;br /&gt;
|ProxAmbient3 (2)&lt;br /&gt;
|ProxAmbient5 (2)&lt;br /&gt;
|ProxAmbient6 (2)&lt;br /&gt;
|ProxAmbient7 (2)&lt;br /&gt;
|Selector (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=6 (1)&lt;br /&gt;
|ProxAmbient4 (2)&lt;br /&gt;
|GroundAmbient0 (2)&lt;br /&gt;
|GroundAmbient1 (2)&lt;br /&gt;
|GroundAmbient2 (2)&lt;br /&gt;
|GroundAmbient3 (2)&lt;br /&gt;
|AccZ (2)&lt;br /&gt;
|Battery (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=7 (1)&lt;br /&gt;
|LeftSteps (4)&lt;br /&gt;
|RightSteps (4)&lt;br /&gt;
|theta (2)&lt;br /&gt;
|xpos (2)&lt;br /&gt;
|ypos (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Pay attention that the base-station could return &amp;quot;error&amp;quot; codes in the first byte if the communication has problems:&lt;br /&gt;
* 0 =&amp;gt; transmission succeed (no ack received though)&lt;br /&gt;
* 1 =&amp;gt; ack received (should not be returned because if the ack is received, then the payload is read)&lt;br /&gt;
* 2 =&amp;gt; transfer failed&lt;br /&gt;
&lt;br /&gt;
Packet ID 3:&lt;br /&gt;
* Prox* contain values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* The &#039;&#039;Flags&#039;&#039; byte contains these information:&lt;br /&gt;
** bit0: 0 = robot not in charge; 1 = robot in charge&lt;br /&gt;
** bit1: 0 = button pressed; 1 = button not pressed&lt;br /&gt;
** bit2: 0 = robot not charged completely; 1 = robot charged completely&lt;br /&gt;
** the remainig bits are not used at the moment&lt;br /&gt;
&lt;br /&gt;
Packet ID 4:&lt;br /&gt;
* Prox4 contains values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* Ground* contain values from 512 to 1023, the smaller the value the darker the surface&lt;br /&gt;
* AccX and AccY contain raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* TV remote contains the last interpreted command received through IR&lt;br /&gt;
&lt;br /&gt;
Packet ID 5:&lt;br /&gt;
* ProxAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* Selector contains the value of the current selector position&lt;br /&gt;
&lt;br /&gt;
Packet ID 6:&lt;br /&gt;
* ProxAmbient4 contains values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* GroundAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* AccZ contains raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* Battery contains the sampled value of the battery, the values range is between 780 (battery discharged) and 930 (battery charged)&lt;br /&gt;
&lt;br /&gt;
Packet ID 7:&lt;br /&gt;
* LeftSteps and RightSteps contain the sum of the sampled speed for left and right motors respectively (only available when the speed controller isn&#039;t used; refer to xpos, ypos and theta when the speed controller is used)&lt;br /&gt;
* 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&lt;br /&gt;
* xpos and ypos contain the position of the robot expressed in millimeters; available only when the speed controller is enabled&lt;br /&gt;
&lt;br /&gt;
==USB cable==&lt;br /&gt;
You can directly connect the robot to the computer to make a basic functional test. You can find the source code in the following link [https://projects.gctronic.com/elisa3/Elisa3-global-test.zip Elisa3-global-test.zip] (Windows).&amp;lt;br/&amp;gt;&lt;br /&gt;
To start the test follow these steps:&lt;br /&gt;
# put the selector in position 6&lt;br /&gt;
# connect the robot to the computer with the USB cable and turn it on&lt;br /&gt;
# run the program, insert the correct COM port and choose option 1&lt;br /&gt;
With the same program you can also change the ID of the robot by choosing option 2 in the last step (not recommended).&lt;br /&gt;
&lt;br /&gt;
Via USB cable you can also program the robot with [https://www.gctronic.com/doc/index.php?title=Elisa-3#Aseba Aseba].&lt;br /&gt;
&lt;br /&gt;
=Software=&lt;br /&gt;
&lt;br /&gt;
==Robot==&lt;br /&gt;
===Requirements===&lt;br /&gt;
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&#039;re done otherwise you need to download the drivers for your system and architecture:&lt;br /&gt;
* [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe Windows Vista/XP], [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.10%20WHQL%20Certified.exe Windows 7/8/10 (run as administrator)]&lt;br /&gt;
* Ubuntu: when the robot is connected the port will be created in &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt; (no need to install a driver)&lt;br /&gt;
* [https://www.ftdichip.com/drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (32 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (64 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_3.dmg Mac OS X 10.9 and above]; after installing the driver the port will be created in &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;; you can find a guide on how to install the driver in the following link [https://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf]&lt;br /&gt;
All the drivers can be found in the official page from the following link [https://www.ftdichip.com/Drivers/VCP.htm FTDI drivers].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;Starting from robot ID 3823 the USB to serial chip can be one of the following: FTDI, [https://projects.gctronic.com/elisa3/CypressDriverInstaller_1.exe Cypress CY7C65213] or Silicon Labs CP2102 ([https://projects.gctronic.com/elisa3/CP210x_Universal_Windows_Driver.zip Windows 10 or later], [https://projects.gctronic.com/elisa3/CP210x_Windows_Drivers.zip Windows 7]); this is due to chips availability.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AVR Studio 4 project===&lt;br /&gt;
The projects are built with [https://projects.gctronic.com/elisa3/AvrStudio4Setup.exe AVR Studio 4] released by Atmel. &amp;lt;br/&amp;gt;&lt;br /&gt;
The projects should be compatible also with newer versions of Atmel Studio (last version known as Microchip Studio), the last version is available from [https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Basic demo====&lt;br /&gt;
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.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_basic https://github.com/gctronic/elisa3_firmware_basic]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-basic_ffb3947_21.03.18.hex Elisa-3 basic firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
&lt;br /&gt;
====Advanced demo====&lt;br /&gt;
This is an extension of the &#039;&#039;basic demo project&#039;&#039;, basically it contains some additional advanced demos.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_advanced.git https://github.com/gctronic/elisa3_firmware_advanced.git]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-advanced_96c355a_13.03.18.hex Elisa-3 advanced firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
* 6: robot testing and address writing through serial connection (used in production)&lt;br /&gt;
* 7: automatic charging demo (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Videos Videos]), that is composed of 4 states: &lt;br /&gt;
** random walk with obstacle avoidance&lt;br /&gt;
** search black line&lt;br /&gt;
** follow black line that lead to the charging station&lt;br /&gt;
** charge for a while&lt;br /&gt;
* 8: autonomous odometry calibration (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Autonomous_calibration Autonomous calibration])&lt;br /&gt;
* 9: write default odometry calibration values in EEPROM (hard-coded values); wait 2 seconds before start writing the calibration values&lt;br /&gt;
* 10: robot moving forward (with pause) and obstacle avoidance enabled; random RGB colors and green led effect &lt;br /&gt;
* 11: local communication: robot alignment&lt;br /&gt;
* 12: local communication: 2 or more robots exchange data sequentially&lt;br /&gt;
* 13: local communication: listen and transmit continuously; when data received change RGB color&lt;br /&gt;
* 14: local communication: RGB color propagation&lt;br /&gt;
* 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)&lt;br /&gt;
&lt;br /&gt;
====Atmel Studio 7 / Microchip Studio====&lt;br /&gt;
If you are working with Atmel Studio 7 / Microchip Studio, you can simply use the provided AVR Studio 4 projects by importing them directly in Atmel Studio 7 / Microchip Studio: &amp;lt;code&amp;gt;File =&amp;gt; Import =&amp;gt; AVR Studio 4 Project&amp;lt;/code&amp;gt;, then select &amp;lt;code&amp;gt;Elisa3-avr-studio.aps&amp;lt;/code&amp;gt; and click on &amp;lt;code&amp;gt;Convert&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are asked to update some components (see following figure), then agree:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:atmel-studio-convert.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;lt;code&amp;gt;Build =&amp;gt; Clean solution&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Build =&amp;gt; Build solution&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you experience problems during the building, make sure you have the correct toolchain installed: you can download WinAVR toolchain from [https://projects.gctronic.com/elisa3/WinAVR-20100110-install.exe WinAVR-20100110-install.exe].&amp;lt;br/&amp;gt;&lt;br /&gt;
Close and open again Atmel/Microchip Studio and verify that the new toolchain is recognized and that the path is correct: &amp;lt;code&amp;gt;Tools =&amp;gt; Options&amp;lt;/code&amp;gt; and on the left panel select &amp;lt;code&amp;gt;Toolchain =&amp;gt; Package Configuration&amp;lt;/code&amp;gt;. Select on top &amp;lt;code&amp;gt;Atmel AVR 8-bit (C language)&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;WinAVR&amp;lt;/code&amp;gt; flavour and verify the path corresponds to the WinAVR installation path. The following figure shows the toolchain configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio1.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally verify the project is using the WinAVR toolchain: &amp;lt;code&amp;gt;right click on the project name =&amp;gt; Properties&amp;lt;/code&amp;gt;, on the left panel select &amp;lt;code&amp;gt;Advanced&amp;lt;/code&amp;gt; and verify that &amp;lt;code&amp;gt;Toolchain Flavour&amp;lt;/code&amp;gt; is set to WinAVR. Press &amp;lt;code&amp;gt;CTRL+S&amp;lt;/code&amp;gt; to save your project configuration changes. The following figures show the project configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio2.png|200px]] [[File:elisa3-atmelstudio3.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Arduino IDE project===&lt;br /&gt;
The project is built with the Arduino IDE 1.x freely available from the [https://arduino.cc/ official Arduino website]. In order to build the Elisa-3 firmware with the Arduino IDE 1.x the following steps has to be performed:&amp;lt;br/&amp;gt;&lt;br /&gt;
*1. download the [https://arduino.cc/hu/Main/Software Arduino IDE 1.x] (the last known working version is 1.8.9, refer to [https://www.arduino.cc/en/Main/OldSoftwareReleases#previous Arduino Software]) and extract it, let say in a folder named &amp;lt;code&amp;gt;arduino-1.x&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
*2. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_library_03.02.25_65964ed.zip Elisa-3 Arduino library] and extract it within the libraries folder of the Arduino IDE, in this case &amp;lt;code&amp;gt;arduino-1.x\libraries&amp;lt;/code&amp;gt; (see [https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer Find-sketches-libraries-board-cores-and-other-files-on-your-computer] for more information on Arduino useful paths); you should end up with a &amp;lt;code&amp;gt;Elisa3&amp;lt;/code&amp;gt; folder within the libraries. If you start the Arduino IDE now you can see that the &amp;lt;code&amp;gt;Elisa-3&amp;lt;/code&amp;gt; library is available in the menu &amp;lt;code&amp;gt;Sketch=&amp;gt;Import Library...&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Lirary&amp;lt;/code&amp;gt; in later IDE versions).&amp;lt;br/&amp;gt; In later versions of Arduino IDE you can also install the library via menu: &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Library=&amp;gt;Add .ZIP library&amp;lt;/code&amp;gt;, for more info have a look at [https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#importing-a-zip-library importing-a-zip-library].&lt;br /&gt;
*3. the file &amp;lt;code&amp;gt;boards.txt&amp;lt;/code&amp;gt; in the Arduino IDE folder &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino\avr&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Users\{username}\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6&amp;lt;/code&amp;gt; in later IDE versions) need to be changed to contain the definitions for the Elisa-3 robot, add the following definitions at the end of the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##############################################################&lt;br /&gt;
&lt;br /&gt;
elisa3.name=Elisa 3 robot&lt;br /&gt;
&lt;br /&gt;
elisa3.upload.tool=avrdude&lt;br /&gt;
elisa3.upload.tool.serial=avrdude&lt;br /&gt;
elisa3.upload.protocol=stk500v2&lt;br /&gt;
elisa3.upload.maximum_size=258048&lt;br /&gt;
elisa3.upload.speed=57600&lt;br /&gt;
	&lt;br /&gt;
elisa3.bootloader.low_fuses=0xE2&lt;br /&gt;
elisa3.bootloader.high_fuses=0xD0&lt;br /&gt;
elisa3.bootloader.extended_fuses=0xFF&lt;br /&gt;
elisa3.bootloader.path=stk500v2-elisa3&lt;br /&gt;
elisa3.bootloader.file=stk500v2-elisa3.hex&lt;br /&gt;
elisa3.bootloader.unlock_bits=0x3F&lt;br /&gt;
elisa3.bootloader.lock_bits=0x0F					&lt;br /&gt;
&lt;br /&gt;
elisa3.build.mcu=atmega2560&lt;br /&gt;
elisa3.build.f_cpu=8000000L&lt;br /&gt;
elisa3.build.board=AVR_ELISA3&lt;br /&gt;
elisa3.build.core=arduino&lt;br /&gt;
elisa3.build.variant=mega&lt;br /&gt;
&lt;br /&gt;
##############################################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*4. this step need to be performed only with later IDE versions, when you receive a warning like this &amp;lt;code&amp;gt;Bootloader file specified but missing...&amp;lt;/code&amp;gt; during compilation.&amp;lt;br/&amp;gt; In this case place the bootloader hex file (&amp;lt;code&amp;gt;stk500v2.hex&amp;lt;/code&amp;gt;) you can find in the [https://www.gctronic.com/doc/index.php/Elisa-3#Bootloader Bootloader section] in the directory &amp;lt;code&amp;gt;arduino-1.x\Arduino\hardware\arduino\avr\bootloaders\&amp;lt;/code&amp;gt; and name it &amp;lt;code&amp;gt;stk500v2-elisa3.hex&amp;lt;/code&amp;gt;&lt;br /&gt;
*5. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_project_02.03.21_d2c017e.zip Elisa-3 project file] and open it with the Arduino IDE (you should open the file &amp;quot;&#039;&#039;elisa3.ino&#039;&#039;&amp;quot;)&lt;br /&gt;
*6. select &amp;lt;code&amp;gt;Elisa-3 robot&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;Tools=&amp;gt;Board&amp;lt;/code&amp;gt; menu; click on the &amp;lt;code&amp;gt;Verify&amp;lt;/code&amp;gt; button to build the project&lt;br /&gt;
*7. turn on the robot, attach the micro USB and wait the blinks terminate.&amp;lt;br/&amp;gt; &lt;br /&gt;
&amp;lt;!-- : Only for Windows users: open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot); the robot should blink again, if this is not the case try again the command.--&amp;gt;&lt;br /&gt;
*8. to upload the resulting hex file, from the Arduino IDE set the port from the &amp;lt;code&amp;gt;Tools=&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu consequently; click on the &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt; button&lt;br /&gt;
: Only for Windows users: before clicking on &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt;, open the serial monitor from the Arduino IDE (&amp;lt;code&amp;gt;Tools =&amp;gt; Serial Monitor&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ctrl+Shift+M&amp;lt;/code&amp;gt;), the robot should then blink again; keep the serial monitor opened.&lt;br /&gt;
&amp;lt;!-- : &#039;&#039;Windows users&#039;&#039;: if you have problems in uploading the firmware, try opening a command prompt and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com62: dtr=on&amp;lt;/code&amp;gt; (beware to change serial port number according to your system) before uploading from the Arduino IDE.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/arduino-1.0.5-linux32.zip arduino-1.0.5-linux32.zip]. &amp;lt;br/&amp;gt;&lt;br /&gt;
If the &amp;lt;code&amp;gt;Tools-&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu is grayed out then you need to start the Arduino IDE in a terminal typing &amp;lt;code&amp;gt;sudo path/to/arduino&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to have access to the compiler options you can download the following project [https://projects.gctronic.com/elisa3/Elisa3-arduino-makefile.zip Elisa3-arduino-makefile.zip] that contains an Arduino IDE project with a Makefile, follow the instructions in the &amp;quot;readme.txt&amp;quot; file in order to build and upload to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Aseba===&lt;br /&gt;
Refer to the page [{{fullurl:Elisa-3 Aseba}} Elisa-3 Aseba].&lt;br /&gt;
&lt;br /&gt;
===Matlab===&lt;br /&gt;
[[File:elisa3-matlab.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.e-puck.org/index.php?option=com_content&amp;amp;view=article&amp;amp;id=29&amp;amp;Itemid=27 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:&lt;br /&gt;
# program the robot with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced demo]&lt;br /&gt;
# place the selector in position 15 (to pilot the robot through the interface with no obstacle and no cliff avoidance)&lt;br /&gt;
# connect the radio base-station to the computer&lt;br /&gt;
# download the ePic2 for Elisa-3 from the repository [https://github.com/gctronic/elisa3_epic.git https://github.com/gctronic/elisa3_epic.git]: either from github site clicking on &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt;=&amp;gt;&amp;lt;code&amp;gt;Download ZIP&amp;lt;/code&amp;gt; or by issueing the command &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_epic.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# open (double click) the file &#039;&#039;main.m&#039;&#039;; once Matlab is ready type &#039;&#039;main+ENTER&#039;&#039; and the GUI should start&lt;br /&gt;
# click on the &#039;&#039;+&#039;&#039; sign (top left) and insert the robot address (e.g 3307), then click on &#039;&#039;Connect&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Webots simulator===&lt;br /&gt;
[[File:Elisa-3-webots.png|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The following features have been included in the Elisa-3 model for the [https://www.cyberbotics.com/ Webots simulator]:&lt;br /&gt;
* proximity sensors&lt;br /&gt;
* ground sensors&lt;br /&gt;
* accelerometer&lt;br /&gt;
* motors&lt;br /&gt;
* green leds around the robot&lt;br /&gt;
* RGB led&lt;br /&gt;
* radio communication&lt;br /&gt;
&lt;br /&gt;
You can donwload the Webots project containig the Elisa-3 model (proto) and a demonstration world in the following link [https://projects.gctronic.com/elisa3/Elisa-3-webots.zip Elisa-3-webots.zip].&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/Elisa-3-webots-radio.zip Elisa-3-webots-radio.zip]. Here is a video of this demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|IEgCo3XSESU}}&lt;br /&gt;
&lt;br /&gt;
===Onboard behaviors===&lt;br /&gt;
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).&lt;br /&gt;
The following videos show three robots that have their obstacle avoidance enabled:{{#ev:youtube|EbroxwWG-x4}} {{#ev:youtube|q6IRWRlTQeQ}}&lt;br /&gt;
&lt;br /&gt;
===Programming===&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-programming.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are working with the Arduino IDE you don&#039;t need to follow this procedure, refer instead to section [https://www.gctronic.com/doc/index.php/Elisa-3#Arduino_IDE_project Arduino IDE project].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows 7====&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR-Burn-O-Mat-Windows7.zip Windows 7 package] and extract it. The package contains also the FTDI driver. Beware that starting from robot id 4000 the USB driver might be different, refer to section [https://www.gctronic.com/doc/index.php?title=Elisa-3#Requirements Requirements], so you need to install it manually in case it isn&#039;t an FTDI chip.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.bat&amp;lt;/code&amp;gt; and follow the installation; beware that this need to be done only once. The script will ask you to modify the registry, this is fine (used to save application preferences).&lt;br /&gt;
# Connect the robot to the computer; the COM port will be created.&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer (e.g. COM10); then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, connect the USB cable to the computer and wait the blinks terminate. Then open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot). The robot should blink again, if this is not the case then try again the command.&lt;br /&gt;
# From the &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt; interface, click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&amp;lt;br/&amp;gt; If you get an &amp;lt;code&amp;gt;Access is denied&amp;lt;/code&amp;gt; error, then run &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt; as administrator.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
The following procedure is tested in Max OS X 10.10, but should work from Mac OS X 10.9 onwards; in these versions there is built-in support for the FTDI devices.&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR8-Burn-O-Mat-MacOsX.zip Mac OS X package] and extract it.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.sh&amp;lt;/code&amp;gt; in the terminal, it will ask you to install the Java Runtime Environment; in case there is a problem executing the script try with &amp;lt;code&amp;gt;chmod +x config.sh&amp;lt;/code&amp;gt; and try again. Beware that this need to be done only once.&lt;br /&gt;
# Connect the robot to the computer; the serial device will be created (something like &amp;lt;code&amp;gt;/dev/tty.usbserial-AJ03296J&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer; then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
The following procedure was tested in Ubunut 12.04, but a similar procedure can be followed in newer systems and other Linux versions.&amp;lt;br/&amp;gt;&lt;br /&gt;
You can find a nice GUI for &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; in the following link [https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php]; you can download directly the application for Ubuntu from the following link [https://projects.gctronic.com/elisa3/programming/avr8-burn-o-mat-2.1.2-all.deb avr8-burn-o-mat-2.1.2-all.deb].&amp;lt;br/&amp;gt;&lt;br /&gt;
Double click the package and install it; the executable will be &amp;lt;code&amp;gt;avr8-burn-o-mat&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that the application requires the Java SE Runtime Environment (JRE) that you can download from the official page [https://www.oracle.com/technetwork/java/javase/downloads/index.html https://www.oracle.com/technetwork/java/javase/downloads/index.html], alternatively you can issue the command &amp;lt;code&amp;gt;sudo apt-get install openjdk-8-jre&amp;lt;/code&amp;gt; in the terminal.&lt;br /&gt;
&lt;br /&gt;
The application need a bit of configuration, follow these steps:&lt;br /&gt;
:1. connect the robot to the computer, the serial device will be created (something like /dev/USB0)&lt;br /&gt;
:2. to use the USB port the permissions need to be set to read and write issueing the command &amp;lt;code&amp;gt;sudo chmod a+rw /dev/ttyUSB0&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. start the application and click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. set the location of &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; and the related configuration file (refer to the previous section when &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; was installed to know the exact location); the configuration file is in &amp;lt;code&amp;gt;/etc/avrdude.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;, close the application and open it again (this is needed to load the configuration file information); click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. select &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;Programmer&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. set the serial port connected to the robot (&amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;)&lt;br /&gt;
:6. in &amp;lt;code&amp;gt;additional options&amp;lt;/code&amp;gt; insert &amp;lt;code&amp;gt;-b 57600&amp;lt;/code&amp;gt;, you will end up with a window like the following one:&lt;br /&gt;
[[File:avrdude-gui.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
:7. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;; select &amp;lt;code&amp;gt;ATmega2560&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;AVR type&amp;lt;/code&amp;gt;&lt;br /&gt;
:8. in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot; select &amp;lt;code&amp;gt;Intel Hex&amp;lt;/code&amp;gt; on the right&lt;br /&gt;
:9. connect the robot to the computer, turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section&lt;br /&gt;
:10. during the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Command line====&lt;br /&gt;
The [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility is used to do the upload, you can download it directly from the following links depending on your system:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/WinAVR-20100110-install.exe Windows (tested on Windows 7 and 10)]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;C:\WinAVR-20100110\bin\avrdude&amp;lt;/code&amp;gt;; avrdude version 5.10&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/CrossPack-AVR-20131216.dmg Mac OS X]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/local/CrossPack-AVR/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 6.0.1&lt;br /&gt;
* Ubuntu (12.04 32-bit): issue the command &amp;lt;code&amp;gt;sudo apt-get install avrdude&amp;lt;/code&amp;gt; in the terminal; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 5.11.1&lt;br /&gt;
&lt;br /&gt;
Open a terminal and issue the following commands:&lt;br /&gt;
# only for windows users: &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt;. You should see the robot blink (blue), if this is not the case try again the command.&lt;br /&gt;
# &amp;lt;code&amp;gt;avrdude -p m2560 -P COM10 -b 57600 -c stk500v2 -D -Uflash:w:Elisa3-avr-studio.hex:i -v&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;COM10&amp;lt;/code&amp;gt; must be replaced with your com port and &amp;lt;code&amp;gt;Elisa3-avr-studio.hex&amp;lt;/code&amp;gt; must be replaced with your application name; in Mac OS X the port will be something like &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;, in Ubuntu will be &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Basic_demo Basic demo] and [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo Advanced demo] have this command contained in the file &amp;lt;code&amp;gt;program.bat&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; directory within the project, this can be useful for Windows users.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Internal EEPROM===&lt;br /&gt;
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).&amp;lt;br/&amp;gt; &lt;br /&gt;
Moreover the address 4093 is used to save the clock calibration value that is found during production/testing of the robots; this value hasn&#039;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 [https://projects.gctronic.com/elisa3/AVR053-Calibration-RC-oscillator.pdf AVR053: Calibration of the internal RC oscillator].&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;The size of usable EEPROM is thus 3946 bytes (0-3945) and the remaining memory must not be modified/erased.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility the following command has to be issued:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
avrdude -p m2560 -c usbtiny -v -U eeprom:w:Elisa3-eeprom.hex:i -v -B 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where &#039;&#039;Elisa3-eeprom.hex&#039;&#039; is the EEPROM memory saved as Intel Hex format ([https://projects.gctronic.com/elisa3/Elisa3-eeprom.hex eeprom example]); a possible tool to read and write Intel Hex format is [https://projects.gctronic.com/elisa3/G32setup_12004-intel-hex-editor.exe Galep32 from Conitec Datensysteme].&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively a program designed to writing to these EEPROM locations can be uploaded to the robot, in case an AVR programmer isn&#039;t available. The project source is available in the repository [https://github.com/gctronic/elisa3_eeprom.git https://github.com/gctronic/elisa3_eeprom.git]; it is simply needed to modify the address, rebuild and upload to the robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
Another option is to use the following Python script [https://projects.gctronic.com/elisa3/write_radio_address.py write_radio_address.py] (tested in Ubuntu 22.04), the procedure would be:&lt;br /&gt;
# program the robot with the factory firmware&lt;br /&gt;
# put selector in position 6&lt;br /&gt;
# connect the robot to the computer via USB cable&lt;br /&gt;
# set the correct serial port and address in the script&lt;br /&gt;
# run the script&lt;br /&gt;
After a power-cycle the new address can be used.&lt;br /&gt;
&lt;br /&gt;
===Bootloader===&lt;br /&gt;
In case the bootloader of the Elisa-3 is erased by mistake, then you can restore it by using an AVR programmer. You can download the bootloader from here [https://projects.gctronic.com/elisa3/stk500v2_20.03.18_13b46ce.hex stk500v2.hex]; the source code is available from the repository [https://github.com/gctronic/elisa3_bootloader.git https://github.com/gctronic/elisa3_bootloader.git].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Avrdude&amp;lt;/code&amp;gt; can be used to actually write the bootloader to the robot with a command similar to the following one:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;avrdude -p m2560 -c stk500v2 -P COM348 -v -U lfuse:w:0xE2:m -U hfuse:w:0xD8:m -U efuse:w:0xFF:m -V -U flash:w:stk500v2.hex:i -v -B 2&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Here we used a programmer recognized as a serial device (port COM348) that utilizes the &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; protocol.&lt;br /&gt;
&lt;br /&gt;
==Base-station==&lt;br /&gt;
This chapter explains informations that aren&#039;t needed for most of the users since the radio module is ready to be used and don&#039;t need to be reprogrammed. Only if you are interested in the firmware running in the radio module and on how to reprogram it then refer to section [https://www.gctronic.com/doc/index.php/Elisa#Base-station https://www.gctronic.com/doc/index.php/Elisa#Base-station] (chapter 4.2) of the Elisa robot wiki.&lt;br /&gt;
&lt;br /&gt;
==PC side==&lt;br /&gt;
This section gives informations related to the radio module connected to the computer; if you don&#039;t have a radio module you can skip this section.&lt;br /&gt;
===Requirements===&lt;br /&gt;
Refer to the section [https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver].&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station 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.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library is available in the repository [https://github.com/gctronic/elisa3_remote_library https://github.com/gctronic/elisa3_remote_library]; follow the instructions in the repository to build the library.&lt;br /&gt;
&lt;br /&gt;
===Multiplatform monitor===&lt;br /&gt;
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. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following figures show the monitor on the left and the available commands on the right. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Cmd-line-monitor.jpg|400px]] [[File:Pc-side-commands2.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_monitor https://github.com/gctronic/elisa3_remote_monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
Execution:&lt;br /&gt;
* install the driver contained in the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio 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&lt;br /&gt;
* once the driver is installed, the pre-compiled &amp;quot;exe&amp;quot; (under &amp;lt;code&amp;gt;\bin\Release&amp;lt;/code&amp;gt; dir) should run without problems; the program will prompt you the address of the robot you want to control&lt;br /&gt;
&lt;br /&gt;
Compilation:&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Elisa-3 demo (parent dir)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_library&amp;lt;/code&amp;gt; (Elisa-3 library project)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_monitor&amp;lt;/code&amp;gt; (current project)&lt;br /&gt;
&lt;br /&gt;
====Linux / Mac OS X====&lt;br /&gt;
The project was tested to work also in Ubuntu and Mac OS X (no driver required). &amp;lt;br/&amp;gt;&lt;br /&gt;
Compilation:&lt;br /&gt;
* you need to put this project within the same directory of the Elisa-3 library&lt;br /&gt;
* build command: go under &amp;quot;linux&amp;quot; dir and type &amp;lt;code&amp;gt;make clean &amp;amp;&amp;amp; make&amp;lt;/code&amp;gt;&lt;br /&gt;
Execution:&lt;br /&gt;
* &amp;lt;code&amp;gt;sudo ./main&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Communicate with 4 robots simultaneously===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_multiple https://github.com/gctronic/elisa3_remote_multiple]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
===Obstacle avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;obstacle avoidance&#039;&#039; 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 &amp;quot;intelligence&amp;quot; onboard. The demo uses the information gathered from the 3 front proximity sensors and set the motors speed accordingly; moreover the RGB LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|F_b1TQxZKos}}&lt;br /&gt;
&lt;br /&gt;
It is available also the same example but with 4 robots controlled simultaneously; the source can be downloaded from the branch &amp;lt;code&amp;gt;4robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]&amp;lt;br/&amp;gt;&lt;br /&gt;
It is easy to extend the previous example in order to control many robots, the code that controls 8 robots simultaneously can be downloaded from the branch &amp;lt;code&amp;gt;8robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa].&lt;br /&gt;
&lt;br /&gt;
===Cliff avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;cliff avoidance&#039;&#039; behavior controlling the robot from the pc through the radio; as with the &#039;&#039;obstacle avoidance&#039;&#039; 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 LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_cliff https://github.com/gctronic/elisa3_remote_cliff]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|uHy-9XXAHcs}}&lt;br /&gt;
===Communication between robots via PC===&lt;br /&gt;
This examples shows how to emulate direct communication between robots: basically a common state is shared between the robots and this state is changed based on the current state of each robot; it emulates the facts that each robot propagates its state to all other robots. Actually all the robots communicate only with the computer (only one computer with only one radio module) and the computer forward the information to all the others robots; the radio is fast enough so that the computer in the middle will not slow down the communication. A big advantage passing from the computer is that you can log the communication messages on the computer and see what is happening.&amp;lt;br/&amp;gt;&lt;br /&gt;
In particular in this demo a total of 4 robots are handled and when a robot crosses a black line, then it inform all others robots to change their color. The source can be downloaded from the repository [https://github.com/gctronic/elisa3_communication_between_robots_via_pc https://github.com/gctronic/elisa3_communication_between_robots_via_pc]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|4tpxoAyWfEA}}&lt;br /&gt;
&lt;br /&gt;
===Set robots state from file===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_file https://github.com/gctronic/elisa3_remote_file]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 Python library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station is connected) that will take control of the robots and receive data from them.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library and some usage examples are available in the repository [https://github.com/gctronic/elisa3_remote_library_python https://github.com/gctronic/elisa3_remote_library_python].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Odometry=&lt;br /&gt;
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 ;-)&amp;lt;br/&amp;gt;&lt;br /&gt;
A fine calibration of the right and left wheel speed parameters might give better results.&lt;br /&gt;
However the current odometry is a good estimate of the absolute position from a starting point.&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:odometry-vertical.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Details about the code can be found in the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced-demo] project, in particular the &#039;&#039;motors.c&#039;&#039; source file. The PC application used for logging data is the [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor].&lt;br /&gt;
==Autonomous calibration==&lt;br /&gt;
Since the motors can be slightly different a calibration can improve the behavior of the robot in terms of maneuverability and odometry accuracy.&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/calibration-sheet.pdf calibration-sheet.pdf]. &amp;lt;br/&amp;gt;&lt;br /&gt;
In order to accomplish the calibration the robot need to be programmed with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor application] in which the letter &#039;&#039;l (el)&#039;&#039; is reserved to launch the calibration, otherwise if you have a TV remote control you can press the button &#039;&#039;5&#039;&#039;.&lt;br /&gt;
The sequence is the following:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. put the selector in position 8&amp;lt;br/&amp;gt;&lt;br /&gt;
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&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-1.jpg|300px]] [[File:elisa3-calibration-2.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
3. once the robot is placed  you can type the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;); 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&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-3.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
5. once the robot is placed you can type again the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;)&amp;lt;br/&amp;gt;&lt;br /&gt;
6. when the robot finish, the calibration process is also terminated.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The previous figures show a robot without the top diffuser, anyway you don&#039;t need to remove it!&lt;br /&gt;
&lt;br /&gt;
=Tracking=&lt;br /&gt;
==Assembly documentation==&lt;br /&gt;
You can download the documentation from here [https://projects.gctronic.com/elisa3/tracking-doc.pdf tracking-doc.pdf].&amp;lt;br/&amp;gt;&lt;br /&gt;
Have a look also at the video:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|92pz28hnteY}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwisTrack==&lt;br /&gt;
Some experiments are done with the [https://en.wikibooks.org/wiki/SwisTrack 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-3-tracking-2robots.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The pre-compiled SwisTrack software (Windows) can be downloaded from the following link [https://projects.gctronic.com/elisa3/SwisTrackEnvironment-10.04.13.zip SwisTrack-compiled]. &amp;lt;!--; it contains also the configuration for the Elisa-3 named &#039;&#039;elisa-3-usb.swistrack&#039;&#039;.&amp;lt;br/&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
We used the &#039;&#039;Trust Spotlight Pro&#039;&#039; webcam, removed the internal IR filter and placed an external filter that let trough the red-IR wavelength. This filter configuration eases the tracking of the robots. The camera parameters (brightness=-64, contrast=0, saturation=100, gamma=72, gain=0) where tuned to get the best possible results, if another camera would be used a similar tuning has to be done again.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the tracking of 5 robots:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|33lrIUux_0Q}}&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:swistrack-output.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the test done with 20, 30 and 38 Elisa-3 robots, the tracking is still good; it&#039;s important to notice that we stopped to 38 Elisa-3 robots because are the ones we have in our lab.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|5LAccIJ9Prs}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Position control==&lt;br /&gt;
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 &#039;&#039;8-shape&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|ACaGNEQHayc}}&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:tracking-8shape.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
All the following projects require the [https://www.gctronic.com/doc/index.php/Elisa-3#Elisa-3_library Elisa-3 library], for building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
* Horizontal position control (4 robots): the source code can be downloaded from [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-4-robots-rev245-15.01.21.zip position-control-pattern-horizontal-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Vertical position control (4 robots): [https://projects.gctronic.com/elisa3/position-control-pattern-vertical-4-robots-rev245-15.01.21.zip position-control-pattern-vertical-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Horizontal position control (1 robot): [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-1-robot-rev245-15.01.21.zip position-control-pattern-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Go to target point: [https://projects.gctronic.com/elisa3/position-control-goto-pos-horizontal-1-robot-rev245-15.01.21.zip position-control-goto-pos-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Utilities==&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/back-IR-on-4-robots-rev245-15.01.21.zip back-IR-on-4-robots-rev245-15.01.21.zip] is an example that turn on the back IR of 4 robots, their addresses are asked to the user at the execution.&lt;br /&gt;
&lt;br /&gt;
=Local communication=&lt;br /&gt;
{{#ev:youtube|7bxIR0Z3q3M}}&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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. &amp;lt;br/&amp;gt;&lt;br /&gt;
Here are some details about the current implementation of the communication module:&lt;br /&gt;
* 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&lt;br /&gt;
* bidirectional communication&lt;br /&gt;
* id and angle of the proximity sensor that received the data are available&lt;br /&gt;
* the throughput is about 1 bytes/sec&lt;br /&gt;
* maximum communication distance is about 5 cm&lt;br /&gt;
* no reception/transmission queue (only one byte at a time)&lt;br /&gt;
* the data are sent using all the sensors, cannot select a single sensor from which to send the data. The data isn&#039;t sent contemporaneously from all the sensors, but the sensors used are divided in two groups of 4 alternating sensors (to reduce consumption)&lt;br /&gt;
== Clustering example==&lt;br /&gt;
In this demo there are &amp;lt;b&amp;gt;37&amp;lt;/b&amp;gt; elisa-3 robots programmed with a special firmware that you can download here [https://projects.gctronic.com/elisa3/elisa3_cluster_firmware.hex elisa3_cluster_firmware.hex]; the source code is available in the repo [https://github.com/gctronic/elisa3_cluster_firmware https://github.com/gctronic/elisa3_cluster_firmware].&amp;lt;br/&amp;gt;&lt;br /&gt;
The robots will try to form some clusters by exchanging data through the local communication and at the same time exchange data with a central computer: they send their status (in cluster or not) and receive a new color when in cluster. &lt;br /&gt;
The application running on the computer side is available in the repo [https://github.com/gctronic/elisa3_cluster_pc https://github.com/gctronic/elisa3_cluster_pc].&amp;lt;br/&amp;gt;&lt;br /&gt;
Here is a video of the demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|MOuSfr1_3lg}}&lt;br /&gt;
&lt;br /&gt;
=ROS=&lt;br /&gt;
This chapter explains how to use ROS with the elisa-3 robots; the radio module is needed here. 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-schema.png|450px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all you need to install and configure ROS, refer to [https://wiki.ros.org/Distributions https://wiki.ros.org/Distributions] for more informations. Alternatively you can download directly a virtual machine pre-installed with everything you need, refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Virtual_machine virtual machine]; this is the preferred way. &lt;br /&gt;
:*&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; This tutorial is based on ROS Hydro&amp;lt;/font&amp;gt;. The same instructions are working with ROS Noetic, beware to use &amp;lt;code&amp;gt;noetic&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; when installing the packages. &lt;br /&gt;
:* If you downloaded the pre-installed VM you can go directly to section [https://www.gctronic.com/doc/index.php/Elisa-3#Running_the_ROS_node Running the ROS node].&lt;br /&gt;
&lt;br /&gt;
The ROS elisa-3 node based on roscpp can be found in the following repository [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Initial configuration==&lt;br /&gt;
The following steps need to be done only once after installing ROS:&lt;br /&gt;
:1. If not already done, create a catkin workspace, refer to [https://wiki.ros.org/catkin/Tutorials/create_a_workspace https://wiki.ros.org/catkin/Tutorials/create_a_workspace]. Basically you need to issue the following commands:  &lt;br /&gt;
&amp;lt;pre&amp;gt;  mkdir -p ~/catkin_ws/src&lt;br /&gt;
  cd ~/catkin_ws/src&lt;br /&gt;
  catkin_init_workspace&lt;br /&gt;
  cd ~/catkin_ws/&lt;br /&gt;
  catkin_make&lt;br /&gt;
  source devel/setup.bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
:2. You will need to add the line &amp;lt;code&amp;gt;source ~/catkin_ws/devel/setup.bash&amp;lt;/code&amp;gt; to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; in order to automatically have access to the ROS commands when the system is started&lt;br /&gt;
:3. Clone the elisa-3 ROS node repo from [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] inside the catkin workspace source folder (&amp;lt;tt&amp;gt;~/catkin_ws/src&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_node_cpp.git&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. Install the dependencies:&lt;br /&gt;
:ROS:&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-slam-gmapping&amp;lt;/code&amp;gt;&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-imu-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are using a newer version of ROS, replace &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; with your distribution name.&lt;br /&gt;
:cpp:&lt;br /&gt;
::* install OpenCV: &amp;lt;code&amp;gt;sudo apt-get install libopencv-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are working with OpenCV 4, then you need to change the header include from &amp;lt;code&amp;gt;#include &amp;lt;opencv/cv.h&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;#include &amp;lt;opencv2/opencv.hpp&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. Rebuild the &amp;lt;code&amp;gt;elisa-3 library&amp;lt;/code&amp;gt;: go to &amp;lt;code&amp;gt;~/catkin_ws/src/elisa3_node_cpp/src/pc-side-elisa3-library/linux&amp;lt;/code&amp;gt;, then issue &amp;lt;code&amp;gt;make clean&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
:6. Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;, there shouldn&#039;t be errors&lt;br /&gt;
: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 &amp;lt;tt&amp;gt;udev rules&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
:* plug in the radio and issue the command &amp;lt;tt&amp;gt;lsusb&amp;lt;/tt&amp;gt;, you&#039;ll get the list of USB devices attached to the computer, included the radio:&lt;br /&gt;
::&amp;lt;tt&amp;gt;Bus 002 Device 003: ID 1915:0101 Nordic Semiconductor ASA&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* issue the command &amp;lt;tt&amp;gt;udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/003)&amp;lt;/tt&amp;gt;, beware to change the bus according to the result of the previous command. You&#039;ll receive a long output showing all the informations regarding the USB device, the one we&#039;re interested is the &amp;lt;tt&amp;gt;product attribute&amp;lt;/tt&amp;gt;:&lt;br /&gt;
::&amp;lt;tt&amp;gt;ATTR{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
:* in the udev rules file you can find in &amp;lt;tt&amp;gt;/etc/udev/rules.d/name.rules&amp;lt;/tt&amp;gt; add the following string changing the &amp;lt;tt&amp;gt;GROUP&amp;lt;/tt&amp;gt; field with your current user group:&lt;br /&gt;
::&amp;lt;tt&amp;gt;SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;, GROUP=&amp;quot;viki&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
:: To know which groups your user belongs to issue the command &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* disconnect and reconnect the radio module&lt;br /&gt;
:8. Program the elisa-3 robot with the last [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced firmware] (&amp;gt;= rev.221) and put the selector in position 15&lt;br /&gt;
&lt;br /&gt;
==Running the ROS node==&lt;br /&gt;
First of all get the last version of the elisa-3 ROS node from github:&lt;br /&gt;
* clone the repo [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] and copy the &amp;lt;tt&amp;gt;elisa3_node_cpp&amp;lt;/tt&amp;gt; directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)&lt;br /&gt;
* build the driver by opening a terminal and issueing the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt; from within the catkin workspace directory (e.g. ~/catkin_ws).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start the ROS node, for this purposes there is a launch script (based on [https://wiki.ros.org/roslaunch roslaunch]), as explained in the following section. Before starting the ROS node you need to start &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;, open another terminal tab and issue the command &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Single robot===&lt;br /&gt;
Open a terminal and issue the following command: &amp;lt;code&amp;gt;roslaunch elisa3_node_cpp elisa3_single.launch elisa3_address:=&#039;1234&#039;&amp;lt;/code&amp;gt; where &amp;lt;tt&amp;gt;1234&amp;lt;/tt&amp;gt; is the robot id (number on the bottom).&lt;br /&gt;
&lt;br /&gt;
If all is going well [https://wiki.ros.org/rviz/UserGuide rviz] will be opened showing the informations gathered from the topics published by the elisa ROS node as shown in the following figure: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-single-robot.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The launch script is configured also to run the [https://wiki.ros.org/gmapping 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|v=k_9nmEO2zqE}}&lt;br /&gt;
&lt;br /&gt;
==Move the robot==&lt;br /&gt;
You have two options to move the robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is to use the &amp;lt;code&amp;gt;rviz&amp;lt;/code&amp;gt; interface: in the bottom left side of the interface there is a &amp;lt;code&amp;gt;Teleop&amp;lt;/code&amp;gt; panel containing an &#039;&#039;interactive square&#039;&#039; meant to be used with differential drive robots. By clicking in this square you&#039;ll move the robot, for instance by clicking on the top-right section, then the robot will move forward-right.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-teleop.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second method is by directly publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic, for instance by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[0.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 1.0]&#039;&amp;lt;/code&amp;gt; the robot will rotate on the spot, instead by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[4.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 0.0]&#039;&amp;lt;/code&amp;gt; the robot will move straight forward.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that there shouldn&#039;t be any other node publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic (e.g. Rviz), otherwise your commands will be overwritten.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Robot state publisher===&lt;br /&gt;
If you get an error similar to the following when you start a node with roslaunch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: Cannot locate node of type [state_publisher] in package [robot_state_publisher]. Make sure file exists in package path and permission is set to executable (chmod +x)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you need to change the launch file from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;robot_state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is due to the fact that &amp;lt;code&amp;gt;state_publisher&amp;lt;/code&amp;gt; was a deprecated alias for the node named &amp;lt;code&amp;gt;robot_state_publisher&amp;lt;/code&amp;gt; (see [https://github.com/ros/robot_state_publisher/pull/87 https://github.com/ros/robot_state_publisher/pull/87]).&lt;br /&gt;
&lt;br /&gt;
==Virtual machine==&lt;br /&gt;
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 &#039;&#039;open virtualization format&#039;&#039; from the following link [https://projects.gctronic.com/VM/ROS-Hydro-12.04.ova ROS-Hydro-12.04.ova] (based on the VM from https://nootrix.com/2014/04/virtualized-ros-hydro/); you can then use [https://www.virtualbox.org/ VirtualBox] to import the file and automatically create the virtual machine. Some details about the system:&lt;br /&gt;
* user: gctronic, pw: gctronic&lt;br /&gt;
* Ubuntu 12.04.4 LTS (32 bits)&lt;br /&gt;
* ROS Hydro installed&lt;br /&gt;
* [https://www.cyberbotics.com/ Webots] 8.0.5 is installed (last version available for 32 bits linux)&lt;br /&gt;
* [https://git-cola.github.io/ git-cola] (git interface) is installed&lt;br /&gt;
* the &amp;lt;tt&amp;gt;catkin workspace&amp;lt;/tt&amp;gt; is placed in the desktop&lt;br /&gt;
&lt;br /&gt;
=Videos=&lt;br /&gt;
==Autonomous charge==&lt;br /&gt;
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.&lt;br /&gt;
{{#ev:youtube|o--FM8zIrRk}}{{#ev:youtube|Ib9WdbwMlyQ}}{{#ev:youtube|xsOdxwOjmuI}}{{#ev:youtube|tprO126R9iA}}{{#ev:youtube|HVYp1Eujof8}}{{#ev:youtube|mtJd8jTWT94}}&lt;br /&gt;
==Remote control==&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|WDxfIFhpm1g}}&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3211</id>
		<title>Elisa-3</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3211"/>
		<updated>2026-06-22T13:22:23Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: /* Internal EEPROM */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:elisa3]]&lt;br /&gt;
[[Category:all]]&lt;br /&gt;
=Overview=&lt;br /&gt;
[[File:Elisa3_and_charger.JPG|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Elisa-3 is an evolution of the [https://www.gctronic.com/doc/index.php/Elisa Elisa] robot based on a different microcontroller and including a comprehensive set of sensors:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/atmega640-1280-1281-2560-2561_datasheet.pdf Atmel 2560] microcontroller (Arduino compatible)&lt;br /&gt;
* central RGB led&lt;br /&gt;
* 8 green leds around the robot&lt;br /&gt;
* IRs emitters&lt;br /&gt;
* 8 IR proximity sensors ([https://projects.gctronic.com/elisa3/tcrt1000.pdf Vishay Semiconductors Reflective Optical Sensor])&lt;br /&gt;
* 4 ground sensors ([https://projects.gctronic.com/elisa3/QRE1113-D.PDF Fairchild Semiconductor Minature Reflective Object Sensor])&lt;br /&gt;
* 3-axis accelerometer ([https://projects.gctronic.com/elisa3/MMA7455L.pdf Freescale MMA7455L])&lt;br /&gt;
* RF radio for communication ([https://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P Nordic Semiconductor nRF24L01+])&lt;br /&gt;
* micro USB connector for programming, debugging and charging&lt;br /&gt;
* IR receiver&lt;br /&gt;
* 2 DC motors&lt;br /&gt;
* top light diffuser&lt;br /&gt;
* selector&lt;br /&gt;
The robot is able to self charge using the charger station, as shown in the previous figure. The following figure illustrates the position of the various sensors: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-mainComp-digital-white.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful information==&lt;br /&gt;
* the top light diffuser and robot are designed to lock together, but the diffuser isn&#039;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.&lt;br /&gt;
[[File:Diffuser-pull-up.jpg|200px]] [[File:Diffuser-push-down.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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:&lt;br /&gt;
[[File:selector-tweezers.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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.&lt;br /&gt;
[[File:Antenna-position.jpg|200px]] [[File:Antenna-diffuser.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Robot charging==&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-charger-out.jpg|300px]] [[File:Elisa3-charger-in.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The microcontroller is informed when the robot is in charge and this information is also transferred to the PC in the &#039;&#039;flags&#039;&#039; 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Communication Communication].&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following video shows the Elisa-3 piloted through the radio to the charging station using the monitor application: {{#ev:youtube|kjliXlQcgzw}}&lt;br /&gt;
&lt;br /&gt;
==Top light diffuser==&lt;br /&gt;
From February 2013 onwards 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-new-case.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
The following figures show the main components offered by the Elisa-3 robot and where they are physically placed: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-hw-schema-top.jpg|550px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-hw-schema-bottom3.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Power autonomy==&lt;br /&gt;
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).&lt;br /&gt;
[[File:Power-autonomy.jpg|800px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Detailed specifications==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Feature&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Technical information&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
|Size, weight&lt;br /&gt;
|50 mm diameter, 30 mm height, 39 g&lt;br /&gt;
|-&lt;br /&gt;
|Battery, autonomy&lt;br /&gt;
|LiIPo rechargeable battery (2 x 130 mAh, 3.7 V). About 3 hours autonomy. Recharging time about 1h e 30.&lt;br /&gt;
|-&lt;br /&gt;
|Processor&lt;br /&gt;
|Atmel ATmega2560 @ 8MHz (~ 8 MIPS); 8 bit microcontroller&lt;br /&gt;
|-&lt;br /&gt;
|Memory&lt;br /&gt;
|RAM: 8 KB; Flash: 256 KB; EEPROM: 4 KB&lt;br /&gt;
|-&lt;br /&gt;
|Motors&lt;br /&gt;
|2 DC motors with a 25:1 reduction gear; speed controlled with backEMF&lt;br /&gt;
|-&lt;br /&gt;
|Magnetic wheels&lt;br /&gt;
|Adesion force of about 1 N (100 g) depending on surface material and painting&amp;lt;br/&amp;gt; Wheels diamater = 9 mm &amp;lt;br/&amp;gt;Distance between wheels = 40.8 mm&lt;br /&gt;
|-&lt;br /&gt;
|Speed&lt;br /&gt;
|Max: 60 cm/s&lt;br /&gt;
|-&lt;br /&gt;
|Mechanical structure&lt;br /&gt;
|PCB, motors holder, top white plastic to diffuse light&lt;br /&gt;
|-&lt;br /&gt;
|IR sensors&lt;br /&gt;
|8 infra-red sensors measuring ambient light and proximity of objects up to 6 cm; each sensor is 45° away from each other &amp;lt;br/&amp;gt; 4 ground sensors detecting the end of the viable surface (placed on the front-side of the robot)&lt;br /&gt;
|-&lt;br /&gt;
| IR emitters&lt;br /&gt;
| 3 IR emitters (2 on front-side, 1 on back-side of the robot) &lt;br /&gt;
|-&lt;br /&gt;
|Accelerometer&lt;br /&gt;
|3D accelerometer along the X, Y and Z axis&lt;br /&gt;
|-&lt;br /&gt;
|LEDs&lt;br /&gt;
|1 RGB LED in the center of the robot; 8 green LEDs around the robot&lt;br /&gt;
|-&lt;br /&gt;
|Switch / selector&lt;br /&gt;
|16 position rotating switch&lt;br /&gt;
|-&lt;br /&gt;
|Communication&lt;br /&gt;
| Standard Serial Port (up to 38kbps)&amp;lt;br/&amp;gt; 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&lt;br /&gt;
|-&lt;br /&gt;
|Remote Control&lt;br /&gt;
|Infra-red receiver for standard remote control commands&lt;br /&gt;
|-&lt;br /&gt;
|Expansion bus&lt;br /&gt;
|Optional connectors: 2 x UART, I2C, 2 x PWM, battery, ground, analog and digital voltage&lt;br /&gt;
|-&lt;br /&gt;
|Programming&lt;br /&gt;
|C/C++ programming with the AVR-GCC compiler ([https://winavr.sourceforge.net/ WinAVR] for Windows). Free compiler and IDE (AVR Studio / Arduino)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Communication=&lt;br /&gt;
==Wireless==&lt;br /&gt;
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 ([https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P nRF24L01+]) mounted on the robot communicates through SPI with the microcontroller and transfers data to and from the PC wirelessly.&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa-communication.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - PC to radio to robot===&lt;br /&gt;
The 13 bytes payload packet format is shown below (the number in the parenthesis expresses the bytes):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Command (1) &lt;br /&gt;
| Red led (1) &lt;br /&gt;
| Blue led (1) &lt;br /&gt;
| Green led (1) &lt;br /&gt;
| IR + Flags (1) &lt;br /&gt;
| Right motor (1) &lt;br /&gt;
| Left motor (1) &lt;br /&gt;
| Small green leds (1) &lt;br /&gt;
| Flags2 (1)&lt;br /&gt;
| Reserved (1)&lt;br /&gt;
| Remaining 4 bytes are unused &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Command: 0x27 = change robot state; 0x28 = goto base-station bootloader (this byte is not sent to the robot)&lt;br /&gt;
* Red, Blue, Green leds: values from 0 (OFF) to 100 (ON max power)&lt;br /&gt;
* IR + flags:&lt;br /&gt;
** first two bits are dedicated to the IRs:&lt;br /&gt;
*** 0x00 =&amp;gt; all IRs off&lt;br /&gt;
*** 0x01 =&amp;gt; back IR on&lt;br /&gt;
*** 0x02 =&amp;gt; front IRs on&lt;br /&gt;
*** 0x03 =&amp;gt; all IRs on&lt;br /&gt;
** third bit is reserved for enabling/disabling IR remote control (0=&amp;gt;disabled, 1=&amp;gt;enabled)&lt;br /&gt;
** fourth bit is used for sleep (1 =&amp;gt; go to sleep for 1 minute)&lt;br /&gt;
** fifth bit is used to calibrate all sensors (proximity, ground, accelerometer) and reset odometry&lt;br /&gt;
** sixth bit is reserved (used by radio station)&lt;br /&gt;
** seventh bit is used for enabling/disabling onboard obstacle avoidance&lt;br /&gt;
** eight bit is used for enabling/disabling onboard cliff avoidance&lt;br /&gt;
* 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&lt;br /&gt;
* 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&lt;br /&gt;
* Flags2:&lt;br /&gt;
** bit0 is used for odometry calibration&lt;br /&gt;
** remaining bits unused&lt;br /&gt;
* Remaining bytes free to be used&lt;br /&gt;
&lt;br /&gt;
====Optimized protocol====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
- ack returned must be up to 16 bytes (max 64 bytes for the usb buffer); the same number of bytes returned by the robot as ack payload has to be read then by the pc!!&lt;br /&gt;
- la base-station ritorna &amp;quot;2&amp;quot; quando l&#039;ack non è stato ricevuto;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - robot to radio to PC===&lt;br /&gt;
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 &amp;quot;ack payload&amp;quot; feature of the radio module. Each &amp;quot;ack payload&amp;quot; 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):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|ID=3 (1)&lt;br /&gt;
|Prox0 (2)&lt;br /&gt;
|Prox1 (2)&lt;br /&gt;
|Prox2 (2)&lt;br /&gt;
|Prox3 (2)&lt;br /&gt;
|Prox5 (2)&lt;br /&gt;
|Prox6 (2)&lt;br /&gt;
|Prox7 (2)&lt;br /&gt;
|Flags (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=4 (1)&lt;br /&gt;
|Prox4 (2)&lt;br /&gt;
|Ground0 (2)&lt;br /&gt;
|Ground1 (2)&lt;br /&gt;
|Ground2 (2)&lt;br /&gt;
|Ground3 (2)&lt;br /&gt;
|AccX (2)&lt;br /&gt;
|AccY (2)&lt;br /&gt;
|TV remote (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=5 (1)&lt;br /&gt;
|ProxAmbient0 (2)&lt;br /&gt;
|ProxAmbient1 (2)&lt;br /&gt;
|ProxAmbient2 (2)&lt;br /&gt;
|ProxAmbient3 (2)&lt;br /&gt;
|ProxAmbient5 (2)&lt;br /&gt;
|ProxAmbient6 (2)&lt;br /&gt;
|ProxAmbient7 (2)&lt;br /&gt;
|Selector (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=6 (1)&lt;br /&gt;
|ProxAmbient4 (2)&lt;br /&gt;
|GroundAmbient0 (2)&lt;br /&gt;
|GroundAmbient1 (2)&lt;br /&gt;
|GroundAmbient2 (2)&lt;br /&gt;
|GroundAmbient3 (2)&lt;br /&gt;
|AccZ (2)&lt;br /&gt;
|Battery (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=7 (1)&lt;br /&gt;
|LeftSteps (4)&lt;br /&gt;
|RightSteps (4)&lt;br /&gt;
|theta (2)&lt;br /&gt;
|xpos (2)&lt;br /&gt;
|ypos (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Pay attention that the base-station could return &amp;quot;error&amp;quot; codes in the first byte if the communication has problems:&lt;br /&gt;
* 0 =&amp;gt; transmission succeed (no ack received though)&lt;br /&gt;
* 1 =&amp;gt; ack received (should not be returned because if the ack is received, then the payload is read)&lt;br /&gt;
* 2 =&amp;gt; transfer failed&lt;br /&gt;
&lt;br /&gt;
Packet ID 3:&lt;br /&gt;
* Prox* contain values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* The &#039;&#039;Flags&#039;&#039; byte contains these information:&lt;br /&gt;
** bit0: 0 = robot not in charge; 1 = robot in charge&lt;br /&gt;
** bit1: 0 = button pressed; 1 = button not pressed&lt;br /&gt;
** bit2: 0 = robot not charged completely; 1 = robot charged completely&lt;br /&gt;
** the remainig bits are not used at the moment&lt;br /&gt;
&lt;br /&gt;
Packet ID 4:&lt;br /&gt;
* Prox4 contains values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* Ground* contain values from 512 to 1023, the smaller the value the darker the surface&lt;br /&gt;
* AccX and AccY contain raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* TV remote contains the last interpreted command received through IR&lt;br /&gt;
&lt;br /&gt;
Packet ID 5:&lt;br /&gt;
* ProxAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* Selector contains the value of the current selector position&lt;br /&gt;
&lt;br /&gt;
Packet ID 6:&lt;br /&gt;
* ProxAmbient4 contains values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* GroundAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* AccZ contains raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* Battery contains the sampled value of the battery, the values range is between 780 (battery discharged) and 930 (battery charged)&lt;br /&gt;
&lt;br /&gt;
Packet ID 7:&lt;br /&gt;
* LeftSteps and RightSteps contain the sum of the sampled speed for left and right motors respectively (only available when the speed controller isn&#039;t used; refer to xpos, ypos and theta when the speed controller is used)&lt;br /&gt;
* 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&lt;br /&gt;
* xpos and ypos contain the position of the robot expressed in millimeters; available only when the speed controller is enabled&lt;br /&gt;
&lt;br /&gt;
==USB cable==&lt;br /&gt;
You can directly connect the robot to the computer to make a basic functional test. You can find the source code in the following link [https://projects.gctronic.com/elisa3/Elisa3-global-test.zip Elisa3-global-test.zip] (Windows).&amp;lt;br/&amp;gt;&lt;br /&gt;
To start the test follow these steps:&lt;br /&gt;
# put the selector in position 6&lt;br /&gt;
# connect the robot to the computer with the USB cable and turn it on&lt;br /&gt;
# run the program, insert the correct COM port and choose option 1&lt;br /&gt;
With the same program you can also change the ID of the robot by choosing option 2 in the last step (not recommended).&lt;br /&gt;
&lt;br /&gt;
Via USB cable you can also program the robot with [https://www.gctronic.com/doc/index.php?title=Elisa-3#Aseba Aseba].&lt;br /&gt;
&lt;br /&gt;
=Software=&lt;br /&gt;
&lt;br /&gt;
==Robot==&lt;br /&gt;
===Requirements===&lt;br /&gt;
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&#039;re done otherwise you need to download the drivers for your system and architecture:&lt;br /&gt;
* [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe Windows Vista/XP], [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.10%20WHQL%20Certified.exe Windows 7/8/10 (run as administrator)]&lt;br /&gt;
* Ubuntu: when the robot is connected the port will be created in &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt; (no need to install a driver)&lt;br /&gt;
* [https://www.ftdichip.com/drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (32 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (64 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_3.dmg Mac OS X 10.9 and above]; after installing the driver the port will be created in &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;; you can find a guide on how to install the driver in the following link [https://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf]&lt;br /&gt;
All the drivers can be found in the official page from the following link [https://www.ftdichip.com/Drivers/VCP.htm FTDI drivers].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;Starting from robot ID 3823 the USB to serial chip can be one of the following: FTDI, [https://projects.gctronic.com/elisa3/CypressDriverInstaller_1.exe Cypress CY7C65213] or Silicon Labs CP2102 ([https://projects.gctronic.com/elisa3/CP210x_Universal_Windows_Driver.zip Windows 10 or later], [https://projects.gctronic.com/elisa3/CP210x_Windows_Drivers.zip Windows 7]); this is due to chips availability.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AVR Studio 4 project===&lt;br /&gt;
The projects are built with [https://projects.gctronic.com/elisa3/AvrStudio4Setup.exe AVR Studio 4] released by Atmel. &amp;lt;br/&amp;gt;&lt;br /&gt;
The projects should be compatible also with newer versions of Atmel Studio (last version known as Microchip Studio), the last version is available from [https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Basic demo====&lt;br /&gt;
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.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_basic https://github.com/gctronic/elisa3_firmware_basic]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-basic_ffb3947_21.03.18.hex Elisa-3 basic firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
&lt;br /&gt;
====Advanced demo====&lt;br /&gt;
This is an extension of the &#039;&#039;basic demo project&#039;&#039;, basically it contains some additional advanced demos.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_advanced.git https://github.com/gctronic/elisa3_firmware_advanced.git]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-advanced_96c355a_13.03.18.hex Elisa-3 advanced firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
* 6: robot testing and address writing through serial connection (used in production)&lt;br /&gt;
* 7: automatic charging demo (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Videos Videos]), that is composed of 4 states: &lt;br /&gt;
** random walk with obstacle avoidance&lt;br /&gt;
** search black line&lt;br /&gt;
** follow black line that lead to the charging station&lt;br /&gt;
** charge for a while&lt;br /&gt;
* 8: autonomous odometry calibration (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Autonomous_calibration Autonomous calibration])&lt;br /&gt;
* 9: write default odometry calibration values in EEPROM (hard-coded values); wait 2 seconds before start writing the calibration values&lt;br /&gt;
* 10: robot moving forward (with pause) and obstacle avoidance enabled; random RGB colors and green led effect &lt;br /&gt;
* 11: local communication: robot alignment&lt;br /&gt;
* 12: local communication: 2 or more robots exchange data sequentially&lt;br /&gt;
* 13: local communication: listen and transmit continuously; when data received change RGB color&lt;br /&gt;
* 14: local communication: RGB color propagation&lt;br /&gt;
* 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)&lt;br /&gt;
&lt;br /&gt;
====Atmel Studio 7 / Microchip Studio====&lt;br /&gt;
If you are working with Atmel Studio 7 / Microchip Studio, you can simply use the provided AVR Studio 4 projects by importing them directly in Atmel Studio 7 / Microchip Studio: &amp;lt;code&amp;gt;File =&amp;gt; Import =&amp;gt; AVR Studio 4 Project&amp;lt;/code&amp;gt;, then select &amp;lt;code&amp;gt;Elisa3-avr-studio.aps&amp;lt;/code&amp;gt; and click on &amp;lt;code&amp;gt;Convert&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are asked to update some components (see following figure), then agree:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:atmel-studio-convert.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;lt;code&amp;gt;Build =&amp;gt; Clean solution&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Build =&amp;gt; Build solution&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you experience problems during the building, make sure you have the correct toolchain installed: you can download WinAVR toolchain from [https://projects.gctronic.com/elisa3/WinAVR-20100110-install.exe WinAVR-20100110-install.exe].&amp;lt;br/&amp;gt;&lt;br /&gt;
Close and open again Atmel/Microchip Studio and verify that the new toolchain is recognized and that the path is correct: &amp;lt;code&amp;gt;Tools =&amp;gt; Options&amp;lt;/code&amp;gt; and on the left panel select &amp;lt;code&amp;gt;Toolchain =&amp;gt; Package Configuration&amp;lt;/code&amp;gt;. Select on top &amp;lt;code&amp;gt;Atmel AVR 8-bit (C language)&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;WinAVR&amp;lt;/code&amp;gt; flavour and verify the path corresponds to the WinAVR installation path. The following figure shows the toolchain configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio1.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally verify the project is using the WinAVR toolchain: &amp;lt;code&amp;gt;right click on the project name =&amp;gt; Properties&amp;lt;/code&amp;gt;, on the left panel select &amp;lt;code&amp;gt;Advanced&amp;lt;/code&amp;gt; and verify that &amp;lt;code&amp;gt;Toolchain Flavour&amp;lt;/code&amp;gt; is set to WinAVR. Press &amp;lt;code&amp;gt;CTRL+S&amp;lt;/code&amp;gt; to save your project configuration changes. The following figures show the project configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio2.png|200px]] [[File:elisa3-atmelstudio3.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Arduino IDE project===&lt;br /&gt;
The project is built with the Arduino IDE 1.x freely available from the [https://arduino.cc/ official Arduino website]. In order to build the Elisa-3 firmware with the Arduino IDE 1.x the following steps has to be performed:&amp;lt;br/&amp;gt;&lt;br /&gt;
*1. download the [https://arduino.cc/hu/Main/Software Arduino IDE 1.x] (the last known working version is 1.8.9, refer to [https://www.arduino.cc/en/Main/OldSoftwareReleases#previous Arduino Software]) and extract it, let say in a folder named &amp;lt;code&amp;gt;arduino-1.x&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
*2. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_library_03.02.25_65964ed.zip Elisa-3 Arduino library] and extract it within the libraries folder of the Arduino IDE, in this case &amp;lt;code&amp;gt;arduino-1.x\libraries&amp;lt;/code&amp;gt; (see [https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer Find-sketches-libraries-board-cores-and-other-files-on-your-computer] for more information on Arduino useful paths); you should end up with a &amp;lt;code&amp;gt;Elisa3&amp;lt;/code&amp;gt; folder within the libraries. If you start the Arduino IDE now you can see that the &amp;lt;code&amp;gt;Elisa-3&amp;lt;/code&amp;gt; library is available in the menu &amp;lt;code&amp;gt;Sketch=&amp;gt;Import Library...&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Lirary&amp;lt;/code&amp;gt; in later IDE versions).&amp;lt;br/&amp;gt; In later versions of Arduino IDE you can also install the library via menu: &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Library=&amp;gt;Add .ZIP library&amp;lt;/code&amp;gt;, for more info have a look at [https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#importing-a-zip-library importing-a-zip-library].&lt;br /&gt;
*3. the file &amp;lt;code&amp;gt;boards.txt&amp;lt;/code&amp;gt; in the Arduino IDE folder &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino\avr&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Users\{username}\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6&amp;lt;/code&amp;gt; in later IDE versions) need to be changed to contain the definitions for the Elisa-3 robot, add the following definitions at the end of the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##############################################################&lt;br /&gt;
&lt;br /&gt;
elisa3.name=Elisa 3 robot&lt;br /&gt;
&lt;br /&gt;
elisa3.upload.tool=avrdude&lt;br /&gt;
elisa3.upload.tool.serial=avrdude&lt;br /&gt;
elisa3.upload.protocol=stk500v2&lt;br /&gt;
elisa3.upload.maximum_size=258048&lt;br /&gt;
elisa3.upload.speed=57600&lt;br /&gt;
	&lt;br /&gt;
elisa3.bootloader.low_fuses=0xE2&lt;br /&gt;
elisa3.bootloader.high_fuses=0xD0&lt;br /&gt;
elisa3.bootloader.extended_fuses=0xFF&lt;br /&gt;
elisa3.bootloader.path=stk500v2-elisa3&lt;br /&gt;
elisa3.bootloader.file=stk500v2-elisa3.hex&lt;br /&gt;
elisa3.bootloader.unlock_bits=0x3F&lt;br /&gt;
elisa3.bootloader.lock_bits=0x0F					&lt;br /&gt;
&lt;br /&gt;
elisa3.build.mcu=atmega2560&lt;br /&gt;
elisa3.build.f_cpu=8000000L&lt;br /&gt;
elisa3.build.board=AVR_ELISA3&lt;br /&gt;
elisa3.build.core=arduino&lt;br /&gt;
elisa3.build.variant=mega&lt;br /&gt;
&lt;br /&gt;
##############################################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*4. this step need to be performed only with later IDE versions, when you receive a warning like this &amp;lt;code&amp;gt;Bootloader file specified but missing...&amp;lt;/code&amp;gt; during compilation.&amp;lt;br/&amp;gt; In this case place the bootloader hex file (&amp;lt;code&amp;gt;stk500v2.hex&amp;lt;/code&amp;gt;) you can find in the [https://www.gctronic.com/doc/index.php/Elisa-3#Bootloader Bootloader section] in the directory &amp;lt;code&amp;gt;arduino-1.x\Arduino\hardware\arduino\avr\bootloaders\&amp;lt;/code&amp;gt; and name it &amp;lt;code&amp;gt;stk500v2-elisa3.hex&amp;lt;/code&amp;gt;&lt;br /&gt;
*5. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_project_02.03.21_d2c017e.zip Elisa-3 project file] and open it with the Arduino IDE (you should open the file &amp;quot;&#039;&#039;elisa3.ino&#039;&#039;&amp;quot;)&lt;br /&gt;
*6. select &amp;lt;code&amp;gt;Elisa-3 robot&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;Tools=&amp;gt;Board&amp;lt;/code&amp;gt; menu; click on the &amp;lt;code&amp;gt;Verify&amp;lt;/code&amp;gt; button to build the project&lt;br /&gt;
*7. turn on the robot, attach the micro USB and wait the blinks terminate.&amp;lt;br/&amp;gt; &lt;br /&gt;
&amp;lt;!-- : Only for Windows users: open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot); the robot should blink again, if this is not the case try again the command.--&amp;gt;&lt;br /&gt;
*8. to upload the resulting hex file, from the Arduino IDE set the port from the &amp;lt;code&amp;gt;Tools=&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu consequently; click on the &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt; button&lt;br /&gt;
: Only for Windows users: before clicking on &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt;, open the serial monitor from the Arduino IDE (&amp;lt;code&amp;gt;Tools =&amp;gt; Serial Monitor&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ctrl+Shift+M&amp;lt;/code&amp;gt;), the robot should then blink again; keep the serial monitor opened.&lt;br /&gt;
&amp;lt;!-- : &#039;&#039;Windows users&#039;&#039;: if you have problems in uploading the firmware, try opening a command prompt and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com62: dtr=on&amp;lt;/code&amp;gt; (beware to change serial port number according to your system) before uploading from the Arduino IDE.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/arduino-1.0.5-linux32.zip arduino-1.0.5-linux32.zip]. &amp;lt;br/&amp;gt;&lt;br /&gt;
If the &amp;lt;code&amp;gt;Tools-&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu is grayed out then you need to start the Arduino IDE in a terminal typing &amp;lt;code&amp;gt;sudo path/to/arduino&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to have access to the compiler options you can download the following project [https://projects.gctronic.com/elisa3/Elisa3-arduino-makefile.zip Elisa3-arduino-makefile.zip] that contains an Arduino IDE project with a Makefile, follow the instructions in the &amp;quot;readme.txt&amp;quot; file in order to build and upload to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Aseba===&lt;br /&gt;
Refer to the page [{{fullurl:Elisa-3 Aseba}} Elisa-3 Aseba].&lt;br /&gt;
&lt;br /&gt;
===Matlab===&lt;br /&gt;
[[File:elisa3-matlab.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.e-puck.org/index.php?option=com_content&amp;amp;view=article&amp;amp;id=29&amp;amp;Itemid=27 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:&lt;br /&gt;
# program the robot with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced demo]&lt;br /&gt;
# place the selector in position 15 (to pilot the robot through the interface with no obstacle and no cliff avoidance)&lt;br /&gt;
# connect the radio base-station to the computer&lt;br /&gt;
# download the ePic2 for Elisa-3 from the repository [https://github.com/gctronic/elisa3_epic.git https://github.com/gctronic/elisa3_epic.git]: either from github site clicking on &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt;=&amp;gt;&amp;lt;code&amp;gt;Download ZIP&amp;lt;/code&amp;gt; or by issueing the command &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_epic.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# open (double click) the file &#039;&#039;main.m&#039;&#039;; once Matlab is ready type &#039;&#039;main+ENTER&#039;&#039; and the GUI should start&lt;br /&gt;
# click on the &#039;&#039;+&#039;&#039; sign (top left) and insert the robot address (e.g 3307), then click on &#039;&#039;Connect&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Webots simulator===&lt;br /&gt;
[[File:Elisa-3-webots.png|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The following features have been included in the Elisa-3 model for the [https://www.cyberbotics.com/ Webots simulator]:&lt;br /&gt;
* proximity sensors&lt;br /&gt;
* ground sensors&lt;br /&gt;
* accelerometer&lt;br /&gt;
* motors&lt;br /&gt;
* green leds around the robot&lt;br /&gt;
* RGB led&lt;br /&gt;
* radio communication&lt;br /&gt;
&lt;br /&gt;
You can donwload the Webots project containig the Elisa-3 model (proto) and a demonstration world in the following link [https://projects.gctronic.com/elisa3/Elisa-3-webots.zip Elisa-3-webots.zip].&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/Elisa-3-webots-radio.zip Elisa-3-webots-radio.zip]. Here is a video of this demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|IEgCo3XSESU}}&lt;br /&gt;
&lt;br /&gt;
===Onboard behaviors===&lt;br /&gt;
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).&lt;br /&gt;
The following videos show three robots that have their obstacle avoidance enabled:{{#ev:youtube|EbroxwWG-x4}} {{#ev:youtube|q6IRWRlTQeQ}}&lt;br /&gt;
&lt;br /&gt;
===Programming===&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-programming.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are working with the Arduino IDE you don&#039;t need to follow this procedure, refer instead to section [https://www.gctronic.com/doc/index.php/Elisa-3#Arduino_IDE_project Arduino IDE project].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows 7====&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR-Burn-O-Mat-Windows7.zip Windows 7 package] and extract it. The package contains also the FTDI driver. Beware that starting from robot id 4000 the USB driver might be different, refer to section [https://www.gctronic.com/doc/index.php?title=Elisa-3#Requirements Requirements], so you need to install it manually in case it isn&#039;t an FTDI chip.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.bat&amp;lt;/code&amp;gt; and follow the installation; beware that this need to be done only once. The script will ask you to modify the registry, this is fine (used to save application preferences).&lt;br /&gt;
# Connect the robot to the computer; the COM port will be created.&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer (e.g. COM10); then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, connect the USB cable to the computer and wait the blinks terminate. Then open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot). The robot should blink again, if this is not the case then try again the command.&lt;br /&gt;
# From the &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt; interface, click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&amp;lt;br/&amp;gt; If you get an &amp;lt;code&amp;gt;Access is denied&amp;lt;/code&amp;gt; error, then run &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt; as administrator.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
The following procedure is tested in Max OS X 10.10, but should work from Mac OS X 10.9 onwards; in these versions there is built-in support for the FTDI devices.&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR8-Burn-O-Mat-MacOsX.zip Mac OS X package] and extract it.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.sh&amp;lt;/code&amp;gt; in the terminal, it will ask you to install the Java Runtime Environment; in case there is a problem executing the script try with &amp;lt;code&amp;gt;chmod +x config.sh&amp;lt;/code&amp;gt; and try again. Beware that this need to be done only once.&lt;br /&gt;
# Connect the robot to the computer; the serial device will be created (something like &amp;lt;code&amp;gt;/dev/tty.usbserial-AJ03296J&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer; then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
The following procedure was tested in Ubunut 12.04, but a similar procedure can be followed in newer systems and other Linux versions.&amp;lt;br/&amp;gt;&lt;br /&gt;
You can find a nice GUI for &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; in the following link [https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php]; you can download directly the application for Ubuntu from the following link [https://projects.gctronic.com/elisa3/programming/avr8-burn-o-mat-2.1.2-all.deb avr8-burn-o-mat-2.1.2-all.deb].&amp;lt;br/&amp;gt;&lt;br /&gt;
Double click the package and install it; the executable will be &amp;lt;code&amp;gt;avr8-burn-o-mat&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that the application requires the Java SE Runtime Environment (JRE) that you can download from the official page [https://www.oracle.com/technetwork/java/javase/downloads/index.html https://www.oracle.com/technetwork/java/javase/downloads/index.html], alternatively you can issue the command &amp;lt;code&amp;gt;sudo apt-get install openjdk-8-jre&amp;lt;/code&amp;gt; in the terminal.&lt;br /&gt;
&lt;br /&gt;
The application need a bit of configuration, follow these steps:&lt;br /&gt;
:1. connect the robot to the computer, the serial device will be created (something like /dev/USB0)&lt;br /&gt;
:2. to use the USB port the permissions need to be set to read and write issueing the command &amp;lt;code&amp;gt;sudo chmod a+rw /dev/ttyUSB0&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. start the application and click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. set the location of &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; and the related configuration file (refer to the previous section when &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; was installed to know the exact location); the configuration file is in &amp;lt;code&amp;gt;/etc/avrdude.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;, close the application and open it again (this is needed to load the configuration file information); click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. select &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;Programmer&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. set the serial port connected to the robot (&amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;)&lt;br /&gt;
:6. in &amp;lt;code&amp;gt;additional options&amp;lt;/code&amp;gt; insert &amp;lt;code&amp;gt;-b 57600&amp;lt;/code&amp;gt;, you will end up with a window like the following one:&lt;br /&gt;
[[File:avrdude-gui.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
:7. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;; select &amp;lt;code&amp;gt;ATmega2560&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;AVR type&amp;lt;/code&amp;gt;&lt;br /&gt;
:8. in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot; select &amp;lt;code&amp;gt;Intel Hex&amp;lt;/code&amp;gt; on the right&lt;br /&gt;
:9. connect the robot to the computer, turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section&lt;br /&gt;
:10. during the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Command line====&lt;br /&gt;
The [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility is used to do the upload, you can download it directly from the following links depending on your system:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/WinAVR-20100110-install.exe Windows (tested on Windows 7 and 10)]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;C:\WinAVR-20100110\bin\avrdude&amp;lt;/code&amp;gt;; avrdude version 5.10&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/CrossPack-AVR-20131216.dmg Mac OS X]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/local/CrossPack-AVR/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 6.0.1&lt;br /&gt;
* Ubuntu (12.04 32-bit): issue the command &amp;lt;code&amp;gt;sudo apt-get install avrdude&amp;lt;/code&amp;gt; in the terminal; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 5.11.1&lt;br /&gt;
&lt;br /&gt;
Open a terminal and issue the following commands:&lt;br /&gt;
# only for windows users: &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt;. You should see the robot blink (blue), if this is not the case try again the command.&lt;br /&gt;
# &amp;lt;code&amp;gt;avrdude -p m2560 -P COM10 -b 57600 -c stk500v2 -D -Uflash:w:Elisa3-avr-studio.hex:i -v&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;COM10&amp;lt;/code&amp;gt; must be replaced with your com port and &amp;lt;code&amp;gt;Elisa3-avr-studio.hex&amp;lt;/code&amp;gt; must be replaced with your application name; in Mac OS X the port will be something like &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;, in Ubuntu will be &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Basic_demo Basic demo] and [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo Advanced demo] have this command contained in the file &amp;lt;code&amp;gt;program.bat&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; directory within the project, this can be useful for Windows users.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Internal EEPROM===&lt;br /&gt;
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).&amp;lt;br/&amp;gt; &lt;br /&gt;
Moreover the address 4093 is used to save the clock calibration value that is found during production/testing of the robots; this value hasn&#039;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 [https://projects.gctronic.com/elisa3/AVR053-Calibration-RC-oscillator.pdf AVR053: Calibration of the internal RC oscillator].&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;The size of usable EEPROM is thus 3946 bytes (0-3945) and the remaining memory must not be modified/erased.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility the following command has to be issued:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
avrdude -p m2560 -c usbtiny -v -U eeprom:w:Elisa3-eeprom.hex:i -v -B 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where &#039;&#039;Elisa3-eeprom.hex&#039;&#039; is the EEPROM memory saved as Intel Hex format ([https://projects.gctronic.com/elisa3/Elisa3-eeprom.hex eeprom example]); a possible tool to read and write Intel Hex format is [https://projects.gctronic.com/elisa3/G32setup_12004-intel-hex-editor.exe Galep32 from Conitec Datensysteme].&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively a program designed to writing to these EEPROM locations can be uploaded to the robot, in case an AVR programmer isn&#039;t available. The project source is available in the repository [https://github.com/gctronic/elisa3_eeprom.git https://github.com/gctronic/elisa3_eeprom.git]; it is simply needed to modify the address, rebuild and upload to the robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
Another option is to use the following Python script [https://projects.gctronic.com/elisa3/write_radio_address.py write_radio_address.py], the procedure would be:&lt;br /&gt;
# program the robot with the factory firmware&lt;br /&gt;
# put selector in position 6&lt;br /&gt;
# connect the robot to the computer via USB cable&lt;br /&gt;
# set the correct serial port and address in the script&lt;br /&gt;
# run the script&lt;br /&gt;
After a power-cycle the new address can be used.&lt;br /&gt;
&lt;br /&gt;
===Bootloader===&lt;br /&gt;
In case the bootloader of the Elisa-3 is erased by mistake, then you can restore it by using an AVR programmer. You can download the bootloader from here [https://projects.gctronic.com/elisa3/stk500v2_20.03.18_13b46ce.hex stk500v2.hex]; the source code is available from the repository [https://github.com/gctronic/elisa3_bootloader.git https://github.com/gctronic/elisa3_bootloader.git].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Avrdude&amp;lt;/code&amp;gt; can be used to actually write the bootloader to the robot with a command similar to the following one:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;avrdude -p m2560 -c stk500v2 -P COM348 -v -U lfuse:w:0xE2:m -U hfuse:w:0xD8:m -U efuse:w:0xFF:m -V -U flash:w:stk500v2.hex:i -v -B 2&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Here we used a programmer recognized as a serial device (port COM348) that utilizes the &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; protocol.&lt;br /&gt;
&lt;br /&gt;
==Base-station==&lt;br /&gt;
This chapter explains informations that aren&#039;t needed for most of the users since the radio module is ready to be used and don&#039;t need to be reprogrammed. Only if you are interested in the firmware running in the radio module and on how to reprogram it then refer to section [https://www.gctronic.com/doc/index.php/Elisa#Base-station https://www.gctronic.com/doc/index.php/Elisa#Base-station] (chapter 4.2) of the Elisa robot wiki.&lt;br /&gt;
&lt;br /&gt;
==PC side==&lt;br /&gt;
This section gives informations related to the radio module connected to the computer; if you don&#039;t have a radio module you can skip this section.&lt;br /&gt;
===Requirements===&lt;br /&gt;
Refer to the section [https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver].&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station 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.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library is available in the repository [https://github.com/gctronic/elisa3_remote_library https://github.com/gctronic/elisa3_remote_library]; follow the instructions in the repository to build the library.&lt;br /&gt;
&lt;br /&gt;
===Multiplatform monitor===&lt;br /&gt;
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. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following figures show the monitor on the left and the available commands on the right. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Cmd-line-monitor.jpg|400px]] [[File:Pc-side-commands2.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_monitor https://github.com/gctronic/elisa3_remote_monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
Execution:&lt;br /&gt;
* install the driver contained in the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio 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&lt;br /&gt;
* once the driver is installed, the pre-compiled &amp;quot;exe&amp;quot; (under &amp;lt;code&amp;gt;\bin\Release&amp;lt;/code&amp;gt; dir) should run without problems; the program will prompt you the address of the robot you want to control&lt;br /&gt;
&lt;br /&gt;
Compilation:&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Elisa-3 demo (parent dir)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_library&amp;lt;/code&amp;gt; (Elisa-3 library project)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_monitor&amp;lt;/code&amp;gt; (current project)&lt;br /&gt;
&lt;br /&gt;
====Linux / Mac OS X====&lt;br /&gt;
The project was tested to work also in Ubuntu and Mac OS X (no driver required). &amp;lt;br/&amp;gt;&lt;br /&gt;
Compilation:&lt;br /&gt;
* you need to put this project within the same directory of the Elisa-3 library&lt;br /&gt;
* build command: go under &amp;quot;linux&amp;quot; dir and type &amp;lt;code&amp;gt;make clean &amp;amp;&amp;amp; make&amp;lt;/code&amp;gt;&lt;br /&gt;
Execution:&lt;br /&gt;
* &amp;lt;code&amp;gt;sudo ./main&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Communicate with 4 robots simultaneously===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_multiple https://github.com/gctronic/elisa3_remote_multiple]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
===Obstacle avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;obstacle avoidance&#039;&#039; 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 &amp;quot;intelligence&amp;quot; onboard. The demo uses the information gathered from the 3 front proximity sensors and set the motors speed accordingly; moreover the RGB LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|F_b1TQxZKos}}&lt;br /&gt;
&lt;br /&gt;
It is available also the same example but with 4 robots controlled simultaneously; the source can be downloaded from the branch &amp;lt;code&amp;gt;4robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]&amp;lt;br/&amp;gt;&lt;br /&gt;
It is easy to extend the previous example in order to control many robots, the code that controls 8 robots simultaneously can be downloaded from the branch &amp;lt;code&amp;gt;8robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa].&lt;br /&gt;
&lt;br /&gt;
===Cliff avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;cliff avoidance&#039;&#039; behavior controlling the robot from the pc through the radio; as with the &#039;&#039;obstacle avoidance&#039;&#039; 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 LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_cliff https://github.com/gctronic/elisa3_remote_cliff]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|uHy-9XXAHcs}}&lt;br /&gt;
===Communication between robots via PC===&lt;br /&gt;
This examples shows how to emulate direct communication between robots: basically a common state is shared between the robots and this state is changed based on the current state of each robot; it emulates the facts that each robot propagates its state to all other robots. Actually all the robots communicate only with the computer (only one computer with only one radio module) and the computer forward the information to all the others robots; the radio is fast enough so that the computer in the middle will not slow down the communication. A big advantage passing from the computer is that you can log the communication messages on the computer and see what is happening.&amp;lt;br/&amp;gt;&lt;br /&gt;
In particular in this demo a total of 4 robots are handled and when a robot crosses a black line, then it inform all others robots to change their color. The source can be downloaded from the repository [https://github.com/gctronic/elisa3_communication_between_robots_via_pc https://github.com/gctronic/elisa3_communication_between_robots_via_pc]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|4tpxoAyWfEA}}&lt;br /&gt;
&lt;br /&gt;
===Set robots state from file===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_file https://github.com/gctronic/elisa3_remote_file]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 Python library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station is connected) that will take control of the robots and receive data from them.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library and some usage examples are available in the repository [https://github.com/gctronic/elisa3_remote_library_python https://github.com/gctronic/elisa3_remote_library_python].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Odometry=&lt;br /&gt;
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 ;-)&amp;lt;br/&amp;gt;&lt;br /&gt;
A fine calibration of the right and left wheel speed parameters might give better results.&lt;br /&gt;
However the current odometry is a good estimate of the absolute position from a starting point.&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:odometry-vertical.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Details about the code can be found in the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced-demo] project, in particular the &#039;&#039;motors.c&#039;&#039; source file. The PC application used for logging data is the [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor].&lt;br /&gt;
==Autonomous calibration==&lt;br /&gt;
Since the motors can be slightly different a calibration can improve the behavior of the robot in terms of maneuverability and odometry accuracy.&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/calibration-sheet.pdf calibration-sheet.pdf]. &amp;lt;br/&amp;gt;&lt;br /&gt;
In order to accomplish the calibration the robot need to be programmed with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor application] in which the letter &#039;&#039;l (el)&#039;&#039; is reserved to launch the calibration, otherwise if you have a TV remote control you can press the button &#039;&#039;5&#039;&#039;.&lt;br /&gt;
The sequence is the following:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. put the selector in position 8&amp;lt;br/&amp;gt;&lt;br /&gt;
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&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-1.jpg|300px]] [[File:elisa3-calibration-2.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
3. once the robot is placed  you can type the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;); 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&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-3.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
5. once the robot is placed you can type again the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;)&amp;lt;br/&amp;gt;&lt;br /&gt;
6. when the robot finish, the calibration process is also terminated.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The previous figures show a robot without the top diffuser, anyway you don&#039;t need to remove it!&lt;br /&gt;
&lt;br /&gt;
=Tracking=&lt;br /&gt;
==Assembly documentation==&lt;br /&gt;
You can download the documentation from here [https://projects.gctronic.com/elisa3/tracking-doc.pdf tracking-doc.pdf].&amp;lt;br/&amp;gt;&lt;br /&gt;
Have a look also at the video:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|92pz28hnteY}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwisTrack==&lt;br /&gt;
Some experiments are done with the [https://en.wikibooks.org/wiki/SwisTrack 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-3-tracking-2robots.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The pre-compiled SwisTrack software (Windows) can be downloaded from the following link [https://projects.gctronic.com/elisa3/SwisTrackEnvironment-10.04.13.zip SwisTrack-compiled]. &amp;lt;!--; it contains also the configuration for the Elisa-3 named &#039;&#039;elisa-3-usb.swistrack&#039;&#039;.&amp;lt;br/&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
We used the &#039;&#039;Trust Spotlight Pro&#039;&#039; webcam, removed the internal IR filter and placed an external filter that let trough the red-IR wavelength. This filter configuration eases the tracking of the robots. The camera parameters (brightness=-64, contrast=0, saturation=100, gamma=72, gain=0) where tuned to get the best possible results, if another camera would be used a similar tuning has to be done again.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the tracking of 5 robots:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|33lrIUux_0Q}}&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:swistrack-output.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the test done with 20, 30 and 38 Elisa-3 robots, the tracking is still good; it&#039;s important to notice that we stopped to 38 Elisa-3 robots because are the ones we have in our lab.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|5LAccIJ9Prs}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Position control==&lt;br /&gt;
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 &#039;&#039;8-shape&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|ACaGNEQHayc}}&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:tracking-8shape.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
All the following projects require the [https://www.gctronic.com/doc/index.php/Elisa-3#Elisa-3_library Elisa-3 library], for building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
* Horizontal position control (4 robots): the source code can be downloaded from [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-4-robots-rev245-15.01.21.zip position-control-pattern-horizontal-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Vertical position control (4 robots): [https://projects.gctronic.com/elisa3/position-control-pattern-vertical-4-robots-rev245-15.01.21.zip position-control-pattern-vertical-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Horizontal position control (1 robot): [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-1-robot-rev245-15.01.21.zip position-control-pattern-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Go to target point: [https://projects.gctronic.com/elisa3/position-control-goto-pos-horizontal-1-robot-rev245-15.01.21.zip position-control-goto-pos-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Utilities==&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/back-IR-on-4-robots-rev245-15.01.21.zip back-IR-on-4-robots-rev245-15.01.21.zip] is an example that turn on the back IR of 4 robots, their addresses are asked to the user at the execution.&lt;br /&gt;
&lt;br /&gt;
=Local communication=&lt;br /&gt;
{{#ev:youtube|7bxIR0Z3q3M}}&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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. &amp;lt;br/&amp;gt;&lt;br /&gt;
Here are some details about the current implementation of the communication module:&lt;br /&gt;
* 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&lt;br /&gt;
* bidirectional communication&lt;br /&gt;
* id and angle of the proximity sensor that received the data are available&lt;br /&gt;
* the throughput is about 1 bytes/sec&lt;br /&gt;
* maximum communication distance is about 5 cm&lt;br /&gt;
* no reception/transmission queue (only one byte at a time)&lt;br /&gt;
* the data are sent using all the sensors, cannot select a single sensor from which to send the data. The data isn&#039;t sent contemporaneously from all the sensors, but the sensors used are divided in two groups of 4 alternating sensors (to reduce consumption)&lt;br /&gt;
== Clustering example==&lt;br /&gt;
In this demo there are &amp;lt;b&amp;gt;37&amp;lt;/b&amp;gt; elisa-3 robots programmed with a special firmware that you can download here [https://projects.gctronic.com/elisa3/elisa3_cluster_firmware.hex elisa3_cluster_firmware.hex]; the source code is available in the repo [https://github.com/gctronic/elisa3_cluster_firmware https://github.com/gctronic/elisa3_cluster_firmware].&amp;lt;br/&amp;gt;&lt;br /&gt;
The robots will try to form some clusters by exchanging data through the local communication and at the same time exchange data with a central computer: they send their status (in cluster or not) and receive a new color when in cluster. &lt;br /&gt;
The application running on the computer side is available in the repo [https://github.com/gctronic/elisa3_cluster_pc https://github.com/gctronic/elisa3_cluster_pc].&amp;lt;br/&amp;gt;&lt;br /&gt;
Here is a video of the demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|MOuSfr1_3lg}}&lt;br /&gt;
&lt;br /&gt;
=ROS=&lt;br /&gt;
This chapter explains how to use ROS with the elisa-3 robots; the radio module is needed here. 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-schema.png|450px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all you need to install and configure ROS, refer to [https://wiki.ros.org/Distributions https://wiki.ros.org/Distributions] for more informations. Alternatively you can download directly a virtual machine pre-installed with everything you need, refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Virtual_machine virtual machine]; this is the preferred way. &lt;br /&gt;
:*&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; This tutorial is based on ROS Hydro&amp;lt;/font&amp;gt;. The same instructions are working with ROS Noetic, beware to use &amp;lt;code&amp;gt;noetic&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; when installing the packages. &lt;br /&gt;
:* If you downloaded the pre-installed VM you can go directly to section [https://www.gctronic.com/doc/index.php/Elisa-3#Running_the_ROS_node Running the ROS node].&lt;br /&gt;
&lt;br /&gt;
The ROS elisa-3 node based on roscpp can be found in the following repository [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Initial configuration==&lt;br /&gt;
The following steps need to be done only once after installing ROS:&lt;br /&gt;
:1. If not already done, create a catkin workspace, refer to [https://wiki.ros.org/catkin/Tutorials/create_a_workspace https://wiki.ros.org/catkin/Tutorials/create_a_workspace]. Basically you need to issue the following commands:  &lt;br /&gt;
&amp;lt;pre&amp;gt;  mkdir -p ~/catkin_ws/src&lt;br /&gt;
  cd ~/catkin_ws/src&lt;br /&gt;
  catkin_init_workspace&lt;br /&gt;
  cd ~/catkin_ws/&lt;br /&gt;
  catkin_make&lt;br /&gt;
  source devel/setup.bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
:2. You will need to add the line &amp;lt;code&amp;gt;source ~/catkin_ws/devel/setup.bash&amp;lt;/code&amp;gt; to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; in order to automatically have access to the ROS commands when the system is started&lt;br /&gt;
:3. Clone the elisa-3 ROS node repo from [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] inside the catkin workspace source folder (&amp;lt;tt&amp;gt;~/catkin_ws/src&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_node_cpp.git&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. Install the dependencies:&lt;br /&gt;
:ROS:&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-slam-gmapping&amp;lt;/code&amp;gt;&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-imu-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are using a newer version of ROS, replace &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; with your distribution name.&lt;br /&gt;
:cpp:&lt;br /&gt;
::* install OpenCV: &amp;lt;code&amp;gt;sudo apt-get install libopencv-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are working with OpenCV 4, then you need to change the header include from &amp;lt;code&amp;gt;#include &amp;lt;opencv/cv.h&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;#include &amp;lt;opencv2/opencv.hpp&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. Rebuild the &amp;lt;code&amp;gt;elisa-3 library&amp;lt;/code&amp;gt;: go to &amp;lt;code&amp;gt;~/catkin_ws/src/elisa3_node_cpp/src/pc-side-elisa3-library/linux&amp;lt;/code&amp;gt;, then issue &amp;lt;code&amp;gt;make clean&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
:6. Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;, there shouldn&#039;t be errors&lt;br /&gt;
: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 &amp;lt;tt&amp;gt;udev rules&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
:* plug in the radio and issue the command &amp;lt;tt&amp;gt;lsusb&amp;lt;/tt&amp;gt;, you&#039;ll get the list of USB devices attached to the computer, included the radio:&lt;br /&gt;
::&amp;lt;tt&amp;gt;Bus 002 Device 003: ID 1915:0101 Nordic Semiconductor ASA&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* issue the command &amp;lt;tt&amp;gt;udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/003)&amp;lt;/tt&amp;gt;, beware to change the bus according to the result of the previous command. You&#039;ll receive a long output showing all the informations regarding the USB device, the one we&#039;re interested is the &amp;lt;tt&amp;gt;product attribute&amp;lt;/tt&amp;gt;:&lt;br /&gt;
::&amp;lt;tt&amp;gt;ATTR{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
:* in the udev rules file you can find in &amp;lt;tt&amp;gt;/etc/udev/rules.d/name.rules&amp;lt;/tt&amp;gt; add the following string changing the &amp;lt;tt&amp;gt;GROUP&amp;lt;/tt&amp;gt; field with your current user group:&lt;br /&gt;
::&amp;lt;tt&amp;gt;SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;, GROUP=&amp;quot;viki&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
:: To know which groups your user belongs to issue the command &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* disconnect and reconnect the radio module&lt;br /&gt;
:8. Program the elisa-3 robot with the last [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced firmware] (&amp;gt;= rev.221) and put the selector in position 15&lt;br /&gt;
&lt;br /&gt;
==Running the ROS node==&lt;br /&gt;
First of all get the last version of the elisa-3 ROS node from github:&lt;br /&gt;
* clone the repo [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] and copy the &amp;lt;tt&amp;gt;elisa3_node_cpp&amp;lt;/tt&amp;gt; directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)&lt;br /&gt;
* build the driver by opening a terminal and issueing the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt; from within the catkin workspace directory (e.g. ~/catkin_ws).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start the ROS node, for this purposes there is a launch script (based on [https://wiki.ros.org/roslaunch roslaunch]), as explained in the following section. Before starting the ROS node you need to start &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;, open another terminal tab and issue the command &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Single robot===&lt;br /&gt;
Open a terminal and issue the following command: &amp;lt;code&amp;gt;roslaunch elisa3_node_cpp elisa3_single.launch elisa3_address:=&#039;1234&#039;&amp;lt;/code&amp;gt; where &amp;lt;tt&amp;gt;1234&amp;lt;/tt&amp;gt; is the robot id (number on the bottom).&lt;br /&gt;
&lt;br /&gt;
If all is going well [https://wiki.ros.org/rviz/UserGuide rviz] will be opened showing the informations gathered from the topics published by the elisa ROS node as shown in the following figure: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-single-robot.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The launch script is configured also to run the [https://wiki.ros.org/gmapping 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|v=k_9nmEO2zqE}}&lt;br /&gt;
&lt;br /&gt;
==Move the robot==&lt;br /&gt;
You have two options to move the robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is to use the &amp;lt;code&amp;gt;rviz&amp;lt;/code&amp;gt; interface: in the bottom left side of the interface there is a &amp;lt;code&amp;gt;Teleop&amp;lt;/code&amp;gt; panel containing an &#039;&#039;interactive square&#039;&#039; meant to be used with differential drive robots. By clicking in this square you&#039;ll move the robot, for instance by clicking on the top-right section, then the robot will move forward-right.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-teleop.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second method is by directly publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic, for instance by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[0.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 1.0]&#039;&amp;lt;/code&amp;gt; the robot will rotate on the spot, instead by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[4.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 0.0]&#039;&amp;lt;/code&amp;gt; the robot will move straight forward.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that there shouldn&#039;t be any other node publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic (e.g. Rviz), otherwise your commands will be overwritten.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Robot state publisher===&lt;br /&gt;
If you get an error similar to the following when you start a node with roslaunch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: Cannot locate node of type [state_publisher] in package [robot_state_publisher]. Make sure file exists in package path and permission is set to executable (chmod +x)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you need to change the launch file from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;robot_state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is due to the fact that &amp;lt;code&amp;gt;state_publisher&amp;lt;/code&amp;gt; was a deprecated alias for the node named &amp;lt;code&amp;gt;robot_state_publisher&amp;lt;/code&amp;gt; (see [https://github.com/ros/robot_state_publisher/pull/87 https://github.com/ros/robot_state_publisher/pull/87]).&lt;br /&gt;
&lt;br /&gt;
==Virtual machine==&lt;br /&gt;
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 &#039;&#039;open virtualization format&#039;&#039; from the following link [https://projects.gctronic.com/VM/ROS-Hydro-12.04.ova ROS-Hydro-12.04.ova] (based on the VM from https://nootrix.com/2014/04/virtualized-ros-hydro/); you can then use [https://www.virtualbox.org/ VirtualBox] to import the file and automatically create the virtual machine. Some details about the system:&lt;br /&gt;
* user: gctronic, pw: gctronic&lt;br /&gt;
* Ubuntu 12.04.4 LTS (32 bits)&lt;br /&gt;
* ROS Hydro installed&lt;br /&gt;
* [https://www.cyberbotics.com/ Webots] 8.0.5 is installed (last version available for 32 bits linux)&lt;br /&gt;
* [https://git-cola.github.io/ git-cola] (git interface) is installed&lt;br /&gt;
* the &amp;lt;tt&amp;gt;catkin workspace&amp;lt;/tt&amp;gt; is placed in the desktop&lt;br /&gt;
&lt;br /&gt;
=Videos=&lt;br /&gt;
==Autonomous charge==&lt;br /&gt;
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.&lt;br /&gt;
{{#ev:youtube|o--FM8zIrRk}}{{#ev:youtube|Ib9WdbwMlyQ}}{{#ev:youtube|xsOdxwOjmuI}}{{#ev:youtube|tprO126R9iA}}{{#ev:youtube|HVYp1Eujof8}}{{#ev:youtube|mtJd8jTWT94}}&lt;br /&gt;
==Remote control==&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|WDxfIFhpm1g}}&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3210</id>
		<title>Elisa-3</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=Elisa-3&amp;diff=3210"/>
		<updated>2026-04-22T13:47:47Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:elisa3]]&lt;br /&gt;
[[Category:all]]&lt;br /&gt;
=Overview=&lt;br /&gt;
[[File:Elisa3_and_charger.JPG|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Elisa-3 is an evolution of the [https://www.gctronic.com/doc/index.php/Elisa Elisa] robot based on a different microcontroller and including a comprehensive set of sensors:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/atmega640-1280-1281-2560-2561_datasheet.pdf Atmel 2560] microcontroller (Arduino compatible)&lt;br /&gt;
* central RGB led&lt;br /&gt;
* 8 green leds around the robot&lt;br /&gt;
* IRs emitters&lt;br /&gt;
* 8 IR proximity sensors ([https://projects.gctronic.com/elisa3/tcrt1000.pdf Vishay Semiconductors Reflective Optical Sensor])&lt;br /&gt;
* 4 ground sensors ([https://projects.gctronic.com/elisa3/QRE1113-D.PDF Fairchild Semiconductor Minature Reflective Object Sensor])&lt;br /&gt;
* 3-axis accelerometer ([https://projects.gctronic.com/elisa3/MMA7455L.pdf Freescale MMA7455L])&lt;br /&gt;
* RF radio for communication ([https://www.nordicsemi.com/kor/Products/2.4GHz-RF/nRF24L01P Nordic Semiconductor nRF24L01+])&lt;br /&gt;
* micro USB connector for programming, debugging and charging&lt;br /&gt;
* IR receiver&lt;br /&gt;
* 2 DC motors&lt;br /&gt;
* top light diffuser&lt;br /&gt;
* selector&lt;br /&gt;
The robot is able to self charge using the charger station, as shown in the previous figure. The following figure illustrates the position of the various sensors: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-mainComp-digital-white.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Useful information==&lt;br /&gt;
* the top light diffuser and robot are designed to lock together, but the diffuser isn&#039;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.&lt;br /&gt;
[[File:Diffuser-pull-up.jpg|200px]] [[File:Diffuser-push-down.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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:&lt;br /&gt;
[[File:selector-tweezers.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
* 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.&lt;br /&gt;
[[File:Antenna-position.jpg|200px]] [[File:Antenna-diffuser.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Robot charging==&lt;br /&gt;
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:&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-charger-out.jpg|300px]] [[File:Elisa3-charger-in.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The microcontroller is informed when the robot is in charge and this information is also transferred to the PC in the &#039;&#039;flags&#039;&#039; 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Communication Communication].&lt;br /&gt;
&lt;br /&gt;
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.&lt;br /&gt;
&lt;br /&gt;
The following video shows the Elisa-3 piloted through the radio to the charging station using the monitor application: {{#ev:youtube|kjliXlQcgzw}}&lt;br /&gt;
&lt;br /&gt;
==Top light diffuser==&lt;br /&gt;
From February 2013 onwards 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-new-case.jpg|350px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Hardware=&lt;br /&gt;
The following figures show the main components offered by the Elisa-3 robot and where they are physically placed: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-hw-schema-top.jpg|550px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3-hw-schema-bottom3.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Power autonomy==&lt;br /&gt;
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).&lt;br /&gt;
[[File:Power-autonomy.jpg|800px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Detailed specifications==&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|&#039;&#039;&#039;Feature&#039;&#039;&#039;&lt;br /&gt;
|&#039;&#039;&#039;Technical information&#039;&#039;&#039;&lt;br /&gt;
|- &lt;br /&gt;
|Size, weight&lt;br /&gt;
|50 mm diameter, 30 mm height, 39 g&lt;br /&gt;
|-&lt;br /&gt;
|Battery, autonomy&lt;br /&gt;
|LiIPo rechargeable battery (2 x 130 mAh, 3.7 V). About 3 hours autonomy. Recharging time about 1h e 30.&lt;br /&gt;
|-&lt;br /&gt;
|Processor&lt;br /&gt;
|Atmel ATmega2560 @ 8MHz (~ 8 MIPS); 8 bit microcontroller&lt;br /&gt;
|-&lt;br /&gt;
|Memory&lt;br /&gt;
|RAM: 8 KB; Flash: 256 KB; EEPROM: 4 KB&lt;br /&gt;
|-&lt;br /&gt;
|Motors&lt;br /&gt;
|2 DC motors with a 25:1 reduction gear; speed controlled with backEMF&lt;br /&gt;
|-&lt;br /&gt;
|Magnetic wheels&lt;br /&gt;
|Adesion force of about 1 N (100 g) depending on surface material and painting&amp;lt;br/&amp;gt; Wheels diamater = 9 mm &amp;lt;br/&amp;gt;Distance between wheels = 40.8 mm&lt;br /&gt;
|-&lt;br /&gt;
|Speed&lt;br /&gt;
|Max: 60 cm/s&lt;br /&gt;
|-&lt;br /&gt;
|Mechanical structure&lt;br /&gt;
|PCB, motors holder, top white plastic to diffuse light&lt;br /&gt;
|-&lt;br /&gt;
|IR sensors&lt;br /&gt;
|8 infra-red sensors measuring ambient light and proximity of objects up to 6 cm; each sensor is 45° away from each other &amp;lt;br/&amp;gt; 4 ground sensors detecting the end of the viable surface (placed on the front-side of the robot)&lt;br /&gt;
|-&lt;br /&gt;
| IR emitters&lt;br /&gt;
| 3 IR emitters (2 on front-side, 1 on back-side of the robot) &lt;br /&gt;
|-&lt;br /&gt;
|Accelerometer&lt;br /&gt;
|3D accelerometer along the X, Y and Z axis&lt;br /&gt;
|-&lt;br /&gt;
|LEDs&lt;br /&gt;
|1 RGB LED in the center of the robot; 8 green LEDs around the robot&lt;br /&gt;
|-&lt;br /&gt;
|Switch / selector&lt;br /&gt;
|16 position rotating switch&lt;br /&gt;
|-&lt;br /&gt;
|Communication&lt;br /&gt;
| Standard Serial Port (up to 38kbps)&amp;lt;br/&amp;gt; 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&lt;br /&gt;
|-&lt;br /&gt;
|Remote Control&lt;br /&gt;
|Infra-red receiver for standard remote control commands&lt;br /&gt;
|-&lt;br /&gt;
|Expansion bus&lt;br /&gt;
|Optional connectors: 2 x UART, I2C, 2 x PWM, battery, ground, analog and digital voltage&lt;br /&gt;
|-&lt;br /&gt;
|Programming&lt;br /&gt;
|C/C++ programming with the AVR-GCC compiler ([https://winavr.sourceforge.net/ WinAVR] for Windows). Free compiler and IDE (AVR Studio / Arduino)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Communication=&lt;br /&gt;
==Wireless==&lt;br /&gt;
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 ([https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRF24L01P nRF24L01+]) mounted on the robot communicates through SPI with the microcontroller and transfers data to and from the PC wirelessly.&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa-communication.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - PC to radio to robot===&lt;br /&gt;
The 13 bytes payload packet format is shown below (the number in the parenthesis expresses the bytes):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
| Command (1) &lt;br /&gt;
| Red led (1) &lt;br /&gt;
| Blue led (1) &lt;br /&gt;
| Green led (1) &lt;br /&gt;
| IR + Flags (1) &lt;br /&gt;
| Right motor (1) &lt;br /&gt;
| Left motor (1) &lt;br /&gt;
| Small green leds (1) &lt;br /&gt;
| Flags2 (1)&lt;br /&gt;
| Reserved (1)&lt;br /&gt;
| Remaining 4 bytes are unused &lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
* Command: 0x27 = change robot state; 0x28 = goto base-station bootloader (this byte is not sent to the robot)&lt;br /&gt;
* Red, Blue, Green leds: values from 0 (OFF) to 100 (ON max power)&lt;br /&gt;
* IR + flags:&lt;br /&gt;
** first two bits are dedicated to the IRs:&lt;br /&gt;
*** 0x00 =&amp;gt; all IRs off&lt;br /&gt;
*** 0x01 =&amp;gt; back IR on&lt;br /&gt;
*** 0x02 =&amp;gt; front IRs on&lt;br /&gt;
*** 0x03 =&amp;gt; all IRs on&lt;br /&gt;
** third bit is reserved for enabling/disabling IR remote control (0=&amp;gt;disabled, 1=&amp;gt;enabled)&lt;br /&gt;
** fourth bit is used for sleep (1 =&amp;gt; go to sleep for 1 minute)&lt;br /&gt;
** fifth bit is used to calibrate all sensors (proximity, ground, accelerometer) and reset odometry&lt;br /&gt;
** sixth bit is reserved (used by radio station)&lt;br /&gt;
** seventh bit is used for enabling/disabling onboard obstacle avoidance&lt;br /&gt;
** eight bit is used for enabling/disabling onboard cliff avoidance&lt;br /&gt;
* 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&lt;br /&gt;
* 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&lt;br /&gt;
* Flags2:&lt;br /&gt;
** bit0 is used for odometry calibration&lt;br /&gt;
** remaining bits unused&lt;br /&gt;
* Remaining bytes free to be used&lt;br /&gt;
&lt;br /&gt;
====Optimized protocol====&lt;br /&gt;
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.&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
- ack returned must be up to 16 bytes (max 64 bytes for the usb buffer); the same number of bytes returned by the robot as ack payload has to be read then by the pc!!&lt;br /&gt;
- la base-station ritorna &amp;quot;2&amp;quot; quando l&#039;ack non è stato ricevuto;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Packet format - robot to radio to PC===&lt;br /&gt;
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 &amp;quot;ack payload&amp;quot; feature of the radio module. Each &amp;quot;ack payload&amp;quot; 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):&lt;br /&gt;
{| border=&amp;quot;1&amp;quot;&lt;br /&gt;
|ID=3 (1)&lt;br /&gt;
|Prox0 (2)&lt;br /&gt;
|Prox1 (2)&lt;br /&gt;
|Prox2 (2)&lt;br /&gt;
|Prox3 (2)&lt;br /&gt;
|Prox5 (2)&lt;br /&gt;
|Prox6 (2)&lt;br /&gt;
|Prox7 (2)&lt;br /&gt;
|Flags (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=4 (1)&lt;br /&gt;
|Prox4 (2)&lt;br /&gt;
|Ground0 (2)&lt;br /&gt;
|Ground1 (2)&lt;br /&gt;
|Ground2 (2)&lt;br /&gt;
|Ground3 (2)&lt;br /&gt;
|AccX (2)&lt;br /&gt;
|AccY (2)&lt;br /&gt;
|TV remote (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=5 (1)&lt;br /&gt;
|ProxAmbient0 (2)&lt;br /&gt;
|ProxAmbient1 (2)&lt;br /&gt;
|ProxAmbient2 (2)&lt;br /&gt;
|ProxAmbient3 (2)&lt;br /&gt;
|ProxAmbient5 (2)&lt;br /&gt;
|ProxAmbient6 (2)&lt;br /&gt;
|ProxAmbient7 (2)&lt;br /&gt;
|Selector (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=6 (1)&lt;br /&gt;
|ProxAmbient4 (2)&lt;br /&gt;
|GroundAmbient0 (2)&lt;br /&gt;
|GroundAmbient1 (2)&lt;br /&gt;
|GroundAmbient2 (2)&lt;br /&gt;
|GroundAmbient3 (2)&lt;br /&gt;
|AccZ (2)&lt;br /&gt;
|Battery (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|-&lt;br /&gt;
|||||||||||||||||&lt;br /&gt;
|- &lt;br /&gt;
|ID=7 (1)&lt;br /&gt;
|LeftSteps (4)&lt;br /&gt;
|RightSteps (4)&lt;br /&gt;
|theta (2)&lt;br /&gt;
|xpos (2)&lt;br /&gt;
|ypos (2)&lt;br /&gt;
|Free (1)&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Pay attention that the base-station could return &amp;quot;error&amp;quot; codes in the first byte if the communication has problems:&lt;br /&gt;
* 0 =&amp;gt; transmission succeed (no ack received though)&lt;br /&gt;
* 1 =&amp;gt; ack received (should not be returned because if the ack is received, then the payload is read)&lt;br /&gt;
* 2 =&amp;gt; transfer failed&lt;br /&gt;
&lt;br /&gt;
Packet ID 3:&lt;br /&gt;
* Prox* contain values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* The &#039;&#039;Flags&#039;&#039; byte contains these information:&lt;br /&gt;
** bit0: 0 = robot not in charge; 1 = robot in charge&lt;br /&gt;
** bit1: 0 = button pressed; 1 = button not pressed&lt;br /&gt;
** bit2: 0 = robot not charged completely; 1 = robot charged completely&lt;br /&gt;
** the remainig bits are not used at the moment&lt;br /&gt;
&lt;br /&gt;
Packet ID 4:&lt;br /&gt;
* Prox4 contains values from 0 to 1023, the greater the values the nearer the objects to the sensor&lt;br /&gt;
* Ground* contain values from 512 to 1023, the smaller the value the darker the surface&lt;br /&gt;
* AccX and AccY contain raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* TV remote contains the last interpreted command received through IR&lt;br /&gt;
&lt;br /&gt;
Packet ID 5:&lt;br /&gt;
* ProxAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* Selector contains the value of the current selector position&lt;br /&gt;
&lt;br /&gt;
Packet ID 6:&lt;br /&gt;
* ProxAmbient4 contains values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* GroundAmbient* contain values from 0 to 1023, the smaller the values the brighter the ambient light&lt;br /&gt;
* AccZ contains raw values of the accelerometer; the range is between -128 and 128, sensitivity is +-2g&lt;br /&gt;
* Battery contains the sampled value of the battery, the values range is between 780 (battery discharged) and 930 (battery charged)&lt;br /&gt;
&lt;br /&gt;
Packet ID 7:&lt;br /&gt;
* LeftSteps and RightSteps contain the sum of the sampled speed for left and right motors respectively (only available when the speed controller isn&#039;t used; refer to xpos, ypos and theta when the speed controller is used)&lt;br /&gt;
* 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&lt;br /&gt;
* xpos and ypos contain the position of the robot expressed in millimeters; available only when the speed controller is enabled&lt;br /&gt;
&lt;br /&gt;
==USB cable==&lt;br /&gt;
You can directly connect the robot to the computer to make a basic functional test. You can find the source code in the following link [https://projects.gctronic.com/elisa3/Elisa3-global-test.zip Elisa3-global-test.zip] (Windows).&amp;lt;br/&amp;gt;&lt;br /&gt;
To start the test follow these steps:&lt;br /&gt;
# put the selector in position 6&lt;br /&gt;
# connect the robot to the computer with the USB cable and turn it on&lt;br /&gt;
# run the program, insert the correct COM port and choose option 1&lt;br /&gt;
With the same program you can also change the ID of the robot by choosing option 2 in the last step (not recommended).&lt;br /&gt;
&lt;br /&gt;
Via USB cable you can also program the robot with [https://www.gctronic.com/doc/index.php?title=Elisa-3#Aseba Aseba].&lt;br /&gt;
&lt;br /&gt;
=Software=&lt;br /&gt;
&lt;br /&gt;
==Robot==&lt;br /&gt;
===Requirements===&lt;br /&gt;
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&#039;re done otherwise you need to download the drivers for your system and architecture:&lt;br /&gt;
* [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.10.00%20WHQL%20Certified.exe Windows Vista/XP], [https://www.ftdichip.com/Drivers/CDM/CDM%20v2.12.10%20WHQL%20Certified.exe Windows 7/8/10 (run as administrator)]&lt;br /&gt;
* Ubuntu: when the robot is connected the port will be created in &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt; (no need to install a driver)&lt;br /&gt;
* [https://www.ftdichip.com/drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (32 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_2_18.dmg Mac OS X 10.3 to 10.8 (64 bit)], [https://www.ftdichip.com/Drivers/VCP/MacOSX/FTDIUSBSerialDriver_v2_3.dmg Mac OS X 10.9 and above]; after installing the driver the port will be created in &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;; you can find a guide on how to install the driver in the following link [https://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf]&lt;br /&gt;
All the drivers can be found in the official page from the following link [https://www.ftdichip.com/Drivers/VCP.htm FTDI drivers].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;Starting from robot ID 3823 the USB to serial chip can be one of the following: FTDI, [https://projects.gctronic.com/elisa3/CypressDriverInstaller_1.exe Cypress CY7C65213] or Silicon Labs CP2102 ([https://projects.gctronic.com/elisa3/CP210x_Universal_Windows_Driver.zip Windows 10 or later], [https://projects.gctronic.com/elisa3/CP210x_Windows_Drivers.zip Windows 7]); this is due to chips availability.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===AVR Studio 4 project===&lt;br /&gt;
The projects are built with [https://projects.gctronic.com/elisa3/AvrStudio4Setup.exe AVR Studio 4] released by Atmel. &amp;lt;br/&amp;gt;&lt;br /&gt;
The projects should be compatible also with newer versions of Atmel Studio (last version known as Microchip Studio), the last version is available from [https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive https://www.microchip.com/mplab/avr-support/avr-and-sam-downloads-archive]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Basic demo====&lt;br /&gt;
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.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_basic https://github.com/gctronic/elisa3_firmware_basic]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-basic_ffb3947_21.03.18.hex Elisa-3 basic firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
&lt;br /&gt;
====Advanced demo====&lt;br /&gt;
This is an extension of the &#039;&#039;basic demo project&#039;&#039;, basically it contains some additional advanced demos.&lt;br /&gt;
The project source can be downloaded from the repository [https://github.com/gctronic/elisa3_firmware_advanced.git https://github.com/gctronic/elisa3_firmware_advanced.git]; the hex file can be directly downloaded from [https://projects.gctronic.com/elisa3/elisa3-firmware-advanced_96c355a_13.03.18.hex Elisa-3 advanced firmware hex]. To program the robot refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Programming Programming]. &amp;lt;br/&amp;gt;&lt;br /&gt;
Selector position and related demo:&lt;br /&gt;
* 0: no speed controller activated =&amp;gt; free running (all others positions have the speed controller activated)&lt;br /&gt;
* 1: obstacle avoidance enabled&lt;br /&gt;
* 2: cliff avoidance enabled (currently it will simply stop before falling and stay there waiting for commands)&lt;br /&gt;
* 3: both obstacle and cliff avoidance enabled&lt;br /&gt;
* 4: random RGB colors and small green leds on&lt;br /&gt;
* 5: robot moving forward with obstacle avoidance enabled and random RGB colors&lt;br /&gt;
* 6: robot testing and address writing through serial connection (used in production)&lt;br /&gt;
* 7: automatic charging demo (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Videos Videos]), that is composed of 4 states: &lt;br /&gt;
** random walk with obstacle avoidance&lt;br /&gt;
** search black line&lt;br /&gt;
** follow black line that lead to the charging station&lt;br /&gt;
** charge for a while&lt;br /&gt;
* 8: autonomous odometry calibration (refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Autonomous_calibration Autonomous calibration])&lt;br /&gt;
* 9: write default odometry calibration values in EEPROM (hard-coded values); wait 2 seconds before start writing the calibration values&lt;br /&gt;
* 10: robot moving forward (with pause) and obstacle avoidance enabled; random RGB colors and green led effect &lt;br /&gt;
* 11: local communication: robot alignment&lt;br /&gt;
* 12: local communication: 2 or more robots exchange data sequentially&lt;br /&gt;
* 13: local communication: listen and transmit continuously; when data received change RGB color&lt;br /&gt;
* 14: local communication: RGB color propagation&lt;br /&gt;
* 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)&lt;br /&gt;
&lt;br /&gt;
====Atmel Studio 7 / Microchip Studio====&lt;br /&gt;
If you are working with Atmel Studio 7 / Microchip Studio, you can simply use the provided AVR Studio 4 projects by importing them directly in Atmel Studio 7 / Microchip Studio: &amp;lt;code&amp;gt;File =&amp;gt; Import =&amp;gt; AVR Studio 4 Project&amp;lt;/code&amp;gt;, then select &amp;lt;code&amp;gt;Elisa3-avr-studio.aps&amp;lt;/code&amp;gt; and click on &amp;lt;code&amp;gt;Convert&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you are asked to update some components (see following figure), then agree:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:atmel-studio-convert.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then click on &amp;lt;code&amp;gt;Build =&amp;gt; Clean solution&amp;lt;/code&amp;gt; and then &amp;lt;code&amp;gt;Build =&amp;gt; Build solution&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
If you experience problems during the building, make sure you have the correct toolchain installed: you can download WinAVR toolchain from [https://projects.gctronic.com/elisa3/WinAVR-20100110-install.exe WinAVR-20100110-install.exe].&amp;lt;br/&amp;gt;&lt;br /&gt;
Close and open again Atmel/Microchip Studio and verify that the new toolchain is recognized and that the path is correct: &amp;lt;code&amp;gt;Tools =&amp;gt; Options&amp;lt;/code&amp;gt; and on the left panel select &amp;lt;code&amp;gt;Toolchain =&amp;gt; Package Configuration&amp;lt;/code&amp;gt;. Select on top &amp;lt;code&amp;gt;Atmel AVR 8-bit (C language)&amp;lt;/code&amp;gt;, then &amp;lt;code&amp;gt;WinAVR&amp;lt;/code&amp;gt; flavour and verify the path corresponds to the WinAVR installation path. The following figure shows the toolchain configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio1.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally verify the project is using the WinAVR toolchain: &amp;lt;code&amp;gt;right click on the project name =&amp;gt; Properties&amp;lt;/code&amp;gt;, on the left panel select &amp;lt;code&amp;gt;Advanced&amp;lt;/code&amp;gt; and verify that &amp;lt;code&amp;gt;Toolchain Flavour&amp;lt;/code&amp;gt; is set to WinAVR. Press &amp;lt;code&amp;gt;CTRL+S&amp;lt;/code&amp;gt; to save your project configuration changes. The following figures show the project configuration:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-atmelstudio2.png|200px]] [[File:elisa3-atmelstudio3.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Arduino IDE project===&lt;br /&gt;
The project is built with the Arduino IDE 1.x freely available from the [https://arduino.cc/ official Arduino website]. In order to build the Elisa-3 firmware with the Arduino IDE 1.x the following steps has to be performed:&amp;lt;br/&amp;gt;&lt;br /&gt;
*1. download the [https://arduino.cc/hu/Main/Software Arduino IDE 1.x] (the last known working version is 1.8.9, refer to [https://www.arduino.cc/en/Main/OldSoftwareReleases#previous Arduino Software]) and extract it, let say in a folder named &amp;lt;code&amp;gt;arduino-1.x&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
*2. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_library_03.02.25_65964ed.zip Elisa-3 Arduino library] and extract it within the libraries folder of the Arduino IDE, in this case &amp;lt;code&amp;gt;arduino-1.x\libraries&amp;lt;/code&amp;gt; (see [https://support.arduino.cc/hc/en-us/articles/4415103213714-Find-sketches-libraries-board-cores-and-other-files-on-your-computer Find-sketches-libraries-board-cores-and-other-files-on-your-computer] for more information on Arduino useful paths); you should end up with a &amp;lt;code&amp;gt;Elisa3&amp;lt;/code&amp;gt; folder within the libraries. If you start the Arduino IDE now you can see that the &amp;lt;code&amp;gt;Elisa-3&amp;lt;/code&amp;gt; library is available in the menu &amp;lt;code&amp;gt;Sketch=&amp;gt;Import Library...&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Lirary&amp;lt;/code&amp;gt; in later IDE versions).&amp;lt;br/&amp;gt; In later versions of Arduino IDE you can also install the library via menu: &amp;lt;code&amp;gt;Sketch=&amp;gt;Include Library=&amp;gt;Add .ZIP library&amp;lt;/code&amp;gt;, for more info have a look at [https://docs.arduino.cc/software/ide-v1/tutorials/installing-libraries#importing-a-zip-library importing-a-zip-library].&lt;br /&gt;
*3. the file &amp;lt;code&amp;gt;boards.txt&amp;lt;/code&amp;gt; in the Arduino IDE folder &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;arduino-1.x\hardware\arduino\avr&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Users\{username}\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.6&amp;lt;/code&amp;gt; in later IDE versions) need to be changed to contain the definitions for the Elisa-3 robot, add the following definitions at the end of the file:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
##############################################################&lt;br /&gt;
&lt;br /&gt;
elisa3.name=Elisa 3 robot&lt;br /&gt;
&lt;br /&gt;
elisa3.upload.tool=avrdude&lt;br /&gt;
elisa3.upload.tool.serial=avrdude&lt;br /&gt;
elisa3.upload.protocol=stk500v2&lt;br /&gt;
elisa3.upload.maximum_size=258048&lt;br /&gt;
elisa3.upload.speed=57600&lt;br /&gt;
	&lt;br /&gt;
elisa3.bootloader.low_fuses=0xE2&lt;br /&gt;
elisa3.bootloader.high_fuses=0xD0&lt;br /&gt;
elisa3.bootloader.extended_fuses=0xFF&lt;br /&gt;
elisa3.bootloader.path=stk500v2-elisa3&lt;br /&gt;
elisa3.bootloader.file=stk500v2-elisa3.hex&lt;br /&gt;
elisa3.bootloader.unlock_bits=0x3F&lt;br /&gt;
elisa3.bootloader.lock_bits=0x0F					&lt;br /&gt;
&lt;br /&gt;
elisa3.build.mcu=atmega2560&lt;br /&gt;
elisa3.build.f_cpu=8000000L&lt;br /&gt;
elisa3.build.board=AVR_ELISA3&lt;br /&gt;
elisa3.build.core=arduino&lt;br /&gt;
elisa3.build.variant=mega&lt;br /&gt;
&lt;br /&gt;
##############################################################&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*4. this step need to be performed only with later IDE versions, when you receive a warning like this &amp;lt;code&amp;gt;Bootloader file specified but missing...&amp;lt;/code&amp;gt; during compilation.&amp;lt;br/&amp;gt; In this case place the bootloader hex file (&amp;lt;code&amp;gt;stk500v2.hex&amp;lt;/code&amp;gt;) you can find in the [https://www.gctronic.com/doc/index.php/Elisa-3#Bootloader Bootloader section] in the directory &amp;lt;code&amp;gt;arduino-1.x\Arduino\hardware\arduino\avr\bootloaders\&amp;lt;/code&amp;gt; and name it &amp;lt;code&amp;gt;stk500v2-elisa3.hex&amp;lt;/code&amp;gt;&lt;br /&gt;
*5. download the [https://projects.gctronic.com/elisa3/elisa3_arduino_project_02.03.21_d2c017e.zip Elisa-3 project file] and open it with the Arduino IDE (you should open the file &amp;quot;&#039;&#039;elisa3.ino&#039;&#039;&amp;quot;)&lt;br /&gt;
*6. select &amp;lt;code&amp;gt;Elisa-3 robot&amp;lt;/code&amp;gt; from the &amp;lt;code&amp;gt;Tools=&amp;gt;Board&amp;lt;/code&amp;gt; menu; click on the &amp;lt;code&amp;gt;Verify&amp;lt;/code&amp;gt; button to build the project&lt;br /&gt;
*7. turn on the robot, attach the micro USB and wait the blinks terminate.&amp;lt;br/&amp;gt; &lt;br /&gt;
&amp;lt;!-- : Only for Windows users: open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot); the robot should blink again, if this is not the case try again the command.--&amp;gt;&lt;br /&gt;
*8. to upload the resulting hex file, from the Arduino IDE set the port from the &amp;lt;code&amp;gt;Tools=&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu consequently; click on the &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt; button&lt;br /&gt;
: Only for Windows users: before clicking on &amp;lt;code&amp;gt;Upload&amp;lt;/code&amp;gt;, open the serial monitor from the Arduino IDE (&amp;lt;code&amp;gt;Tools =&amp;gt; Serial Monitor&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Ctrl+Shift+M&amp;lt;/code&amp;gt;), the robot should then blink again; keep the serial monitor opened.&lt;br /&gt;
&amp;lt;!-- : &#039;&#039;Windows users&#039;&#039;: if you have problems in uploading the firmware, try opening a command prompt and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com62: dtr=on&amp;lt;/code&amp;gt; (beware to change serial port number according to your system) before uploading from the Arduino IDE.--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/arduino-1.0.5-linux32.zip arduino-1.0.5-linux32.zip]. &amp;lt;br/&amp;gt;&lt;br /&gt;
If the &amp;lt;code&amp;gt;Tools-&amp;gt;Serial Port&amp;lt;/code&amp;gt; menu is grayed out then you need to start the Arduino IDE in a terminal typing &amp;lt;code&amp;gt;sudo path/to/arduino&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to have access to the compiler options you can download the following project [https://projects.gctronic.com/elisa3/Elisa3-arduino-makefile.zip Elisa3-arduino-makefile.zip] that contains an Arduino IDE project with a Makefile, follow the instructions in the &amp;quot;readme.txt&amp;quot; file in order to build and upload to the robot.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Aseba===&lt;br /&gt;
Refer to the page [{{fullurl:Elisa-3 Aseba}} Elisa-3 Aseba].&lt;br /&gt;
&lt;br /&gt;
===Matlab===&lt;br /&gt;
[[File:elisa3-matlab.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.e-puck.org/index.php?option=com_content&amp;amp;view=article&amp;amp;id=29&amp;amp;Itemid=27 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:&lt;br /&gt;
# program the robot with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced demo]&lt;br /&gt;
# place the selector in position 15 (to pilot the robot through the interface with no obstacle and no cliff avoidance)&lt;br /&gt;
# connect the radio base-station to the computer&lt;br /&gt;
# download the ePic2 for Elisa-3 from the repository [https://github.com/gctronic/elisa3_epic.git https://github.com/gctronic/elisa3_epic.git]: either from github site clicking on &amp;lt;code&amp;gt;Code&amp;lt;/code&amp;gt;=&amp;gt;&amp;lt;code&amp;gt;Download ZIP&amp;lt;/code&amp;gt; or by issueing the command &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_epic.git&amp;lt;/code&amp;gt;&lt;br /&gt;
# open (double click) the file &#039;&#039;main.m&#039;&#039;; once Matlab is ready type &#039;&#039;main+ENTER&#039;&#039; and the GUI should start&lt;br /&gt;
# click on the &#039;&#039;+&#039;&#039; sign (top left) and insert the robot address (e.g 3307), then click on &#039;&#039;Connect&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Webots simulator===&lt;br /&gt;
[[File:Elisa-3-webots.png|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The following features have been included in the Elisa-3 model for the [https://www.cyberbotics.com/ Webots simulator]:&lt;br /&gt;
* proximity sensors&lt;br /&gt;
* ground sensors&lt;br /&gt;
* accelerometer&lt;br /&gt;
* motors&lt;br /&gt;
* green leds around the robot&lt;br /&gt;
* RGB led&lt;br /&gt;
* radio communication&lt;br /&gt;
&lt;br /&gt;
You can donwload the Webots project containig the Elisa-3 model (proto) and a demonstration world in the following link [https://projects.gctronic.com/elisa3/Elisa-3-webots.zip Elisa-3-webots.zip].&lt;br /&gt;
&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/Elisa-3-webots-radio.zip Elisa-3-webots-radio.zip]. Here is a video of this demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|IEgCo3XSESU}}&lt;br /&gt;
&lt;br /&gt;
===Onboard behaviors===&lt;br /&gt;
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).&lt;br /&gt;
The following videos show three robots that have their obstacle avoidance enabled:{{#ev:youtube|EbroxwWG-x4}} {{#ev:youtube|q6IRWRlTQeQ}}&lt;br /&gt;
&lt;br /&gt;
===Programming===&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Elisa3.1-programming.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you are working with the Arduino IDE you don&#039;t need to follow this procedure, refer instead to section [https://www.gctronic.com/doc/index.php/Elisa-3#Arduino_IDE_project Arduino IDE project].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;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, it will make some blinks; when the blinks terminate execute the programming commands again.&amp;lt;br/&amp;gt;&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Beware that every time you need to re-program the robot you need to unplug and plug again the cable to the computer.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows 7====&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR-Burn-O-Mat-Windows7.zip Windows 7 package] and extract it. The package contains also the FTDI driver. Beware that starting from robot id 4000 the USB driver might be different, refer to section [https://www.gctronic.com/doc/index.php?title=Elisa-3#Requirements Requirements], so you need to install it manually in case it isn&#039;t an FTDI chip.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.bat&amp;lt;/code&amp;gt; and follow the installation; beware that this need to be done only once. The script will ask you to modify the registry, this is fine (used to save application preferences).&lt;br /&gt;
# Connect the robot to the computer; the COM port will be created.&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer (e.g. COM10); then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, connect the USB cable to the computer and wait the blinks terminate. Then open a terminal and issue the command &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt; (change the port number accordingly to your robot). The robot should blink again, if this is not the case then try again the command.&lt;br /&gt;
# From the &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt; interface, click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&amp;lt;br/&amp;gt; If you get an &amp;lt;code&amp;gt;Access is denied&amp;lt;/code&amp;gt; error, then run &amp;lt;code&amp;gt;AVR Burn-O-Mat.exe&amp;lt;/code&amp;gt; as administrator.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Mac OS X====&lt;br /&gt;
The following procedure is tested in Max OS X 10.10, but should work from Mac OS X 10.9 onwards; in these versions there is built-in support for the FTDI devices.&lt;br /&gt;
# Download the [https://projects.gctronic.com/elisa3/programming/AVR8-Burn-O-Mat-MacOsX.zip Mac OS X package] and extract it.&lt;br /&gt;
# Execute the script &amp;lt;code&amp;gt;config.sh&amp;lt;/code&amp;gt; in the terminal, it will ask you to install the Java Runtime Environment; in case there is a problem executing the script try with &amp;lt;code&amp;gt;chmod +x config.sh&amp;lt;/code&amp;gt; and try again. Beware that this need to be done only once.&lt;br /&gt;
# Connect the robot to the computer; the serial device will be created (something like &amp;lt;code&amp;gt;/dev/tty.usbserial-AJ03296J&amp;lt;/code&amp;gt;).&lt;br /&gt;
# Run the application &amp;lt;code&amp;gt;AVR Burn-O-Mat&amp;lt;/code&amp;gt;; you need to configure the port to communicate with the robot:&lt;br /&gt;
## click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
## in the &amp;lt;code&amp;gt;AVRDUDE Options&amp;lt;/code&amp;gt;, on &amp;lt;code&amp;gt;Port&amp;lt;/code&amp;gt; enter the name of the port just created when the robot was connected to the computer; then click &amp;lt;code&amp;gt;Ok&amp;lt;/code&amp;gt;&lt;br /&gt;
# In the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot.&lt;br /&gt;
# Turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section.&lt;br /&gt;
# During the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
The following procedure was tested in Ubunut 12.04, but a similar procedure can be followed in newer systems and other Linux versions.&amp;lt;br/&amp;gt;&lt;br /&gt;
You can find a nice GUI for &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; in the following link [https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php https://burn-o-mat.net/avr8_burn_o_mat_avrdude_gui_en.php]; you can download directly the application for Ubuntu from the following link [https://projects.gctronic.com/elisa3/programming/avr8-burn-o-mat-2.1.2-all.deb avr8-burn-o-mat-2.1.2-all.deb].&amp;lt;br/&amp;gt;&lt;br /&gt;
Double click the package and install it; the executable will be &amp;lt;code&amp;gt;avr8-burn-o-mat&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that the application requires the Java SE Runtime Environment (JRE) that you can download from the official page [https://www.oracle.com/technetwork/java/javase/downloads/index.html https://www.oracle.com/technetwork/java/javase/downloads/index.html], alternatively you can issue the command &amp;lt;code&amp;gt;sudo apt-get install openjdk-8-jre&amp;lt;/code&amp;gt; in the terminal.&lt;br /&gt;
&lt;br /&gt;
The application need a bit of configuration, follow these steps:&lt;br /&gt;
:1. connect the robot to the computer, the serial device will be created (something like /dev/USB0)&lt;br /&gt;
:2. to use the USB port the permissions need to be set to read and write issueing the command &amp;lt;code&amp;gt;sudo chmod a+rw /dev/ttyUSB0&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. start the application and click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. set the location of &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; and the related configuration file (refer to the previous section when &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; was installed to know the exact location); the configuration file is in &amp;lt;code&amp;gt;/etc/avrdude.conf&amp;lt;/code&amp;gt;&lt;br /&gt;
:3. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;, close the application and open it again (this is needed to load the configuration file information); click on &amp;lt;code&amp;gt;Settings =&amp;gt; AVRDUDE&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. select &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; as the &amp;lt;code&amp;gt;Programmer&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. set the serial port connected to the robot (&amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;)&lt;br /&gt;
:6. in &amp;lt;code&amp;gt;additional options&amp;lt;/code&amp;gt; insert &amp;lt;code&amp;gt;-b 57600&amp;lt;/code&amp;gt;, you will end up with a window like the following one:&lt;br /&gt;
[[File:avrdude-gui.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
:7. click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt;; select &amp;lt;code&amp;gt;ATmega2560&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;AVR type&amp;lt;/code&amp;gt;&lt;br /&gt;
:8. in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section search the hex file you want to upload on the robot; select &amp;lt;code&amp;gt;Intel Hex&amp;lt;/code&amp;gt; on the right&lt;br /&gt;
:9. connect the robot to the computer, turn on the robot, wait the blinks terminate and then click on &amp;lt;code&amp;gt;Write&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;Flash&amp;lt;/code&amp;gt; section&lt;br /&gt;
:10. during the programming the robot will blink; at the end you&#039;ll receive a message saying &amp;lt;code&amp;gt;Flash succesfully written.&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Command line====&lt;br /&gt;
The [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility is used to do the upload, you can download it directly from the following links depending on your system:&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/WinAVR-20100110-install.exe Windows (tested on Windows 7 and 10)]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;C:\WinAVR-20100110\bin\avrdude&amp;lt;/code&amp;gt;; avrdude version 5.10&lt;br /&gt;
* [https://projects.gctronic.com/elisa3/programming/CrossPack-AVR-20131216.dmg Mac OS X]; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/local/CrossPack-AVR/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 6.0.1&lt;br /&gt;
* Ubuntu (12.04 32-bit): issue the command &amp;lt;code&amp;gt;sudo apt-get install avrdude&amp;lt;/code&amp;gt; in the terminal; &amp;lt;code&amp;gt;avrdude&amp;lt;/code&amp;gt; will be installed in the path &amp;lt;code&amp;gt;/usr/bin/avrdude&amp;lt;/code&amp;gt;; to check the path issue the commmand &amp;lt;code&amp;gt;which avrdude&amp;lt;/code&amp;gt; in the terminal; avrdude version 5.11.1&lt;br /&gt;
&lt;br /&gt;
Open a terminal and issue the following commands:&lt;br /&gt;
# only for windows users: &amp;lt;code&amp;gt;c:\windows\system32\mode.com com10: dtr=on&amp;lt;/code&amp;gt;. You should see the robot blink (blue), if this is not the case try again the command.&lt;br /&gt;
# &amp;lt;code&amp;gt;avrdude -p m2560 -P COM10 -b 57600 -c stk500v2 -D -Uflash:w:Elisa3-avr-studio.hex:i -v&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
where &amp;lt;code&amp;gt;COM10&amp;lt;/code&amp;gt; must be replaced with your com port and &amp;lt;code&amp;gt;Elisa3-avr-studio.hex&amp;lt;/code&amp;gt; must be replaced with your application name; in Mac OS X the port will be something like &amp;lt;code&amp;gt;/dev/tty.usbserial-...&amp;lt;/code&amp;gt;, in Ubuntu will be &amp;lt;code&amp;gt;/dev/ttyUSB0&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Basic_demo Basic demo] and [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo Advanced demo] have this command contained in the file &amp;lt;code&amp;gt;program.bat&amp;lt;/code&amp;gt; in the &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; directory within the project, this can be useful for Windows users.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Internal EEPROM===&lt;br /&gt;
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).&amp;lt;br/&amp;gt; &lt;br /&gt;
Moreover the address 4093 is used to save the clock calibration value that is found during production/testing of the robots; this value hasn&#039;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 [https://projects.gctronic.com/elisa3/AVR053-Calibration-RC-oscillator.pdf AVR053: Calibration of the internal RC oscillator].&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;The size of usable EEPROM is thus 3946 bytes (0-3945) and the remaining memory must not be modified/erased.&#039;&#039;&#039;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
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 [https://www.ladyada.net/learn/avr/setup-win.html avrdude] utility the following command has to be issued:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
avrdude -p m2560 -c usbtiny -v -U eeprom:w:Elisa3-eeprom.hex:i -v -B 1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
where &#039;&#039;Elisa3-eeprom.hex&#039;&#039; is the EEPROM memory saved as Intel Hex format ([https://projects.gctronic.com/elisa3/Elisa3-eeprom.hex eeprom example]); a possible tool to read and write Intel Hex format is [https://projects.gctronic.com/elisa3/G32setup_12004-intel-hex-editor.exe Galep32 from Conitec Datensysteme].&amp;lt;br/&amp;gt;&lt;br /&gt;
Alternatively a program designed to writing to these EEPROM locations can be uploaded to the robot, in case an AVR programmer isn&#039;t available. The project source is available in the repository [https://github.com/gctronic/elisa3_eeprom.git https://github.com/gctronic/elisa3_eeprom.git]; it is simply needed to modify the address, rebuild and upload to the robot.&lt;br /&gt;
&lt;br /&gt;
===Bootloader===&lt;br /&gt;
In case the bootloader of the Elisa-3 is erased by mistake, then you can restore it by using an AVR programmer. You can download the bootloader from here [https://projects.gctronic.com/elisa3/stk500v2_20.03.18_13b46ce.hex stk500v2.hex]; the source code is available from the repository [https://github.com/gctronic/elisa3_bootloader.git https://github.com/gctronic/elisa3_bootloader.git].&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;Avrdude&amp;lt;/code&amp;gt; can be used to actually write the bootloader to the robot with a command similar to the following one:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;avrdude -p m2560 -c stk500v2 -P COM348 -v -U lfuse:w:0xE2:m -U hfuse:w:0xD8:m -U efuse:w:0xFF:m -V -U flash:w:stk500v2.hex:i -v -B 2&amp;lt;/code&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
Here we used a programmer recognized as a serial device (port COM348) that utilizes the &amp;lt;code&amp;gt;stk500v2&amp;lt;/code&amp;gt; protocol.&lt;br /&gt;
&lt;br /&gt;
==Base-station==&lt;br /&gt;
This chapter explains informations that aren&#039;t needed for most of the users since the radio module is ready to be used and don&#039;t need to be reprogrammed. Only if you are interested in the firmware running in the radio module and on how to reprogram it then refer to section [https://www.gctronic.com/doc/index.php/Elisa#Base-station https://www.gctronic.com/doc/index.php/Elisa#Base-station] (chapter 4.2) of the Elisa robot wiki.&lt;br /&gt;
&lt;br /&gt;
==PC side==&lt;br /&gt;
This section gives informations related to the radio module connected to the computer; if you don&#039;t have a radio module you can skip this section.&lt;br /&gt;
===Requirements===&lt;br /&gt;
Refer to the section [https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver https://www.gctronic.com/doc/index.php/Elisa#1._Install_the_radio_base-station_driver].&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station 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.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library is available in the repository [https://github.com/gctronic/elisa3_remote_library https://github.com/gctronic/elisa3_remote_library]; follow the instructions in the repository to build the library.&lt;br /&gt;
&lt;br /&gt;
===Multiplatform monitor===&lt;br /&gt;
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. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following figures show the monitor on the left and the available commands on the right. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Cmd-line-monitor.jpg|400px]] [[File:Pc-side-commands2.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_monitor https://github.com/gctronic/elisa3_remote_monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
Execution:&lt;br /&gt;
* install the driver contained in the [https://www.nordicsemi.com/eng/Products/2.4GHz-RF/nRFgo-Studio 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&lt;br /&gt;
* once the driver is installed, the pre-compiled &amp;quot;exe&amp;quot; (under &amp;lt;code&amp;gt;\bin\Release&amp;lt;/code&amp;gt; dir) should run without problems; the program will prompt you the address of the robot you want to control&lt;br /&gt;
&lt;br /&gt;
Compilation:&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Elisa-3 demo (parent dir)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_library&amp;lt;/code&amp;gt; (Elisa-3 library project)&lt;br /&gt;
** &amp;lt;code&amp;gt;elisa3_remote_monitor&amp;lt;/code&amp;gt; (current project)&lt;br /&gt;
&lt;br /&gt;
====Linux / Mac OS X====&lt;br /&gt;
The project was tested to work also in Ubuntu and Mac OS X (no driver required). &amp;lt;br/&amp;gt;&lt;br /&gt;
Compilation:&lt;br /&gt;
* you need to put this project within the same directory of the Elisa-3 library&lt;br /&gt;
* build command: go under &amp;quot;linux&amp;quot; dir and type &amp;lt;code&amp;gt;make clean &amp;amp;&amp;amp; make&amp;lt;/code&amp;gt;&lt;br /&gt;
Execution:&lt;br /&gt;
* &amp;lt;code&amp;gt;sudo ./main&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Communicate with 4 robots simultaneously===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_multiple https://github.com/gctronic/elisa3_remote_multiple]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
===Obstacle avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;obstacle avoidance&#039;&#039; 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 &amp;quot;intelligence&amp;quot; onboard. The demo uses the information gathered from the 3 front proximity sensors and set the motors speed accordingly; moreover the RGB LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|F_b1TQxZKos}}&lt;br /&gt;
&lt;br /&gt;
It is available also the same example but with 4 robots controlled simultaneously; the source can be downloaded from the branch &amp;lt;code&amp;gt;4robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa]&amp;lt;br/&amp;gt;&lt;br /&gt;
It is easy to extend the previous example in order to control many robots, the code that controls 8 robots simultaneously can be downloaded from the branch &amp;lt;code&amp;gt;8robots&amp;lt;/code&amp;gt; of the repository [https://github.com/gctronic/elisa3_remote_oa https://github.com/gctronic/elisa3_remote_oa].&lt;br /&gt;
&lt;br /&gt;
===Cliff avoidance===&lt;br /&gt;
This demo implements the &#039;&#039;cliff avoidance&#039;&#039; behavior controlling the robot from the pc through the radio; as with the &#039;&#039;obstacle avoidance&#039;&#039; 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 LED is updated with a random color at fixed intervals. &amp;lt;br/&amp;gt;&lt;br /&gt;
The source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_cliff https://github.com/gctronic/elisa3_remote_cliff]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|uHy-9XXAHcs}}&lt;br /&gt;
===Communication between robots via PC===&lt;br /&gt;
This examples shows how to emulate direct communication between robots: basically a common state is shared between the robots and this state is changed based on the current state of each robot; it emulates the facts that each robot propagates its state to all other robots. Actually all the robots communicate only with the computer (only one computer with only one radio module) and the computer forward the information to all the others robots; the radio is fast enough so that the computer in the middle will not slow down the communication. A big advantage passing from the computer is that you can log the communication messages on the computer and see what is happening.&amp;lt;br/&amp;gt;&lt;br /&gt;
In particular in this demo a total of 4 robots are handled and when a robot crosses a black line, then it inform all others robots to change their color. The source can be downloaded from the repository [https://github.com/gctronic/elisa3_communication_between_robots_via_pc https://github.com/gctronic/elisa3_communication_between_robots_via_pc]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
The following video shows the result: &amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|4tpxoAyWfEA}}&lt;br /&gt;
&lt;br /&gt;
===Set robots state from file===&lt;br /&gt;
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 source can be downloaded from the repository [https://github.com/gctronic/elisa3_remote_file https://github.com/gctronic/elisa3_remote_file]. For building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Elisa-3 Python library===&lt;br /&gt;
This library simplify the implementation of applications on the pc side (where the radio base-station is connected) that will take control of the robots and receive data from them.&amp;lt;br/&amp;gt;&lt;br /&gt;
The source code of the library and some usage examples are available in the repository [https://github.com/gctronic/elisa3_remote_library_python https://github.com/gctronic/elisa3_remote_library_python].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Odometry=&lt;br /&gt;
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 ;-)&amp;lt;br/&amp;gt;&lt;br /&gt;
A fine calibration of the right and left wheel speed parameters might give better results.&lt;br /&gt;
However the current odometry is a good estimate of the absolute position from a starting point.&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:odometry-vertical.jpg|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Details about the code can be found in the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced-demo] project, in particular the &#039;&#039;motors.c&#039;&#039; source file. The PC application used for logging data is the [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor].&lt;br /&gt;
==Autonomous calibration==&lt;br /&gt;
Since the motors can be slightly different a calibration can improve the behavior of the robot in terms of maneuverability and odometry accuracy.&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/calibration-sheet.pdf calibration-sheet.pdf]. &amp;lt;br/&amp;gt;&lt;br /&gt;
In order to accomplish the calibration the robot need to be programmed with the [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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 [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor_.28pc_side.29 monitor application] in which the letter &#039;&#039;l (el)&#039;&#039; is reserved to launch the calibration, otherwise if you have a TV remote control you can press the button &#039;&#039;5&#039;&#039;.&lt;br /&gt;
The sequence is the following:&amp;lt;br/&amp;gt;&lt;br /&gt;
1. put the selector in position 8&amp;lt;br/&amp;gt;&lt;br /&gt;
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&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-1.jpg|300px]] [[File:elisa3-calibration-2.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
3. once the robot is placed  you can type the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;); 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&amp;lt;br/&amp;gt;&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa3-calibration-3.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
5. once the robot is placed you can type again the &#039;&#039;l (el)&#039;&#039; command (or press the button &#039;&#039;5&#039;&#039;)&amp;lt;br/&amp;gt;&lt;br /&gt;
6. when the robot finish, the calibration process is also terminated.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The previous figures show a robot without the top diffuser, anyway you don&#039;t need to remove it!&lt;br /&gt;
&lt;br /&gt;
=Tracking=&lt;br /&gt;
==Assembly documentation==&lt;br /&gt;
You can download the documentation from here [https://projects.gctronic.com/elisa3/tracking-doc.pdf tracking-doc.pdf].&amp;lt;br/&amp;gt;&lt;br /&gt;
Have a look also at the video:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|92pz28hnteY}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==SwisTrack==&lt;br /&gt;
Some experiments are done with the [https://en.wikibooks.org/wiki/SwisTrack 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-3-tracking-2robots.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The pre-compiled SwisTrack software (Windows) can be downloaded from the following link [https://projects.gctronic.com/elisa3/SwisTrackEnvironment-10.04.13.zip SwisTrack-compiled]. &amp;lt;!--; it contains also the configuration for the Elisa-3 named &#039;&#039;elisa-3-usb.swistrack&#039;&#039;.&amp;lt;br/&amp;gt; --&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
We used the &#039;&#039;Trust Spotlight Pro&#039;&#039; webcam, removed the internal IR filter and placed an external filter that let trough the red-IR wavelength. This filter configuration eases the tracking of the robots. The camera parameters (brightness=-64, contrast=0, saturation=100, gamma=72, gain=0) where tuned to get the best possible results, if another camera would be used a similar tuning has to be done again.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the tracking of 5 robots:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|33lrIUux_0Q}}&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:swistrack-output.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following video shows the test done with 20, 30 and 38 Elisa-3 robots, the tracking is still good; it&#039;s important to notice that we stopped to 38 Elisa-3 robots because are the ones we have in our lab.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|5LAccIJ9Prs}}&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Position control==&lt;br /&gt;
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 &#039;&#039;8-shape&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|ACaGNEQHayc}}&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:tracking-8shape.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
All the following projects require the [https://www.gctronic.com/doc/index.php/Elisa-3#Elisa-3_library Elisa-3 library], for building refer to the section [https://www.gctronic.com/doc/index.php/Elisa-3#Multiplatform_monitor Multiplatform monitor].&lt;br /&gt;
&lt;br /&gt;
* Horizontal position control (4 robots): the source code can be downloaded from [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-4-robots-rev245-15.01.21.zip position-control-pattern-horizontal-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Vertical position control (4 robots): [https://projects.gctronic.com/elisa3/position-control-pattern-vertical-4-robots-rev245-15.01.21.zip position-control-pattern-vertical-4-robots.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Horizontal position control (1 robot): [https://projects.gctronic.com/elisa3/position-control-pattern-horizontal-1-robot-rev245-15.01.21.zip position-control-pattern-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
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:&lt;br /&gt;
* Go to target point: [https://projects.gctronic.com/elisa3/position-control-goto-pos-horizontal-1-robot-rev245-15.01.21.zip position-control-goto-pos-horizontal-1-robot.zip] (Code::Blocks project).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Utilities==&lt;br /&gt;
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 [https://projects.gctronic.com/elisa3/back-IR-on-4-robots-rev245-15.01.21.zip back-IR-on-4-robots-rev245-15.01.21.zip] is an example that turn on the back IR of 4 robots, their addresses are asked to the user at the execution.&lt;br /&gt;
&lt;br /&gt;
=Local communication=&lt;br /&gt;
{{#ev:youtube|7bxIR0Z3q3M}}&amp;lt;br/&amp;gt;&lt;br /&gt;
The [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo 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. &amp;lt;br/&amp;gt;&lt;br /&gt;
Here are some details about the current implementation of the communication module:&lt;br /&gt;
* 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&lt;br /&gt;
* bidirectional communication&lt;br /&gt;
* id and angle of the proximity sensor that received the data are available&lt;br /&gt;
* the throughput is about 1 bytes/sec&lt;br /&gt;
* maximum communication distance is about 5 cm&lt;br /&gt;
* no reception/transmission queue (only one byte at a time)&lt;br /&gt;
* the data are sent using all the sensors, cannot select a single sensor from which to send the data. The data isn&#039;t sent contemporaneously from all the sensors, but the sensors used are divided in two groups of 4 alternating sensors (to reduce consumption)&lt;br /&gt;
== Clustering example==&lt;br /&gt;
In this demo there are &amp;lt;b&amp;gt;37&amp;lt;/b&amp;gt; elisa-3 robots programmed with a special firmware that you can download here [https://projects.gctronic.com/elisa3/elisa3_cluster_firmware.hex elisa3_cluster_firmware.hex]; the source code is available in the repo [https://github.com/gctronic/elisa3_cluster_firmware https://github.com/gctronic/elisa3_cluster_firmware].&amp;lt;br/&amp;gt;&lt;br /&gt;
The robots will try to form some clusters by exchanging data through the local communication and at the same time exchange data with a central computer: they send their status (in cluster or not) and receive a new color when in cluster. &lt;br /&gt;
The application running on the computer side is available in the repo [https://github.com/gctronic/elisa3_cluster_pc https://github.com/gctronic/elisa3_cluster_pc].&amp;lt;br/&amp;gt;&lt;br /&gt;
Here is a video of the demo:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|MOuSfr1_3lg}}&lt;br /&gt;
&lt;br /&gt;
=ROS=&lt;br /&gt;
This chapter explains how to use ROS with the elisa-3 robots; the radio module is needed here. 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-schema.png|450px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all you need to install and configure ROS, refer to [https://wiki.ros.org/Distributions https://wiki.ros.org/Distributions] for more informations. Alternatively you can download directly a virtual machine pre-installed with everything you need, refer to section [https://www.gctronic.com/doc/index.php/Elisa-3#Virtual_machine virtual machine]; this is the preferred way. &lt;br /&gt;
:*&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; This tutorial is based on ROS Hydro&amp;lt;/font&amp;gt;. The same instructions are working with ROS Noetic, beware to use &amp;lt;code&amp;gt;noetic&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; when installing the packages. &lt;br /&gt;
:* If you downloaded the pre-installed VM you can go directly to section [https://www.gctronic.com/doc/index.php/Elisa-3#Running_the_ROS_node Running the ROS node].&lt;br /&gt;
&lt;br /&gt;
The ROS elisa-3 node based on roscpp can be found in the following repository [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp].&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Initial configuration==&lt;br /&gt;
The following steps need to be done only once after installing ROS:&lt;br /&gt;
:1. If not already done, create a catkin workspace, refer to [https://wiki.ros.org/catkin/Tutorials/create_a_workspace https://wiki.ros.org/catkin/Tutorials/create_a_workspace]. Basically you need to issue the following commands:  &lt;br /&gt;
&amp;lt;pre&amp;gt;  mkdir -p ~/catkin_ws/src&lt;br /&gt;
  cd ~/catkin_ws/src&lt;br /&gt;
  catkin_init_workspace&lt;br /&gt;
  cd ~/catkin_ws/&lt;br /&gt;
  catkin_make&lt;br /&gt;
  source devel/setup.bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
:2. You will need to add the line &amp;lt;code&amp;gt;source ~/catkin_ws/devel/setup.bash&amp;lt;/code&amp;gt; to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; in order to automatically have access to the ROS commands when the system is started&lt;br /&gt;
:3. Clone the elisa-3 ROS node repo from [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] inside the catkin workspace source folder (&amp;lt;tt&amp;gt;~/catkin_ws/src&amp;lt;/tt&amp;gt;): &amp;lt;code&amp;gt;git clone https://github.com/gctronic/elisa3_node_cpp.git&amp;lt;/code&amp;gt;&lt;br /&gt;
:4. Install the dependencies:&lt;br /&gt;
:ROS:&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-slam-gmapping&amp;lt;/code&amp;gt;&lt;br /&gt;
::* &amp;lt;code&amp;gt;sudo apt-get install ros-hydro-imu-tools&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are using a newer version of ROS, replace &amp;lt;code&amp;gt;hydro&amp;lt;/code&amp;gt; with your distribution name.&lt;br /&gt;
:cpp:&lt;br /&gt;
::* install OpenCV: &amp;lt;code&amp;gt;sudo apt-get install libopencv-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
::If you are working with OpenCV 4, then you need to change the header include from &amp;lt;code&amp;gt;#include &amp;lt;opencv/cv.h&amp;gt;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;#include &amp;lt;opencv2/opencv.hpp&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
:5. Rebuild the &amp;lt;code&amp;gt;elisa-3 library&amp;lt;/code&amp;gt;: go to &amp;lt;code&amp;gt;~/catkin_ws/src/elisa3_node_cpp/src/pc-side-elisa3-library/linux&amp;lt;/code&amp;gt;, then issue &amp;lt;code&amp;gt;make clean&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;make&amp;lt;/code&amp;gt;&lt;br /&gt;
:6. Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;, there shouldn&#039;t be errors&lt;br /&gt;
: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 &amp;lt;tt&amp;gt;udev rules&amp;lt;/tt&amp;gt;:&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
:* plug in the radio and issue the command &amp;lt;tt&amp;gt;lsusb&amp;lt;/tt&amp;gt;, you&#039;ll get the list of USB devices attached to the computer, included the radio:&lt;br /&gt;
::&amp;lt;tt&amp;gt;Bus 002 Device 003: ID 1915:0101 Nordic Semiconductor ASA&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* issue the command &amp;lt;tt&amp;gt;udevadm info -a -p $(udevadm info -q path -n /dev/bus/usb/002/003)&amp;lt;/tt&amp;gt;, beware to change the bus according to the result of the previous command. You&#039;ll receive a long output showing all the informations regarding the USB device, the one we&#039;re interested is the &amp;lt;tt&amp;gt;product attribute&amp;lt;/tt&amp;gt;:&lt;br /&gt;
::&amp;lt;tt&amp;gt;ATTR{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
:* in the udev rules file you can find in &amp;lt;tt&amp;gt;/etc/udev/rules.d/name.rules&amp;lt;/tt&amp;gt; add the following string changing the &amp;lt;tt&amp;gt;GROUP&amp;lt;/tt&amp;gt; field with your current user group:&lt;br /&gt;
::&amp;lt;tt&amp;gt;SUBSYSTEMS==&amp;quot;usb&amp;quot;, ATTRS{product}==&amp;quot;nRF24LU1P-F32 BOOT LDR&amp;quot;, GROUP=&amp;quot;viki&amp;quot;&amp;lt;/tt&amp;gt;&lt;br /&gt;
:: To know which groups your user belongs to issue the command &amp;lt;tt&amp;gt;id&amp;lt;/tt&amp;gt;&lt;br /&gt;
:* disconnect and reconnect the radio module&lt;br /&gt;
:8. Program the elisa-3 robot with the last [https://www.gctronic.com/doc/index.php/Elisa-3#Advanced_demo advanced firmware] (&amp;gt;= rev.221) and put the selector in position 15&lt;br /&gt;
&lt;br /&gt;
==Running the ROS node==&lt;br /&gt;
First of all get the last version of the elisa-3 ROS node from github:&lt;br /&gt;
* clone the repo [https://github.com/gctronic/elisa3_node_cpp https://github.com/gctronic/elisa3_node_cpp] and copy the &amp;lt;tt&amp;gt;elisa3_node_cpp&amp;lt;/tt&amp;gt; directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)&lt;br /&gt;
* build the driver by opening a terminal and issueing the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt; from within the catkin workspace directory (e.g. ~/catkin_ws).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can start the ROS node, for this purposes there is a launch script (based on [https://wiki.ros.org/roslaunch roslaunch]), as explained in the following section. Before starting the ROS node you need to start &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;, open another terminal tab and issue the command &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Single robot===&lt;br /&gt;
Open a terminal and issue the following command: &amp;lt;code&amp;gt;roslaunch elisa3_node_cpp elisa3_single.launch elisa3_address:=&#039;1234&#039;&amp;lt;/code&amp;gt; where &amp;lt;tt&amp;gt;1234&amp;lt;/tt&amp;gt; is the robot id (number on the bottom).&lt;br /&gt;
&lt;br /&gt;
If all is going well [https://wiki.ros.org/rviz/UserGuide rviz] will be opened showing the informations gathered from the topics published by the elisa ROS node as shown in the following figure: &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-ros-single-robot.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The launch script is configured also to run the [https://wiki.ros.org/gmapping 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|v=k_9nmEO2zqE}}&lt;br /&gt;
&lt;br /&gt;
==Move the robot==&lt;br /&gt;
You have two options to move the robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first one is to use the &amp;lt;code&amp;gt;rviz&amp;lt;/code&amp;gt; interface: in the bottom left side of the interface there is a &amp;lt;code&amp;gt;Teleop&amp;lt;/code&amp;gt; panel containing an &#039;&#039;interactive square&#039;&#039; meant to be used with differential drive robots. By clicking in this square you&#039;ll move the robot, for instance by clicking on the top-right section, then the robot will move forward-right.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:elisa-teleop.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The second method is by directly publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic, for instance by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[0.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 1.0]&#039;&amp;lt;/code&amp;gt; the robot will rotate on the spot, instead by issueing the following command &amp;lt;code&amp;gt;rostopic pub -1 /mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[4.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 0.0]&#039;&amp;lt;/code&amp;gt; the robot will move straight forward.&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that there shouldn&#039;t be any other node publishing on the &amp;lt;code&amp;gt;/mobile_base/cmd_vel&amp;lt;/code&amp;gt; topic (e.g. Rviz), otherwise your commands will be overwritten.&lt;br /&gt;
&lt;br /&gt;
==Troubleshooting==&lt;br /&gt;
===Robot state publisher===&lt;br /&gt;
If you get an error similar to the following when you start a node with roslaunch:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ERROR: cannot launch node of type [robot_state_publisher/state_publisher]: Cannot locate node of type [state_publisher] in package [robot_state_publisher]. Make sure file exists in package path and permission is set to executable (chmod +x)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then you need to change the launch file from:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
To:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;node name=&amp;quot;elisa3_state_publisher&amp;quot; pkg=&amp;quot;robot_state_publisher&amp;quot; type=&amp;quot;robot_state_publisher&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
This is due to the fact that &amp;lt;code&amp;gt;state_publisher&amp;lt;/code&amp;gt; was a deprecated alias for the node named &amp;lt;code&amp;gt;robot_state_publisher&amp;lt;/code&amp;gt; (see [https://github.com/ros/robot_state_publisher/pull/87 https://github.com/ros/robot_state_publisher/pull/87]).&lt;br /&gt;
&lt;br /&gt;
==Virtual machine==&lt;br /&gt;
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 &#039;&#039;open virtualization format&#039;&#039; from the following link [https://projects.gctronic.com/VM/ROS-Hydro-12.04.ova ROS-Hydro-12.04.ova] (based on the VM from https://nootrix.com/2014/04/virtualized-ros-hydro/); you can then use [https://www.virtualbox.org/ VirtualBox] to import the file and automatically create the virtual machine. Some details about the system:&lt;br /&gt;
* user: gctronic, pw: gctronic&lt;br /&gt;
* Ubuntu 12.04.4 LTS (32 bits)&lt;br /&gt;
* ROS Hydro installed&lt;br /&gt;
* [https://www.cyberbotics.com/ Webots] 8.0.5 is installed (last version available for 32 bits linux)&lt;br /&gt;
* [https://git-cola.github.io/ git-cola] (git interface) is installed&lt;br /&gt;
* the &amp;lt;tt&amp;gt;catkin workspace&amp;lt;/tt&amp;gt; is placed in the desktop&lt;br /&gt;
&lt;br /&gt;
=Videos=&lt;br /&gt;
==Autonomous charge==&lt;br /&gt;
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.&lt;br /&gt;
{{#ev:youtube|o--FM8zIrRk}}{{#ev:youtube|Ib9WdbwMlyQ}}{{#ev:youtube|xsOdxwOjmuI}}{{#ev:youtube|tprO126R9iA}}{{#ev:youtube|HVYp1Eujof8}}{{#ev:youtube|mtJd8jTWT94}}&lt;br /&gt;
==Remote control==&lt;br /&gt;
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.&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|WDxfIFhpm1g}}&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:tracking-8shape.jpg&amp;diff=3209</id>
		<title>File:tracking-8shape.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:tracking-8shape.jpg&amp;diff=3209"/>
		<updated>2026-04-22T13:34:47Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:swistrack-output.jpg&amp;diff=3208</id>
		<title>File:swistrack-output.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:swistrack-output.jpg&amp;diff=3208"/>
		<updated>2026-04-22T13:34:37Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:selector-tweezers.jpg&amp;diff=3207</id>
		<title>File:selector-tweezers.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:selector-tweezers.jpg&amp;diff=3207"/>
		<updated>2026-04-22T13:34:24Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Power-autonomy.jpg&amp;diff=3206</id>
		<title>File:Power-autonomy.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Power-autonomy.jpg&amp;diff=3206"/>
		<updated>2026-04-22T13:34:12Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Pc-side-commands2.jpg&amp;diff=3205</id>
		<title>File:Pc-side-commands2.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Pc-side-commands2.jpg&amp;diff=3205"/>
		<updated>2026-04-22T13:33:59Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:odometry-vertical.jpg&amp;diff=3204</id>
		<title>File:odometry-vertical.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:odometry-vertical.jpg&amp;diff=3204"/>
		<updated>2026-04-22T13:33:44Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa-teleop.png&amp;diff=3203</id>
		<title>File:elisa-teleop.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa-teleop.png&amp;diff=3203"/>
		<updated>2026-04-22T13:33:31Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa-ros-single-robot.png&amp;diff=3202</id>
		<title>File:elisa-ros-single-robot.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa-ros-single-robot.png&amp;diff=3202"/>
		<updated>2026-04-22T13:33:19Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa-ros-schema.png&amp;diff=3201</id>
		<title>File:elisa-ros-schema.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa-ros-schema.png&amp;diff=3201"/>
		<updated>2026-04-22T13:33:02Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa-3-webots.png&amp;diff=3200</id>
		<title>File:Elisa-3-webots.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa-3-webots.png&amp;diff=3200"/>
		<updated>2026-04-22T13:32:39Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3-mainComp-digital-white.png&amp;diff=3199</id>
		<title>File:Elisa3-mainComp-digital-white.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3-mainComp-digital-white.png&amp;diff=3199"/>
		<updated>2026-04-22T13:32:27Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3-hw-schema-bottom3.jpg&amp;diff=3198</id>
		<title>File:Elisa3-hw-schema-bottom3.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3-hw-schema-bottom3.jpg&amp;diff=3198"/>
		<updated>2026-04-22T13:32:11Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3-charger-out.jpg&amp;diff=3197</id>
		<title>File:Elisa3-charger-out.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3-charger-out.jpg&amp;diff=3197"/>
		<updated>2026-04-22T13:32:01Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3-charger-in.jpg&amp;diff=3196</id>
		<title>File:Elisa3-charger-in.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3-charger-in.jpg&amp;diff=3196"/>
		<updated>2026-04-22T13:31:51Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3_and_charger.JPG&amp;diff=3195</id>
		<title>File:Elisa3 and charger.JPG</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3_and_charger.JPG&amp;diff=3195"/>
		<updated>2026-04-22T13:31:40Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3.1-programming.jpg&amp;diff=3194</id>
		<title>File:Elisa3.1-programming.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3.1-programming.jpg&amp;diff=3194"/>
		<updated>2026-04-22T13:31:31Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Elisa3.1-hw-schema-top.jpg&amp;diff=3193</id>
		<title>File:Elisa3.1-hw-schema-top.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Elisa3.1-hw-schema-top.jpg&amp;diff=3193"/>
		<updated>2026-04-22T13:31:14Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa-3-tracking-2robots.jpg&amp;diff=3192</id>
		<title>File:elisa-3-tracking-2robots.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa-3-tracking-2robots.jpg&amp;diff=3192"/>
		<updated>2026-04-22T13:31:03Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-new-case.jpg&amp;diff=3191</id>
		<title>File:elisa3-new-case.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-new-case.jpg&amp;diff=3191"/>
		<updated>2026-04-22T13:30:49Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-matlab.jpg&amp;diff=3190</id>
		<title>File:elisa3-matlab.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-matlab.jpg&amp;diff=3190"/>
		<updated>2026-04-22T13:30:29Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-3.jpg&amp;diff=3189</id>
		<title>File:elisa3-calibration-3.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-3.jpg&amp;diff=3189"/>
		<updated>2026-04-22T13:30:19Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-2.jpg&amp;diff=3188</id>
		<title>File:elisa3-calibration-2.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-2.jpg&amp;diff=3188"/>
		<updated>2026-04-22T13:30:08Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-1.jpg&amp;diff=3187</id>
		<title>File:elisa3-calibration-1.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-calibration-1.jpg&amp;diff=3187"/>
		<updated>2026-04-22T13:29:57Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio3.png&amp;diff=3186</id>
		<title>File:elisa3-atmelstudio3.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio3.png&amp;diff=3186"/>
		<updated>2026-04-22T13:29:47Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio2.png&amp;diff=3185</id>
		<title>File:elisa3-atmelstudio2.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio2.png&amp;diff=3185"/>
		<updated>2026-04-22T13:29:37Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio1.png&amp;diff=3184</id>
		<title>File:elisa3-atmelstudio1.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:elisa3-atmelstudio1.png&amp;diff=3184"/>
		<updated>2026-04-22T13:29:28Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Diffuser-push-down.jpg&amp;diff=3183</id>
		<title>File:Diffuser-push-down.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Diffuser-push-down.jpg&amp;diff=3183"/>
		<updated>2026-04-22T13:29:16Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Diffuser-pull-up.jpg&amp;diff=3182</id>
		<title>File:Diffuser-pull-up.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Diffuser-pull-up.jpg&amp;diff=3182"/>
		<updated>2026-04-22T13:29:06Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Cmd-line-monitor.jpg&amp;diff=3181</id>
		<title>File:Cmd-line-monitor.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Cmd-line-monitor.jpg&amp;diff=3181"/>
		<updated>2026-04-22T13:28:57Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:avrdude-gui.png&amp;diff=3180</id>
		<title>File:avrdude-gui.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:avrdude-gui.png&amp;diff=3180"/>
		<updated>2026-04-22T13:28:47Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:atmel-studio-convert.png&amp;diff=3179</id>
		<title>File:atmel-studio-convert.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:atmel-studio-convert.png&amp;diff=3179"/>
		<updated>2026-04-22T13:28:37Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Antenna-position.jpg&amp;diff=3178</id>
		<title>File:Antenna-position.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Antenna-position.jpg&amp;diff=3178"/>
		<updated>2026-04-22T13:28:27Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Antenna-diffuser.jpg&amp;diff=3177</id>
		<title>File:Antenna-diffuser.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Antenna-diffuser.jpg&amp;diff=3177"/>
		<updated>2026-04-22T13:28:17Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=E-Puck&amp;diff=3176</id>
		<title>E-Puck</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=E-Puck&amp;diff=3176"/>
		<updated>2026-04-22T13:16:42Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&amp;lt;div style=&amp;quot;float:right;&amp;quot;&amp;gt;__TOC__&amp;lt;/div&amp;gt;--&amp;gt;&lt;br /&gt;
=Hardware=&lt;br /&gt;
&lt;br /&gt;
==Revisions==&lt;br /&gt;
There are three hardware revisions: &lt;br /&gt;
* HWRev 1.1: models from 0 to 1499&lt;br /&gt;
* HWRev 1.2: models from 1500 on, production of June 2008&lt;br /&gt;
* HWRev 1.3: models from 3320 on, production August 2014&lt;br /&gt;
&lt;br /&gt;
The following table summarizes the differences between revisions:&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;10&amp;quot; cellspacing=&amp;quot;0&amp;quot;&lt;br /&gt;
!&lt;br /&gt;
!Camera&lt;br /&gt;
!Bluetooth&lt;br /&gt;
!Accelerometer&lt;br /&gt;
!Microphone&lt;br /&gt;
|-&lt;br /&gt;
!HWRev 1.1&lt;br /&gt;
|PixelPlus PO3030 (VGA)&lt;br /&gt;
|LMX9820 Bluetooth 1.1&lt;br /&gt;
|MMA7260 3-axes analog acclerometer&lt;br /&gt;
|SiSonic SP0103NC3-3 &lt;br /&gt;
|-&lt;br /&gt;
!HWRev 1.2&lt;br /&gt;
|PixelPlus PO6030 (VGA)&lt;br /&gt;
|LMX9838 Bluetooth 2.0&lt;br /&gt;
|MMA7260 3-axes analog acclerometer&lt;br /&gt;
|SiSonic SPM0208HD5&lt;br /&gt;
|-&lt;br /&gt;
!HWRev 1.3&lt;br /&gt;
|PixelPlus PO8030 (VGA)&lt;br /&gt;
|LMX9838 Bluetooth 2.0&lt;br /&gt;
|LSM330 3-axes digital (I2C) acclerometer + 3-axes gyroscope&lt;br /&gt;
|SiSonic SPU0414HR5H-SB&lt;br /&gt;
|}&lt;br /&gt;
The updated e-puck library handles automatically the various hardware revisions in order to be compatible with the existing standard software.&lt;br /&gt;
&lt;br /&gt;
===Camera===&lt;br /&gt;
The orientation of the camera is different in each hardware revision and also in the case of HWRev 1.1 the same camera model can be oriented differently, here is an image that shows the different cameras and related orientation:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-cameras.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
The e-puck library configures the camera in order to get the right orientation for all situations except when it is rotated by 90 degrees.&lt;br /&gt;
In order to let the user distinguish the current camera mounted on the robot and in case it is rotated by 90 degrees apply the related processing, the EEPROM is modified based on the camera model mounted on the robot and its orientation. This modification follow these rules: the modification apply only to the last word of the EEPROM, at address 0x7FFFFE; bits 14 and 15 are used to indicate the rotation (11=no rotation, 01=90 degrees, 10=-90 degrees, 00=180 degrees), bits 12 and 13 are used to indicate the camera model (11=PO3030, 10=PO6030, 01=PO8030). The possible values for the EEPROM are thus:&lt;br /&gt;
* 0xFFFF (0xFFF1111): PO3030 with no rotation&lt;br /&gt;
* 0xFFFE (0xFFF1110): PO3030 turned by -90 degrees&lt;br /&gt;
* 0xFFF9 (0xFFF1000): PO6030 turned by 180 degrees&lt;br /&gt;
* 0xFFF7 (0xFFF0111): PO8030 with no rotation&lt;br /&gt;
&lt;br /&gt;
The following example illustrates how to read this word:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;DataEEPROM.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
/*read HW version from the eeprom (last word)*/&lt;br /&gt;
&lt;br /&gt;
int HWversion=0xFFFF;&lt;br /&gt;
&lt;br /&gt;
int temp = 0;&lt;br /&gt;
&lt;br /&gt;
temp = ReadEE(0x7F,0xFFFE,&amp;amp;HWversion, 1);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This project ([https://projects.gctronic.com/E-Puck/writeEEPROMsrc.zip src]) is an example on how to write the last word of the EEPROM.&lt;br /&gt;
&lt;br /&gt;
Beware that not all robots are shipped with the EEPROM programmed as specified previously. It is up to the user to check this modification by simply using the advanced sercom demo (selector in position 3) and requesting the version (command &amp;lt;code&amp;gt;v&amp;lt;/code&amp;gt;); the hardware version returned by the command corresponds to the value of the last word of the EEPROM.&lt;br /&gt;
&lt;br /&gt;
===Accelerometer===&lt;br /&gt;
The actual accelerometer mounted on the robot is automatically detected by the library at startup. The values ranges of the digital accelerometer are different from the analog accelerometer, but the library scale them to be similar in order to be compatible with the existing demos. The orientation of the accelerometer is shown below, the x axis points left, the y axis points forward and z points upward:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-acc-directions.png|150px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
For users playing with e-puck HWRev1.3 and gumstix extension refer to section [https://www.gctronic.com/doc/index.php/Overo_Extension#Accelerometer_and_gyroscope_.28e-puck_HWRev_1.3.29 Accelerometer and gyroscope (e-puck_HWRev_1.3)].&lt;br /&gt;
&lt;br /&gt;
===Microphone===&lt;br /&gt;
From HWRev 1.3 the microphone sensitivity resulted a little bit different from the previous hardware revision; some empirical tests show that the difference is about &amp;amp;#177;15% so beware to adapt the thresholds in your applications if you need.&lt;br /&gt;
&lt;br /&gt;
===Gyroscope===&lt;br /&gt;
The gyroscope is available from HWRev 1.3. The orientation of the gyro is shown below, the x axis points forward, the y axis points left and the z axis points upward:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-gyro-directions.png|150px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
For users playing with e-puck HWRev1.3 and gumstix extension refer to section [https://www.gctronic.com/doc/index.php/Overo_Extension#Accelerometer_and_gyroscope_.28e-puck_HWRev_1.3.29 Accelerometer and gyroscope (e-puck_HWRev_1.3)].&lt;br /&gt;
&lt;br /&gt;
==Specifications==&lt;br /&gt;
The hardware specifications are valid for all e-puck models, except when explicitly specified with an hardware revision. &lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Microcontroller&#039;&#039;&#039;: Microchip dsPIC30F6014A&lt;br /&gt;
** [https://projects.gctronic.com/E-Puck/docs/dsPIC30F/dsPIC30F6011A-6012A-6013A-6014A.pdf dsPIC30F6011A/6012A/6013A/6014A Data Sheet]&lt;br /&gt;
** [https://projects.gctronic.com/E-Puck/docs/dsPIC30F/dsPIC30F-family-reference-manual.pdf dsPIC30F Family Reference Manual]&lt;br /&gt;
** [https://projects.gctronic.com/E-Puck/docs/dsPIC30F/dsPIC30F_Programmers_reference_manual.pdf dsPIC30F/33F Programmer&#039;s Reference Manual]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Camera&#039;&#039;&#039;: [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=5&amp;amp;Itemid=14 details]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.1&#039;&#039;&#039;: PixelPlus PO3030K CMOS image sensor, [https://projects.gctronic.com/E-Puck/docs/Camera/PO3030K.pdf Data Sheet], no IR cut filter&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.2&#039;&#039;&#039;: PixelPlus PO6030K CMOS image sensor, [https://projects.gctronic.com/E-Puck/docs/Camera/PO6030K.pdf Data Sheet], no IR cut filter&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.3&#039;&#039;&#039;: PixelPlus PO8030D CMOS image sensor, [https://projects.gctronic.com/E-Puck/docs/Camera/PO8030D.pdf Data Sheet], no IR cut filter&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Bluetooth&#039;&#039;&#039;:&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.1&#039;&#039;&#039;: National Semiconductor LMX9820A Bluetooth Serial Port Module, [https://projects.gctronic.com/E-Puck/docs/BT/lmx9820.pdf Data Sheet], [https://projects.gctronic.com/E-Puck/docs/BT/lmx9820-sw-user-guide.pdf Software User Guide]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.2 and 1.3&#039;&#039;&#039;: Texas Instruments LMX9838 Bluetooth Serial Port Module, [https://projects.gctronic.com/E-Puck/docs/BT/lmx9838.pdf Data Sheet], [https://projects.gctronic.com/E-Puck/docs/BT/lmx9838-sw-user-guide.pdf Software User Guide]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Microphone&#039;&#039;&#039;: [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=19&amp;amp;Itemid=11 details]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.1&#039;&#039;&#039;: Silicon Labs Si3000 Voice Codec, [https://projects.gctronic.com/E-Puck/docs/Audio/SP0103NC3.pdf Knowles Acoustics SiSonic SP0103NC3-3 microphone with integrated amplifier]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.2&#039;&#039;&#039;: [https://projects.gctronic.com/E-Puck/docs/Audio/SPM0208HD5.pdf Knowles Acoustics SiSonic amplified mini microphone SPM0208HD5]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.3&#039;&#039;&#039;: [https://projects.gctronic.com/E-Puck/docs/Audio/SPU0414HR5H-SB.pdf Knowles Acoustics SiSonic amplified mini microphone SPU0414HR5H-SB]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Optical sensors&#039;&#039;&#039;: [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=22&amp;amp;Itemid=13 details]&lt;br /&gt;
** Vishay Semiconductors Reflective Optical Sensor [https://projects.gctronic.com/elisa3/tcrt1000.pdf Data Sheet]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Accelerometer&#039;&#039;&#039;: [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=21&amp;amp;Itemid=12 details]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.1 and 1.2&#039;&#039;&#039;: Freescale Semiconductor MMA7260Q three axis accelerometer, [https://projects.gctronic.com/E-Puck/docs/Accelerometer/MMA7260Q-Rev1.pdf Data Sheet]&lt;br /&gt;
** &#039;&#039;&#039;HWRev 1.3&#039;&#039;&#039;: STMicroelectronics LSM330 3D accelerometer and 3D gyroscope, [https://projects.gctronic.com/E-Puck/docs/acc+gyro/LSM330.pdf Data Sheet]&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;&#039;Motors&#039;&#039;&#039;: [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=7&amp;amp;Itemid=9 details]&lt;br /&gt;
&lt;br /&gt;
==Serial communication==&lt;br /&gt;
The communication between the robot and the computer can be also handled with a serial cable; the serial connector position on the robot, the related cable and the electric schema are shown on the following figures. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:E-puck-serial-connector.jpg|200px]] [[File:serial-cable-shop.jpg|400px]] [[File:RS232_connector_EJumper.gif|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to communicate with the robot through a serial line, the robot firmware must be implemented using the functions of the UART2 instead the one of UART1 (BT). All the functions implemented for the UART1 are also available for the UART2, so it&#039;s only a matter of changing the function call names.&lt;br /&gt;
Anyway the [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware standard firmware] contains already a mode that communicates over serial line selecting position 11; in this mode you can configure the BT.&lt;br /&gt;
&lt;br /&gt;
==I2C communication==&lt;br /&gt;
The camera, the ground sensors extension, the accelerometer (e-puck HWRev 1.3 only) and the gyro (e-puck HWRev 1.3 only) are connected to the I2C bus as slave devices (the microcontroller is the master).&amp;lt;br/&amp;gt;&lt;br /&gt;
The &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; command of the [{{fullurl:Advanced sercom protocol}} Advanced sercom protocol.] can be used to read the registers values of these sensors. &amp;lt;br/&amp;gt;&lt;br /&gt;
For instance you can read the camera id with the following commands: &amp;lt;code&amp;gt;y,220,0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;y,220,1&amp;lt;/code&amp;gt; that return respectively &amp;lt;code&amp;gt;128=0x80&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;48=0x30&amp;lt;/code&amp;gt; (id=8030). In the same way you can read any register with the general command &amp;lt;code&amp;gt;y,220,REG_ADDR&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
For the accelerometer you must use &amp;lt;code&amp;gt;60&amp;lt;/code&amp;gt; as device address (&amp;lt;code&amp;gt;y,60,REG_ADDR&amp;lt;/code&amp;gt;) and for the gyro you must use &amp;lt;code&amp;gt;212&amp;lt;/code&amp;gt; (&amp;lt;code&amp;gt;y,212,REG_ADDR&amp;lt;/code&amp;gt;).&amp;lt;br/&amp;gt;&lt;br /&gt;
The device address value to be used with the &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; is obtained by shifting by one position left the I2C 7-bit address of the device, for example the camera 7-bit address is &amp;lt;code&amp;gt;0x6E&amp;lt;/code&amp;gt;, by shifting one position left we get &amp;lt;code&amp;gt;0xDC=220&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==Batteries==&lt;br /&gt;
===Battery from 2016 (last quarter) on===&lt;br /&gt;
The new batteries of 2016 are bit heavier (38g) but a bit more powerful (1800 mAh). The look is similar to the previous batteries and they are of course compatible with the robot and the charger.&amp;lt;br/&amp;gt;&lt;br /&gt;
Take care when inserting the battery in the robot to not scratch the plastic sticker. You would need to apply a bit more force than before when inserting and removing the battery.&amp;lt;br/&amp;gt;&lt;br /&gt;
The battery is covered with a plastic protection in order to avoid any possible short circuit during inserting/removing of the battery. &amp;lt;br/&amp;gt;&lt;br /&gt;
The battery can be inserted only in one way: the side where the plastic protection do not cover completely the battery &amp;quot;top&amp;quot; must be towards the ground.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; &#039;&#039;&#039;DO NOT REMOVE THE BLACK PLASTIC PROTECTION!&#039;&#039;&#039; &amp;lt;/font&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:battery-epuck-2016.jpg|250px]] [[File:battery-epuck-2016-2.jpg|200px]] [[File:battery-epuck-2016-3.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
This battery doesn&#039;t fit perfectly in older chargers, but it can be inserted anyway in the charger in order to make a good contact and charge it; when the contact is ok you will see the led turned on.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:batt2016-charger-side.jpg|250px]] [[File:batt2016-charger-top.jpg|200px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Battery from 2013 to 2016===&lt;br /&gt;
The new batteries of 2013 are lighter (33g) and a bit more powerful (1600 mAh). The look is different but they are of course compatible with the robot and the charger. Take care when inserting the battery in the robot to not scratch the plastic sticker. Is not a safety issue but keep them nice as in the beginning ;-).&amp;lt;br/&amp;gt;&lt;br /&gt;
The battery is covered with a plastic protection in order to avoid any possible short circuit during inserting/removing of the battery. &amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; &#039;&#039;&#039;DO NOT REMOVE THE PLASTIC PROTECTION!&#039;&#039;&#039; &amp;lt;/font&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:battery-epuck-new1.jpg|250px]] [[File:battery-epuck-new2.jpg|275px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Battery up to 2012===&lt;br /&gt;
The robots delivered in 2012 had a small difference regarding the battery; the type of battery is always the same but the mechanics of the positive pin is slightly different from one version to the other. The version with the black plastic cover comes out a bit more then the version with the brown cardboard cover. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Batt-covers.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The e-puck contact has been slightly modified to have a better contact with both versions as shown in the following figure; see the [https://projects.gctronic.com/E-Puck/docs/contact-modification.pdf Contact-modification.pdf] document to get more information on how to apply this modification.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Battery-contact.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The charger makes contact with both versions, as illustrated below. &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Batt-charger.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The positive pin has the tendency to get a bit oxidated and might need to be scratched a bit for a perfect connection.&lt;br /&gt;
&amp;lt;!-- foto --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Charger circuit diagram===&lt;br /&gt;
The circuit diagram of the e-puck charger is available on the following link [https://www.gctronic.com/doc/images/charger-circuit-diagram.png charger-circuit-diagram.png].&lt;br /&gt;
&lt;br /&gt;
=Software=&lt;br /&gt;
==Getting started==&lt;br /&gt;
The robot is shipped with a standard firmware that let you immediately interact with the robot, follow these steps:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) put the robot selector in position 3&amp;lt;br/&amp;gt;&lt;br /&gt;
2) turn on the robot and pair it with the computer:&lt;br /&gt;
* if you&#039;re running Linux use the system bluetooth manager to pair the robot with the computer and then issue the command &#039;&#039;sudo rfcomm bind /dev/rfcomm0 10:00:E8:C5:61:C9&#039;&#039;, where &#039;&#039;10:00:E8:C5:61:C9&#039;&#039; is the BT mac address of the robot&lt;br /&gt;
* if you&#039;re running Windows there is a detailed guide from the [https://e-puck.gctronic.com/index.php?option=com_phocadownload&amp;amp;view=category&amp;amp;id=5:tutorials&amp;amp;Itemid=38 e-puck.org tutorials], here is a direct link to the guide [https://projects.gctronic.com/E-Puck/BTboot-epuck-gettingstarted.pdf BTboot epuck gettingstarted] (refer to chapter 2.3, page 6)&lt;br /&gt;
3) execute a terminal program (e.g. minicom for Linux or teraterm for Windows) and configure the connection with 115200-8N1. The serial device path should be typically something like &amp;quot;/dev/rfcomm0&amp;quot;. Make sure that the flow control parameter of minicom called &amp;quot;Hardware&amp;quot; is set to &amp;quot;No&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
4) type &#039;&#039;h+ENTER&#039;&#039; and you&#039;ll be prompted with a menu that contains all the commands you can issue to the robot, for instance you can retrieve the sensors values or turn on the leds&lt;br /&gt;
&lt;br /&gt;
==Library==&lt;br /&gt;
The embedded software running on the e-puck is continuously extended and managed in the following git repo [https://github.com/gctronic/e-puck-library https://github.com/gctronic/e-puck-library]. The repo comprises a complete library to work with all the sensors mounted on the e-puck and is the basis for many demos. You can download the library documentation form the following link [https://projects.gctronic.com/E-Puck/e-puck-library.pdf e-puck-library.pdf].&amp;lt;br/&amp;gt;&lt;br /&gt;
The content of the repo is the following:&lt;br /&gt;
* library: this is the low level library of the e-puck&lt;br /&gt;
* program:&lt;br /&gt;
** &amp;quot;Bluetooth mirror&amp;quot;: interact with the Bluetooth chip through serial cable&lt;br /&gt;
** &amp;quot;BTCom&amp;quot;: basically it is the &amp;quot;asercom&amp;quot; implementation, refer to [https://www.gctronic.com/doc/index.php/Advanced_sercom_protocol Advanced sercom protocol]&lt;br /&gt;
** EPFL demo project: some nice demos bundled in one project, such as sound source location, obstacle avoidance and color blob detection (red and green). Some of these demos are included in the GCtronic standard firmware.&lt;br /&gt;
** GCtronic standard firmware project, refer to section [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware Standard firmware]&lt;br /&gt;
* tool:&lt;br /&gt;
** computer-side and e-puck side bootloader&lt;br /&gt;
** matlab interface/monitor for e-puck&lt;br /&gt;
** C++ interface/monitor for e-puck&lt;br /&gt;
&lt;br /&gt;
In order to download a snapshot of the repo, go to the [https://github.com/gctronic/e-puck-library https://github.com/gctronic/e-puck-library] page and then click on the green botton named &amp;lt;code&amp;gt;Clone or download&amp;lt;/code&amp;gt; and select &amp;lt;code&amp;gt;Download ZIP&amp;lt;/code&amp;gt; as shonw in the following figure.&lt;br /&gt;
[[File:e-puck-snapshot.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Structure===&lt;br /&gt;
As previously mentioned the git repository includes a library to which many demos are linked. Only updates to this library that will be useful to others people and/or correct errors should be commited; some demos of this wiki makes changes to the library for the solely purpose of running the demo and thus they aren&#039;t commited to the repo. &amp;lt;br/&amp;gt;&lt;br /&gt;
In order to separate the original e-puck library from what is modified in the library for the current demo, all the projects (created with MPLAB) share the same structure, that is they have to be placed within the &#039;&#039;program&#039;&#039; folder of the repository and must contain only the files of the library (and their dependencies) that have been modified. An example of this structure is shown afterwards:&lt;br /&gt;
* e-puck-library&lt;br /&gt;
** library&lt;br /&gt;
*** a_d&lt;br /&gt;
*** bluetooth&lt;br /&gt;
*** ...&lt;br /&gt;
** program&lt;br /&gt;
*** project1&lt;br /&gt;
**** a_d&lt;br /&gt;
***** e_prox.c&lt;br /&gt;
*** project2&lt;br /&gt;
*** ...&lt;br /&gt;
** tool&lt;br /&gt;
The library folder basically never change (unless bug fixes or new features for all users are developed). All the projects have a reference to this library folder in their build options. &amp;lt;br/&amp;gt;&lt;br /&gt;
If some library files are modified for the current project, they are inlcuded in the project folder following the same structure of the original library, as shown for &#039;&#039;project1&#039;&#039;.&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to build the project you then need to add all the modified library files from the project directory and all the others files from the main library folder. Not all files are always needed, it depends on the features that are used; for instance if the camera isn&#039;t used, the related library file could be omitted from the project saving memory space.&lt;br /&gt;
&lt;br /&gt;
==Standard firmware==&lt;br /&gt;
The robot is initially programmed with a firmware that includes many demos that could be started based on the selector position:&lt;br /&gt;
* Selector position 0: Shock detection. Look at runaccelerometer.h for more information.&lt;br /&gt;
* Selector position 1: Detect the sound source. Look at rundetectsound.h for more information.&lt;br /&gt;
* Selector position 2: Follow the wall. Look at runwallfollow.h for more information.&lt;br /&gt;
* Selector position 3: [{{fullurl:Advanced sercom protocol}} Advanced sercom protocol.]&lt;br /&gt;
* Selector positoin 4: Let the robot move in a square path (using either odometry or gyroscope).&lt;br /&gt;
* Selector position 5: Sensor &amp;amp;quot;feedback display&amp;amp;quot;.&lt;br /&gt;
* Selector position 6: Camera points to light.&lt;br /&gt;
* Selector position 7: Act like the ASL RS232 - I2C translator.&lt;br /&gt;
* Selector position 8: Show the ground direction. Look at rungrounddirection.h for more information.&lt;br /&gt;
* Selector position 9: Show the rotation rates of the gyroscope axes. Look at the rungyroscope.h for more information.&lt;br /&gt;
* Selector position 10: This position is used to work with the gumstix extension. &lt;br /&gt;
* Selector position 11: Bluetooth configuration (serial communication).&lt;br /&gt;
* Selector position 12: Global test (serial communication).&lt;br /&gt;
* Selector position 13: Uart1 to uart2 transponder.&lt;br /&gt;
* Selector position 14: Follow what is detected by the two front proximities detectors. Look at runbreitenberg_adv.h for more information.&lt;br /&gt;
* Selector position 15: Simple dust cleaner behaviour.&lt;br /&gt;
&amp;lt;!--* Other selector position: Avoid the obstacles. Look at runbreitenberg_adv.h for more information.--&amp;gt;&lt;br /&gt;
The pre-built fimrware is available from [https://projects.gctronic.com/E-Puck/DemoGCtronic-complete/DemoGCtronic-complete-4bba145.hex DemoGCtronic-complete.hex].&amp;lt;br/&amp;gt;&lt;br /&gt;
You can have a look at the source code from the following link [https://github.com/gctronic/e-puck-library/tree/master/program/DemoGCtronic-complete https://github.com/gctronic/e-puck-library/tree/master/program/DemoGCtronic-complete]; beware that the project is actually included in the e-puck library repository, refer to section [https://www.gctronic.com/doc/index.php?title=E-Puck#Library Library] to download it.&lt;br /&gt;
&lt;br /&gt;
===Project building===&lt;br /&gt;
In order to build the project you need to install the MPLAB X IDE and related compiler, refer to section [https://www.gctronic.com/doc/index.php?title=E-Puck#MPLAB_X Programming: MPLAB X].&amp;lt;br/&amp;gt;&lt;br /&gt;
The standard firmware project is based on the e-puck library (refer to [https://www.gctronic.com/doc/index.php?title=E-Puck#Library Library] section).&amp;lt;br/&amp;gt;&lt;br /&gt;
To build the project follow these steps:&amp;lt;br/&amp;gt;&lt;br /&gt;
1) download and extract the e-puck library repository (refer to section [https://www.gctronic.com/doc/index.php?title=E-Puck#Library Library]), let say in the folder &amp;lt;code&amp;gt;e-puck-library&amp;lt;/code&amp;gt;; you should have the following situation: &lt;br /&gt;
* e-puck-library&lt;br /&gt;
** library&lt;br /&gt;
** program&lt;br /&gt;
*** ...&lt;br /&gt;
*** DemoGCtronic-complete&lt;br /&gt;
** tool&lt;br /&gt;
2) Open MPLAB X, then click &amp;lt;code&amp;gt;File=&amp;gt;Open Project&amp;lt;/code&amp;gt; and select the project file &amp;lt;code&amp;gt;demoGCtronic.X&amp;lt;/code&amp;gt; you can find in &amp;lt;code&amp;gt;e-puck-library\program\DemoGCtronic-complete&amp;lt;/code&amp;gt;. If you&#039;re asked to upgrade the project to the current IDE version, click &amp;lt;code&amp;gt;yes&amp;lt;/code&amp;gt; to confirm.&amp;lt;br/&amp;gt;&lt;br /&gt;
3) Right click on the project name (on the left panel) and select &amp;lt;code&amp;gt;Properties&amp;lt;/code&amp;gt; as shown in the following figure:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:e-puck-project-build1.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
4) Select the &amp;lt;code&amp;gt;XC16&amp;lt;/code&amp;gt; compiler from the &amp;lt;code&amp;gt;Compiler Toolchain&amp;lt;/code&amp;gt; section and then click &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt; as shown in the following figure:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:e-puck-project-build2.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
5) Open the project properties once more (right click on project name and then select &amp;lt;code&amp;gt;Properites&amp;lt;/code&amp;gt;), a new configuration will be available for the XC16 compiler. On the left panel select &amp;lt;code&amp;gt;xc16-gcc&amp;lt;/code&amp;gt;, then on the right specify &amp;lt;code&amp;gt;Memory model&amp;lt;/code&amp;gt; and verify that the &amp;lt;code&amp;gt;Code model&amp;lt;/code&amp;gt; is set to &amp;lt;code&amp;gt;Large&amp;lt;/code&amp;gt;. Confirm with &amp;lt;code&amp;gt;OK&amp;lt;/code&amp;gt; as shown in the following figure:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:e-puck-project-build3.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
6) Now you can build the project by clicking on the &amp;lt;code&amp;gt;Build project&amp;lt;/code&amp;gt; button (hammer icon on the top) or by pressing &amp;lt;code&amp;gt;F11&amp;lt;/code&amp;gt;; if all is working you should end up with a successfully built firmware as shown in the following figure:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:e-puck-project-build4.png|500px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Programming==&lt;br /&gt;
===MPLAB X===&lt;br /&gt;
If you are interested in development of embedded applications, you should firstly choose an adequate development environment. One of the most known IDE is the &amp;lt;code&amp;gt;MPLAB Integrated Development Environment&amp;lt;/code&amp;gt; that you could download for free from the Microchip site; Microchip offers also the C compiler for free. One big advantage of this IDE is that it is multiplatform (Windows, Linux, Mac) and also the compiler is available for each platform.&amp;lt;br/&amp;gt;&lt;br /&gt;
To work with the e-puck software you need to:&lt;br /&gt;
* download and install the [https://www.microchip.com/mplab/mplab-x-ide MPLAB X IDE]; during installation select also &amp;lt;code&amp;gt;MPLAB IPE&amp;lt;/code&amp;gt; to be installed, it is a nice utility to have&lt;br /&gt;
* download and install the [https://www.microchip.com/mplab/compilers compiler], it must be the &amp;lt;code&amp;gt;MPLAB XC16&amp;lt;/code&amp;gt; (supports all 16-bit PIC MCUs and dsPICs)&lt;br /&gt;
&lt;br /&gt;
Useful information related to the compiler can be found in the [https://projects.gctronic.com/E-Puck/docs/Programming/MPLAB_XC16_C_compiler_users_guide.pdf  MPLAB XC16 C compiler user&#039;s guide].&lt;br /&gt;
&lt;br /&gt;
===Aseba===&lt;br /&gt;
Aseba is a set of tools which allow novices to program robots easily and efficiently, refere to [https://aseba.wikidot.com/en:gettingstarted https://aseba.wikidot.com/en:gettingstarted] for more information. &amp;lt;br/&amp;gt;&lt;br /&gt;
Here is the page with the basic information needed to start working with Aseba and the e-puck robot [https://aseba.wikidot.com/en:e-puck https://aseba.wikidot.com/en:e-puck]. &amp;lt;br/&amp;gt;&lt;br /&gt;
You can download an MPLAB X project based on the git repo [https://github.com/aseba-community/aseba-target-epuck https://github.com/aseba-community/aseba-target-epuck] in the following link [https://projects.gctronic.com/E-Puck/aseba.zip aseba.zip]; place it in the &amp;quot;e-puck-library/program&amp;quot; folder (refer to section [https://www.gctronic.com/doc/index.php/E-Puck#Library https://www.gctronic.com/doc/index.php/E-Puck#Library] for more information on how to build).&amp;lt;br/&amp;gt;&lt;br /&gt;
You can download the last aseba firmware for the e-puck from the following link [https://projects.gctronic.com/E-Puck/aseba-target-epuck.hex aseba-target-epuck.hex].&amp;lt;br/&amp;gt;&lt;br /&gt;
Beware that at the moment the only bootloader capable of uploading the &#039;&#039;aseba-target-epuck.hex&#039;&#039; to the robot is the Linux version.&lt;br /&gt;
&lt;br /&gt;
===Python===&lt;br /&gt;
Python is a widely used programming language supported by a large and comprehensive standard library. A Python library is available enabling the remote control of the e-puck robot, read the sensors values, control the motors while running the heavy processes on a computer.&lt;br /&gt;
You can start playing with the e-puck and Python by downloading the [https://projects.gctronic.com/E-Puck/epuck-python.zip e-puck python package], it contains:&lt;br /&gt;
* [https://www.python.org/download/releases/2.6.6/ Python 2.6.6]&lt;br /&gt;
* [https://pypi.python.org/pypi/setuptools Python setup tools]&lt;br /&gt;
* e-puck Python library: [https://github.com/mmartinortiz/pyePuck source]&lt;br /&gt;
* e-puck Python library dependencies: [https://github.com/karulis/pybluez pybluez], [https://pillow.readthedocs.io/en/stable/ Python imaging library]&lt;br /&gt;
* some examples (refers to [https://github.com/mmartinortiz/pyePuck/tree/master/examples examples])&lt;br /&gt;
Follow these steps to install Python and run your first Python example (this instructions are for Windows but the procedure should be similar also for Linux and Mac OS):&lt;br /&gt;
# Install Python (the executable &#039;&#039;python-2.6.6.msi&#039;&#039; is in the &#039;&#039;Python2.6&#039;&#039; directory)&lt;br /&gt;
# Install the Python setup tools by running the script &#039;&#039;ez_setup.py&#039;&#039; you find in the &#039;&#039;Python2.6&#039;&#039; directory: &lt;br /&gt;
## issue the command &#039;&#039;python ez_setup.py&#039;&#039; in a terminal&lt;br /&gt;
## alternatively you can download an IDE that will help you in programming, run and debug your code; a valid IDE is called [https://www.jetbrains.com/pycharm/ PyCharm]&lt;br /&gt;
# Install e-puck Python library dependencies:&lt;br /&gt;
## install pybluez by issueing the command &#039;&#039;python setup.py install&#039;&#039; in a terminal (be sure to be in the &#039;&#039;dependencies\pybluez-master&#039;&#039; directory)&lt;br /&gt;
## install the PIL library by executing &#039;&#039;PIL-1.1.7.win32-py2.6.exe&#039;&#039; you find in the  &#039;&#039;dependencies&#039;&#039; directory&lt;br /&gt;
# Program the e-puck with the last [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware standard firmware] and put the selector in position 3&lt;br /&gt;
# Configure the Bluetooth connection with the e-puck in the computer (add Bluetooth device and insert its pin)&lt;br /&gt;
## when you add the e-puck robot as Bluetooth device, right click on the device and choose property; in the &amp;quot;Bluetooth&amp;quot; tab you&#039;ll find the mac address (something like 10:00:e8:c5:61:c9). Copy this address since you&#039;ll need it to connect to the robot when running the Python scripts&lt;br /&gt;
# In the &#039;&#039;examples&#039;&#039; directory you&#039;ll find the e-puck library &#039;&#039;ePuck.py&#039;&#039; and 3 examples &#039;&#039;braitenberg.py&#039;&#039;, &#039;&#039;line_follower.py&#039;&#039;, &#039;&#039;photo_taker.py&#039;&#039;&lt;br /&gt;
## the &#039;&#039;ePuck.py&#039;&#039; file must be placed in the same directory as your script&lt;br /&gt;
## to run an example issue the command &#039;&#039;python script_name.py mac_address&#039;&#039;, where &#039;&#039;script_name&#039;&#039; is either &#039;&#039;braitenberg&#039;&#039; or &#039;&#039;line_follower&#039;&#039; or &#039;&#039;photo_taker&#039;&#039; and &#039;&#039;mac_address&#039;&#039; is the address that you previously annotate (e.g. &#039;&#039;10:00:e8:c5:61:c9&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
==PC interface==&lt;br /&gt;
An interface running on a computer and connecting to the e-puck through bluetooth based on the advanced sercom protocol (selector 3) was developed; from this interface it&#039;s possible to have information about all the sensors, receive camera images and control the leds and motors. The source code is available from the following links:&lt;br /&gt;
&amp;lt;!--* Windows [https://www.gctronic.com/files/e-puckMonitor_2.0.rar version 2.0] ([https://www.gctronic.com/files/e-puckMonitor_2.0_code.rar Monitor2.0 source code])--&amp;gt;&lt;br /&gt;
* Multiplatform version 3.0 ([https://projects.gctronic.com/E-Puck/Monitor/MultiPlatformMonitorSrc1.8.zip Monitor3.0 source code]); the application is a Qt project, so the compilation may be handled easily with [https://www.qt.io/product/development-tools Qt Creator]; alternatively [https://doc.qt.io/qt-6/qmake-manual.html qmake] can be used. The following executables are compiled dynamically, so the [https://www.qt.io/download Qt library (4.5.0 or higher)] must be installed in the system in order to run them:&lt;br /&gt;
**[https://www.gctronic.com/doc/images/EPuckMonitor Linux executable]: before running the executable, type &amp;amp;quot;chmod +x file&amp;amp;quot;&lt;br /&gt;
**[https://www.gctronic.com/doc/images/EPuckMonitor.app.zip MacOS executable]&lt;br /&gt;
**[https://www.gctronic.com/doc/images/EPuckMonitorWin.zip Windows executable (+ dlls); tested on Windows XP, Windows Vista, Windows 7, Windows 10] &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Monitor3.0.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
Since the last version comprises a basic OpenGL representation of the e-puck you will need also the OpenGL extension libraries in order to compile the project; these should be included in the Qt SDK, but if you encounter problems refers to [https://doc.qt.io/qt-6/qtopengl-index.html qtopengl]; basically you need to download manually the OpenGL libraries: GLX (Linux), CGL (MacOS), WGL (Windows). &amp;lt;br/&amp;gt;&lt;br /&gt;
Once the project is built dynamically, some errors about missing dll may be thrown; one of these missing libraries could be the [https://projects.gctronic.com/E-Puck/Monitor/mingwm10.dll mingwm10.dll]. Others could be related to Qt. To solve the problem you need either to build the project statically, or to register the libraries on the system, or to manually include all the dll with the executable.&lt;br /&gt;
&lt;br /&gt;
==Connecting to multiple robots==&lt;br /&gt;
A Python example is available for e-puck2 in the following section [https://www.gctronic.com/doc/index.php?title=e-puck2_PC_side_development#Connecting_to_multiple_robots PC side development: Connecting to multiple robots]. This example is compatible also with the e-puck1 robot.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===Basic demos===&lt;br /&gt;
The following set of simple programs for the e-puck has an increasing degree of complexity, from very basic LED blinking up to motor control depending on sensor input; it&#039;s a good starting point for beginner users. The first demos do not use interrupts and keep to a minimum the use of the library.&lt;br /&gt;
You can download the set of these demos from this link [https://www.gctronic.com/doc/images/BasicDemos.zip BasicDemos.zip].&amp;lt;br/&amp;gt;&lt;br /&gt;
A list of these basic programs is listed below:&lt;br /&gt;
* demo0: very simple LEDs blinking&lt;br /&gt;
* demo1: LEDs blinking (pause with timer)&lt;br /&gt;
* demo2: selector reading + LEDs&lt;br /&gt;
* demo3: send selector position via Bluetooth (simplified method)&lt;br /&gt;
* demo4: proximity reading with interrupts + LEDs&lt;br /&gt;
* demo5: proximity reading with interrupts + LEDs + send values via BT (assembler version with interrupt and buffer)&lt;br /&gt;
* demo6: motor speed controlled depending on front proximity sensor values&lt;br /&gt;
&lt;br /&gt;
Compilation: the demos can be edited and compiled using MPLAB IDE (windows), clicking directly on the project file. The demos should be compiled with MPLAB-C30 on all operating systems.&lt;br /&gt;
The compiled .hex file is downloaded to the e-puck robot via Bluetooth using for example tinyBootloader.&lt;br /&gt;
&lt;br /&gt;
===Audio recording===&lt;br /&gt;
This demo program ([https://projects.gctronic.com/E-Puck/DemoGCtronic-recording/DemoGCtronic-recording.hex hex file], [https://projects.gctronic.com/E-Puck/DemoGCtronic-recording/DemoGCtronic-recording.zip MPLAB project]) let the e-puck recording for about two seconds whatever you like and then reproduces it infinitely. &amp;lt;br/&amp;gt;&lt;br /&gt;
The program starts with a led animation (flow) and then turns all leds on for about two seconds, this is the moment for recording; note that only the right micro (mic0) is used.&amp;lt;br/&amp;gt;&lt;br /&gt;
It&#039;s possible also to choose the volume/amplification of the reproduction using the selector (from 1 to 16).&lt;br /&gt;
&lt;br /&gt;
===Still images===&lt;br /&gt;
This demo program is optimized to let the robot handle images with resolution up to 640x480 pixels (the maximum reachable by the camera); after acquisition, the robot sends the images to a computer through bluetooth. This zip [https://projects.gctronic.com/E-Puck/ImageReceiverBT.zip ImageReceiverBT.zip] contains both the program for the robot (hex file) and the application for the computer (Windows platform). The selector of the robot must be in position 3.&amp;lt;br/&amp;gt;&lt;br /&gt;
You can find the sources for the application running on the computer side from this link [https://projects.gctronic.com/E-Puck/ImageReceiverBTsrc.rar ImageReceiverBTsrc.rar]. &amp;lt;br/&amp;gt;&lt;br /&gt;
You can find the MPLAB project for the application running on the robot from this link [https://projects.gctronic.com/E-Puck/DemoGCtronic-vga-images.zip DemoGCtronic-vga-images.zip].&lt;br /&gt;
&lt;br /&gt;
===Robots Collective Behavior===&lt;br /&gt;
This is a Bachelor project developed by Jean-Roch Lauper at the [https://www.unifr.ch/ University of Fribourg]. The project&#039;s focus is on collective behaviors as well as on the use of sound to communicate between robots; moreover there are demos to interact with the robot through sensors and play with sound.&amp;lt;br/&amp;gt;&lt;br /&gt;
The code is available on [https://github.com/jrlauper/jrl_epuck Github]. Demo videos are available on [https://www.youtube.com/playlist?list=PLrscHgSUZPdr38tirAsB4_4Q93khKP9Rv Youtube].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
====Sampling frequency tutorial====&lt;br /&gt;
This tutorial explains how to setup a desired sampling frequency for the microphones; this tutorial is related to the &amp;amp;quot;Recoding-demo&amp;amp;quot;.&lt;br /&gt;
In the [https://ww1.microchip.com/downloads/en/DeviceDoc/70046E.pdf dsPIC30F Family Reference Manual], page 472, there is a formula to get the period of the conversion time (Tad):&lt;br /&gt;
	Tad = (Tcy*(ADCS+1))/2&lt;br /&gt;
&lt;br /&gt;
Since for every complete A/D conversion we need 14 Tad, and we wait 1 Tad before starting conversion after acquisition (software selectable in ADCON3bits.SAMC), &lt;br /&gt;
then we need a total of 15 Tad for every sample. So we can derive the period of every sample, that is:&lt;br /&gt;
	Tsample = 15*Tad = 15*(Tcy*(ADCS+1))/2&lt;br /&gt;
&lt;br /&gt;
Remember that the period is the inverse of the frequency, so after some simple passages we get that the frequency of the sample is:&lt;br /&gt;
	Fsample = (2*Fcy)/(15*(ADCS+1)&lt;br /&gt;
&lt;br /&gt;
We can now revert the formula and deciding the value of ADCS based on our desired sampling frequency:&lt;br /&gt;
	ADCS = ((2*Fcy)/(15*Fsample))-1&lt;br /&gt;
&lt;br /&gt;
The value of ADCS has the following contraints:&lt;br /&gt;
- max value = 63 (6 bits)&lt;br /&gt;
- min value = 20, since Tad must be at least 666.67 ns (from the formula at page 472 we have ADCS = ((2*Tad)/Tcy)-1 = (2*Fcy/Fad)-1 = ((2*14745600)/(1/666.67e-9))-1=20)&lt;br /&gt;
&lt;br /&gt;
So we derive the following contraints for the sampling rate:&lt;br /&gt;
- min Fsample = 30720 Hz (from previous formula with ADCS=63)&lt;br /&gt;
- max Fsample = 98304 Hz (from previous formula with ADCS=1)&lt;br /&gt;
&lt;br /&gt;
So now, how to get a smaller sampling frequency? Simply by leaving some samples out; this is allowed by ADCON2bits.SMPI, that defines how much samples we must acquire&lt;br /&gt;
before emitting an interrupt (in which we read actually the data acquired); so for example, leaving ADCS=63, we work at 30720 Hz, but we can have also smaller frequency changing the value of ADCON2bits.SMPI (the bigger the register, the smaller the frequency). After there are some examples:&lt;br /&gt;
- setting ADCON2bits.SMPI = 5-1, we get a sampling rate of 6144 Hz (30720/5=6144); this give us for example the possibility to record about 1 second, &lt;br /&gt;
  having a buffer of 7200 samples (of char because of memory limits). It&#039;s important to note that the DCI module must be then configured to play at the same frequency&lt;br /&gt;
  of the sampling&lt;br /&gt;
- setting ADCON2bits.SMPI = 8-1, we get a sampling rate of 3840 Hz (2 seconds recording with a buffer of 7200 samples)&lt;br /&gt;
- setting ADCON2bits.SMPI = 16-1, we get a sampling rate of 1920 Hz (4 seconds recording with a buffer of 7200 samples); 15 is the maximum value of ADCON2bits.SMPI, so&lt;br /&gt;
  we cannot have a smaller frequency in these conditions (if we need a lower frequency, we could add more wait cycles between acquisition and &lt;br /&gt;
  conversion =&amp;amp;gt; ADCON3bits.SAMC).&lt;br /&gt;
Basically setting a fixed value for ADCS, then we need only to change ADCON2bits.SMPI to work with a desired frequency.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bootloader==&lt;br /&gt;
* Windows: [https://projects.gctronic.com/E-Puck/TinyBld_1_10_6_pc_beta.zip Tiny Bootloader v1.10.6] or [https://sourceforge.net/projects/tinypicbootload/ Tiny Multi Bootloader+]&lt;br /&gt;
* Linux: [https://projects.gctronic.com/E-Puck/epuck-bootloader-linux.zip epuck-bootloader-linux.zip]&lt;br /&gt;
** requirements: &amp;lt;code&amp;gt;sudo apt-get install libbluetooth-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
* Mac OS: https://github.com/gctronic/e-puck-library/tree/master/tool/bootloader/computer_side/multi_platform&lt;br /&gt;
** actually it is a Perl script, thus in principle it could be used also in Linux and Windows&lt;br /&gt;
** after pairing with the robot, you should issuing a command similar to &amp;lt;code&amp;gt;./epuckupload -f firmware.hex /dev/tty.e-puck_3675-COM1&amp;lt;/code&amp;gt; and then press the reset button on the robot&lt;br /&gt;
&amp;lt;!-- * [https://www.gctronic.com/doc/images/pybootloader.zip Multiplatform]: this bootloader requires that python and the pyserial module are installed in the system; in order to run the bootloader, type &amp;amp;quot;python BootloaderGUI.py&amp;amp;quot;. This bootloader is adapted from the work done by [https://www.asl.ethz.ch/people/cedricp Dr. Cédric Pradalier].&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Others tools==&lt;br /&gt;
From the official e-puck site you can find information about others software tools available for the e-puck robot in the following link [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=18&amp;amp;Itemid=24 https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=18&amp;amp;Itemid=24].&amp;lt;br/&amp;gt;&lt;br /&gt;
===Local communication===&lt;br /&gt;
An example of such tools is the [https://e-puck.gctronic.com/index.php?option=com_content&amp;amp;view=article&amp;amp;id=32&amp;amp;Itemid=28 libIrcom], a local communication library exploiting the proximity sensors placed around the robot to modulate infrareds.&amp;lt;br/&amp;gt;&lt;br /&gt;
If an higher throughput and longer communication distance are required, there is the [https://www.gctronic.com/doc/index.php/Others_Extensions#Range_and_bearing range and bearing extension] designed for this purpose.&lt;br /&gt;
&lt;br /&gt;
=ROS=&lt;br /&gt;
This chapter explains how to use ROS with the e-puck robots; basically all the sensors are exposed to ROS and you can also send commands back to the robot through ROS. Both Pyhton and cpp versions are implemented to give the user the possibility to choose its preferred programming language. Here is a general schema:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-ros-schema.png|450px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
First of all you need to install and configure ROS, refer to [https://wiki.ros.org/Distributions https://wiki.ros.org/Distributions] for more informations. Alternatively you can download directly a virtual machine pre-installed with everything you need, refer to section [https://www.gctronic.com/doc/index.php/E-Puck#Virtual_machine virtual machine]; this is the preferred way. &lt;br /&gt;
:*&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt; This tutorial is based on ROS Hydro&amp;lt;/font&amp;gt;.&lt;br /&gt;
:* If you downloaded the pre-installed VM you can go directly to section [https://www.gctronic.com/doc/index.php/E-Puck#Running_the_ROS_node Running the ROS node].&lt;br /&gt;
&lt;br /&gt;
The ROS epuck driver was initially developed by the [https://www.verlab.dcc.ufmg.br/ Verlab Laboratory at Universidade Federal de Minas Gerais], the related code can be found in the following repository [https://github.com/verlab-ros-pkg/epuck_driver https://github.com/verlab-ros-pkg/epuck_driver]. It is based on [https://wiki.ros.org/rospy rospy] (Python). We extended the initial driver to support all the e-puck sensors, the code can be found in the following repository [https://github.com/gctronic/epuck_driver https://github.com/gctronic/epuck_driver].&amp;lt;br/&amp;gt;&lt;br /&gt;
Starting from the work done with the ROS epuck driver for python, we developed another ROS node based on roscpp that has the same functionalities; the code can be found in the following repository [https://github.com/gctronic/epuck_driver_cpp https://github.com/gctronic/epuck_driver_cpp].&lt;br /&gt;
&lt;br /&gt;
==Initial configuration==&lt;br /&gt;
The following steps need to be done only once after installing ROS:&lt;br /&gt;
:1. If not already done, create a catkin workspace, refer to [https://wiki.ros.org/catkin/Tutorials/create_a_workspace https://wiki.ros.org/catkin/Tutorials/create_a_workspace]. Basically you need to issue the following commands:  &lt;br /&gt;
&amp;lt;pre&amp;gt;  mkdir -p ~/catkin_ws/src&lt;br /&gt;
  cd ~/catkin_ws/src&lt;br /&gt;
  catkin_init_workspace&lt;br /&gt;
  cd ~/catkin_ws/&lt;br /&gt;
  catkin_make&lt;br /&gt;
  source devel/setup.bash &amp;lt;/pre&amp;gt;&lt;br /&gt;
:2. You will need to add the line &amp;lt;code&amp;gt;source ~/catkin_ws/devel/setup.bash&amp;lt;/code&amp;gt; to your &amp;lt;tt&amp;gt;.bashrc&amp;lt;/tt&amp;gt; in order to automatically have access to the ROS commands when the system is started&lt;br /&gt;
:3. Clone the ROS epuck driver repo:&lt;br /&gt;
:* if you are working with Python: from [https://github.com/gctronic/epuck_driver https://github.com/gctronic/epuck_driver]; you&#039;ll have a directory named &amp;lt;tt&amp;gt;epuck_driver&amp;lt;/tt&amp;gt; that is the repo local copy&lt;br /&gt;
:* if you are working with cpp: from [https://github.com/gctronic/epuck_driver_cpp https://github.com/gctronic/epuck_driver_cpp]; you&#039;ll have a directory named &amp;lt;tt&amp;gt;epuck_driver_cpp&amp;lt;/tt&amp;gt; that is the repo local copy&lt;br /&gt;
:4. Copy the repo directory &amp;lt;tt&amp;gt;epuck_driver&amp;lt;/tt&amp;gt; or &amp;lt;tt&amp;gt;epuck_driver_cpp&amp;lt;/tt&amp;gt; (this is the actual ros package) inside the catkin workspace source folder (&amp;lt;tt&amp;gt;~/catkin_ws/src&amp;lt;/tt&amp;gt;)&lt;br /&gt;
:5. Install the dependencies:&lt;br /&gt;
:* Python:&lt;br /&gt;
:** The ROS epuck driver is based on the e-puck Python library that requires some dependencies:&lt;br /&gt;
:*** install the Python setup tools: &amp;lt;code&amp;gt;sudo apt-get install python-setuptools&amp;lt;/code&amp;gt;&lt;br /&gt;
:*** install the Python image library: &amp;lt;code&amp;gt;sudo apt-get install python-imaging&amp;lt;/code&amp;gt;&lt;br /&gt;
:*** install pybluez:&lt;br /&gt;
:**** download [https://github.com/karulis/pybluez pybluez] and extract it&lt;br /&gt;
:**** install pybluez dependencies: &amp;lt;code&amp;gt;sudo apt-get install libbluetooth-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
:**** go to the pybluez directory and issue the command &amp;lt;code&amp;gt;python setup.py install&amp;lt;/code&amp;gt;&lt;br /&gt;
:* cpp:&lt;br /&gt;
:** install the library used to communicate with Bluetooth: &amp;lt;code&amp;gt;sudo apt-get install libbluetooth-dev&amp;lt;/code&amp;gt;&lt;br /&gt;
:6. Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;, there shouldn&#039;t be errors&lt;br /&gt;
:7. Program the e-puck with the last [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware standard firmware] and put the selector in position 3&lt;br /&gt;
&lt;br /&gt;
==Running the ROS node==&lt;br /&gt;
First of all get the last version of the ROS epuck driver from github:&lt;br /&gt;
* Python: clone the repo [https://github.com/gctronic/epuck_driver https://github.com/gctronic/epuck_driver] and copy the &amp;lt;tt&amp;gt;epuck_driver&amp;lt;/tt&amp;gt; directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)&lt;br /&gt;
* cpp: clone the repo [https://github.com/gctronic/epuck_driver_cpp https://github.com/gctronic/epuck_driver_cpp] and copy the &amp;lt;tt&amp;gt;epuck_driver_cpp&amp;lt;/tt&amp;gt; directory inside the catkin workspace source folder (e.g. ~/catkin_ws/src)&lt;br /&gt;
Finally build the driver by opening a terminal and issueing the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt; from within the catkin workspace directory (e.g. ~/catkin_ws).&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you&#039;re using Pyhton make sure the node is marked as executable by opening a terminal and issueing the following command from within the catkin workspace directory (e.g. ~/catkin_ws): &amp;lt;code&amp;gt;chmod +x ./src/epuck_driver/scripts/epuck_driver.py&amp;lt;/code&amp;gt;. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can finally start the ROS node, for this purposes there are two launch scripts (based on [https://wiki.ros.org/roslaunch roslaunch]), one for working with a single robot and the other to work with multiple robots. Before actually starting the node you need to configure the e-puck robot as Bluetooth device in the system and copy its mac address (this will be needed when launching the ROS node); if you want to work with multiple robots you need to add all of them as Bluetooth devices in the system and copy all the mac addresses. The procedure to add a Bluetooth device is:&lt;br /&gt;
# Go to &amp;lt;tt&amp;gt;System Settings&amp;lt;/tt&amp;gt; (left panel has a link)&lt;br /&gt;
# Click on &amp;lt;tt&amp;gt;Bluetooth&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Click on the &amp;lt;tt&amp;gt;+&amp;lt;/tt&amp;gt; sign in the bottom left of the window to start the procedure&lt;br /&gt;
# Turn on the robot and click &amp;lt;tt&amp;gt;continue&amp;lt;/tt&amp;gt;, now the search is started and after a little while the robot should appear on the list of found devices&lt;br /&gt;
# Click on &amp;lt;tt&amp;gt;PIN Options...&amp;lt;/tt&amp;gt;, select &amp;lt;tt&amp;gt;Cutom PIN&amp;lt;/tt&amp;gt;, enter the correct robot PIN (robot id) and click &amp;lt;tt&amp;gt;Close&amp;lt;/tt&amp;gt;&lt;br /&gt;
# Now click &amp;lt;tt&amp;gt;Continue&amp;lt;/tt&amp;gt; and the robot will be paired&lt;br /&gt;
# To know the mac address of a paired robot, go to &amp;lt;tt&amp;gt;System Settings&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;Bluetooth&amp;lt;/tt&amp;gt; and select the robot; once selected you&#039;ll see in the right side the related mac address &lt;br /&gt;
The ROS e-puck driver based on roscpp has the possibility to automatically search for the robots, so you don&#039;t need to specify the mac address but you need to pass only the robot id; pay attention that you still need to pair the robot to the computer as explained in the previous steps. Anyway is recommended to specify the mac address to speed up and facilitate the connection (especially with multiple robots).&lt;br /&gt;
&lt;br /&gt;
First thing to do before launching the script file is running the &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;, open another terminal tab and issue the command &amp;lt;tt&amp;gt;roscore&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===Single robot===&lt;br /&gt;
Open a terminal and issue the following command:&lt;br /&gt;
* Python: &amp;lt;code&amp;gt;roslaunch epuck_driver epuck_controller.launch epuck_address:=&#039;10:00:E8:C5:61:C9&#039;&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
* cpp: &amp;lt;code&amp;gt;roslaunch epuck_driver_cpp epuck_controller.launch epuck_id:=&#039;3000&#039; epuck_address:=&#039;10:00:E8:C5:61:C9&#039;&amp;lt;/code&amp;gt;.&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;tt&amp;gt;10:00:E8:C5:61:C9&amp;lt;/tt&amp;gt; is the e-puck Bluetooth mac address and &amp;lt;tt&amp;gt;3000&amp;lt;/tt&amp;gt; is the e-puck id (number on the case).&lt;br /&gt;
&lt;br /&gt;
If all is going well you&#039;ll see the robot make a blink meaning it is connected and ready to exchange data (the blink is done only when using the Python ROS driver) and [https://wiki.ros.org/rviz/UserGuide rviz] will be opened showing the informations gathered from the topics published by the epuck driver node. The following graph shows all the topics published by the epuck driver node (Pyhton): &amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:rosgraph-single-robot.png|300px]] [[File:epuck-ros-single-robot.png|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Cpp ROS driver&#039;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
The cpp ROS driver launch script is configured also to run the [https://wiki.ros.org/gmapping 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:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|hn1FmpbF4rM}}&lt;br /&gt;
&lt;br /&gt;
===Multiple robots===&lt;br /&gt;
The script is designed to work with 4 e-puck robots and you need to modify the script in order to use the correct Bluetooth mac addresses:&lt;br /&gt;
* open the file &amp;lt;tt&amp;gt;~/catkin_ws/src/epuck_driver/launch/multi_epuck.launch&amp;lt;/tt&amp;gt; (Python) or &amp;lt;tt&amp;gt;~/catkin_ws/src/epuck_driver_cpp/launch/multi_epuck.launch&amp;lt;/tt&amp;gt; (cpp)&lt;br /&gt;
* on top of the file you&#039;ll see a list of 4 e-puck addresses, change their values accordingly&lt;br /&gt;
Now you can start the node by issueing the following command in a terminal:&lt;br /&gt;
* Python: &amp;lt;code&amp;gt;roslaunch epuck_driver multi_epuck.launch&amp;lt;/code&amp;gt;&lt;br /&gt;
* cpp: &amp;lt;code&amp;gt;roslaunch epuck_driver_cpp multi_epuck.launch&amp;lt;/code&amp;gt;&lt;br /&gt;
If all is going well you&#039;ll see the robots make a blink meaning they are connected and ready to exchange data (the blink is done only when using the Python ROS driver) and [https://wiki.ros.org/rviz/UserGuide rviz] will be opened showing the proximity and odometry of all the 4 robots; it is assumed that the robots are placed in a square (each robot in each corner) of 20 cm.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to move the robots you can either use a TV remote or you can directly use ROS by publishing velocities commands by issueing the following command:&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;rostopic pub -1 /epuck_robot_0/mobile_base/cmd_vel geometry_msgs/Twist -- &#039;[4.0, 0.0, 0.0]&#039; &#039;[0.0, 0.0, 0.0]&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* this command will move the &#039;&#039;first&#039;&#039; e-puck with a linear velocity of 1 rotation per second (robot moves straight)&lt;br /&gt;
* only the &#039;&#039;x&#039;&#039; component of the linear velocity and the &#039;&#039;z&#039;&#039; component of the angular velocity are used&lt;br /&gt;
* for more information on the &#039;&#039;Twist&#039;&#039; message refer to [https://docs.ros.org/api/geometry_msgs/html/msg/Twist.html https://docs.ros.org/api/geometry_msgs/html/msg/Twist.html]&lt;br /&gt;
&lt;br /&gt;
[[File:roscpp_4robots.png|300px]] &lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Visualize the camera image===&lt;br /&gt;
In order to visualize the image through ROS you need to use the launch script for a single robot with an additional parameter &amp;lt;tt&amp;gt;cam_en&amp;lt;/tt&amp;gt; as follows:&amp;lt;br/&amp;gt;&lt;br /&gt;
* Python: &amp;lt;code&amp;gt;roslaunch epuck_driver epuck_controller.launch epuck_address:=&#039;10:00:E8:C5:61:C9&#039; cam_en:=&#039;true&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
* cpp: &amp;lt;code&amp;gt;roslaunch epuck_driver_cpp epuck_controller.launch epuck_id:=&#039;3000&#039; epuck_address:=&#039;10:00:E8:C5:61:C9&#039; cam_en:=&#039;true&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
Then with the Python ROS driver you need to open another terminal and issue the command &amp;lt;code&amp;gt;rosrun image_view image_view image:=/camera&amp;lt;/code&amp;gt; that will open a window wiht the e-puck camera image.&amp;lt;br/&amp;gt;&lt;br /&gt;
With the cpp ROS driver the image is visualized directly in the rviz window (on the right), as shown in the following image:&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:roscpp_1robot.png|300px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Virtual machine==&lt;br /&gt;
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 e-puck. You can download the image as &#039;&#039;open virtualization format&#039;&#039; from the following link [https://projects.gctronic.com/VM/ROS-Hydro-12.04.ova ROS-Hydro-12.04.ova] (based on the VM from https://nootrix.com/2014/04/virtualized-ros-hydro/); you can then use [https://www.virtualbox.org/ VirtualBox] (together with the VirtualBox Extension Pack) to import the file and automatically create the virtual machine. Some details about the system:&lt;br /&gt;
* user: gctronic, pw: gctronic&lt;br /&gt;
* Ubuntu 12.04.4 LTS (32 bits)&lt;br /&gt;
* ROS Hydro installed&lt;br /&gt;
* PyCharm: Python IDE used to extend the rospy e-puck driver; when you open the IDE it will open a project pointing to the ROS e-puck driver so you can immediately start diving into the code&lt;br /&gt;
* [https://www.cyberbotics.com/ Webots] 8.0.5 is installed (last version available for 32 bits linux)&lt;br /&gt;
* [https://git-cola.github.io/ git-cola] (git interface) is installed&lt;br /&gt;
* the &amp;lt;tt&amp;gt;catkin workspace&amp;lt;/tt&amp;gt; is placed in the desktop&lt;br /&gt;
&lt;br /&gt;
If you encounter problems related to network adapters not recognized when booting the imported virtual machine then you need to follow these steps:&lt;br /&gt;
# close VirtualBox&lt;br /&gt;
# go to the directory &amp;lt;tt&amp;gt;C:\Users\YOUR_USER\VirtualBox VMs\ROS Hydro - 12.04&amp;lt;/tt&amp;gt;&lt;br /&gt;
# open the file &amp;lt;tt&amp;gt;ROS Hydro - 12.04.vbox&amp;lt;/tt&amp;gt; with a text editor, remove all the content of the &amp;lt;tt&amp;gt;&amp;lt;Network&amp;lt;/tt&amp;gt; tag and save&lt;br /&gt;
# open VirtualBox, select &amp;quot;ROS Hydro - 12.04&amp;quot; and under settings enable the network card (if you need it)&lt;br /&gt;
# start the virtual machine&lt;br /&gt;
&lt;br /&gt;
==Webots==&lt;br /&gt;
The [https://www.cyberbotics.com/ Webots] simulator integrates a ROS controller that publishes the sensor data of the e-puck robot in ROS, then we can exploit the multitude of packages available in ROS to process the sensors data and simulate the behavior of the e-puck by issueing commands through ROS.&amp;lt;br/&amp;gt;&lt;br /&gt;
Once we&#039;re satisfied with the results in the simulator, we can test our algorithms in the real world by remote controlling the e-puck through Webots.&amp;lt;br/&amp;gt;&lt;br /&gt;
The following steps shows how to run the example included in Webots that let the e-puck follow a line using ROS:&amp;lt;br/&amp;gt;&lt;br /&gt;
# Install the last version of [https://www.cyberbotics.com/ Webots] following the [https://www.cyberbotics.com/doc/guide/installing-webots instructions]; pay attention that starting from Webots 8.1.0 the support to linux 32 bit was dropped. The following instructions are based on Webots 8.2.1 and Ubuntu 14.0.4 64 bits (you can download a pre-installed virtual machine with ROS and Ubuntu from [https://nootrix.com/downloads/#RosVM https://nootrix.com/downloads/#RosVM].&lt;br /&gt;
# Create a catkin workspace as explained in section [https://www.gctronic.com/doc/index.php/E-Puck#Initial_configuration Initial configuration] if you didn&#039;t already done&lt;br /&gt;
# Copy the directory &amp;lt;tt&amp;gt;nodes&amp;lt;/tt&amp;gt; from  &amp;lt;tt&amp;gt;WEBOTS_MODULES_PATH/projects/languages/ros/&amp;lt;/tt&amp;gt; (e.g. &amp;lt;tt&amp;gt;/home/viki/.local/share/Cyberbotics/Webots/8.2/projects/languages/ros/&amp;lt;/tt&amp;gt;) to the catkin workspace source folder (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# Copy the directory &amp;lt;tt&amp;gt;srv&amp;lt;/tt&amp;gt; from &amp;lt;tt&amp;gt;WEBOTS_MODULES_PATH/projects/default/controllers/ros/include&amp;lt;/tt&amp;gt; (e.g. &amp;lt;tt&amp;gt;/home/viki/.local/share/Cyberbotics/Webots/8.2/projects/default/controllers/ros/include&amp;lt;/tt&amp;gt;) to the &amp;lt;tt&amp;gt;nodes&amp;lt;/tt&amp;gt; package just copied (e.g. ~/catkin_ws/src/nodes)&lt;br /&gt;
# Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open another terminal and start ROS by typing &amp;lt;code&amp;gt;roscore&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start Webots and open the ROS e-puck example: File =&amp;gt; Open Sample World =&amp;gt; languages =&amp;gt; ros =&amp;gt; e-puck_line.wbt and play it&lt;br /&gt;
# Now from the terminal positioned to the catkin workspace issue the command &amp;lt;code&amp;gt;rosrun nodes e-puck_line 60&amp;lt;/code&amp;gt;, where 60 is the duration in seconds; you should see the e-puck follow the line in the simulator&lt;br /&gt;
For more information have a look at the &amp;lt;tt&amp;gt;Readme&amp;lt;/tt&amp;gt; you can find in &amp;lt;tt&amp;gt;WEBOTS_MODULES_PATH/projects/languages/ros/nodes&amp;lt;/tt&amp;gt; (e.g. &amp;lt;tt&amp;gt;/home/viki/.local/share/Cyberbotics/Webots/8.2/projects/languages/ros/nodes&amp;lt;/tt&amp;gt;) or refer to the Webots user guide chapter [https://cyberbotics.com/doc/guide/using-ros Using ROS].&amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;The EDU license is valid to play with Webots and ROS (PRO license not required).&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Webots ROS SLAM with e-puck===&lt;br /&gt;
This example shows how to use the [https://wiki.ros.org/gmapping gmapping (SLAM)] package of ROS to let the e-puck robot construct a map of the simulated environment; the map is visualized in real-time directly in the rviz window. Here are the steps to run the demo:&lt;br /&gt;
# download the code from the following link [https://projects.gctronic.com/E-Puck/ROS/webots-ros-slam.zip webots-ros-slam.zip] and extract the zip&lt;br /&gt;
# copy the source file &amp;lt;tt&amp;gt;nodes/src/e-puck_line_slam.cpp&amp;lt;/tt&amp;gt; to the catkin workspace folder of the Webots nodes (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src/nodes/src&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# copy the folders &amp;lt;tt&amp;gt;nodes/config&amp;lt;/tt&amp;gt;, &amp;lt;tt&amp;gt;nodes/launch&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;nodes/urdf&amp;lt;/tt&amp;gt; to the catkin workspace folder of the Webots nodes (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src/nodes/&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# copy the files &amp;lt;tt&amp;gt;nodes/CMakeLists.txt&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;package.xml&amp;lt;/tt&amp;gt; to the catkin workspace folder of the Webots nodes (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src/nodes/&amp;lt;/tt&amp;gt;) by substituting the current ones&lt;br /&gt;
# Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open another terminal and start ROS by typing &amp;lt;code&amp;gt;roscore&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start Webots and open &amp;lt;tt&amp;gt;worlds/e-puck_line_slam.wbt&amp;lt;/tt&amp;gt;: File =&amp;gt; Open World =&amp;gt; look for the directory containing &amp;lt;tt&amp;gt;e-puck_line_slam.wbt&amp;lt;/tt&amp;gt; and play it&lt;br /&gt;
# Now from the terminal positioned to the catkin workspace issue the command &amp;lt;code&amp;gt;roslaunch nodes epuck_controller.launch&amp;lt;/code&amp;gt; &lt;br /&gt;
Here is a video:&amp;lt;br/&amp;gt;&lt;br /&gt;
{{#ev:youtube|L-NkvSQY5tU}}&lt;br /&gt;
&lt;br /&gt;
===Webots ROS and OpenCV with e-puck===&lt;br /&gt;
This example shows how to integrate [https://opencv.org/ OpenCV] with ROS to let the e-puck robot detect and follow a ball in the simulated environment. Here are the steps to run the demo:&lt;br /&gt;
# download the code from the following link [https://projects.gctronic.com/E-Puck/ROS/webots-ros-opencv.zip webots-ros-opencv.zip] and extract the zip&lt;br /&gt;
# copy the source file &amp;lt;tt&amp;gt;nodes/src/e-puck_opencv.cpp&amp;lt;/tt&amp;gt; to the catkin workspace folder of the Webots nodes (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src/nodes/src&amp;lt;/tt&amp;gt;)&lt;br /&gt;
# copy the files &amp;lt;tt&amp;gt;nodes/CMakeLists.txt&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;package.xml&amp;lt;/tt&amp;gt; to the catkin workspace folder of the Webots nodes (e.g. &amp;lt;tt&amp;gt;~/catkin_ws/src/nodes/&amp;lt;/tt&amp;gt;) by substituting the current ones&lt;br /&gt;
# Open a terminal and go to the catkin workspace directory (&amp;lt;tt&amp;gt;~/catkin_ws&amp;lt;/tt&amp;gt;) and issue the command &amp;lt;code&amp;gt;catkin_make&amp;lt;/code&amp;gt;&lt;br /&gt;
# Open another terminal and start ROS by typing &amp;lt;code&amp;gt;roscore&amp;lt;/code&amp;gt;&lt;br /&gt;
# Start Webots and open &amp;lt;tt&amp;gt;worlds/e-puck_opencv.wbt&amp;lt;/tt&amp;gt;: File =&amp;gt; Open World =&amp;gt; look for the directory containing &amp;lt;tt&amp;gt;e-puck_opencv.wbt&amp;lt;/tt&amp;gt; and play it&lt;br /&gt;
# Now from the terminal positioned to the catkin workspace issue the command &amp;lt;code&amp;gt;rosrun nodes e-puck_opencv 20 140 0 0 150 255 255&amp;lt;/code&amp;gt;, where&lt;br /&gt;
::* 20 is the duration in seconds&lt;br /&gt;
::* 140, 0, 0 are the min H, S and V respectively of the blob to detect&lt;br /&gt;
::* 150, 255, 255 are the max H, S and V respectively of the blob to detect&lt;br /&gt;
&lt;br /&gt;
==E-puck gumstix extension==&lt;br /&gt;
For more information on how to use ROS with the e-puck gumstix extension refer to section [https://www.gctronic.com/doc/index.php/Overo_Extension#ROS https://www.gctronic.com/doc/index.php/Overo_Extension#ROS].&lt;br /&gt;
&lt;br /&gt;
=Test and Results=&lt;br /&gt;
==Bluetooth Communication Testing - PC to robot==&lt;br /&gt;
Some tests were performed in order to analyze the bluetooth speed between a computer and the e-puck; the following three experiments were executed sending the same total amount of data but differently subdivided:&lt;br /&gt;
* 19200 packets of 6 bytes each sent from computer to e-puck: about 65 seconds ([https://www.gctronic.com/doc/images/BTspeed.zip BTspeed.zip])&lt;br /&gt;
* 2560 packets of 45 bytes each sent from computer to e-puck: about 20 seconds ([https://www.gctronic.com/doc/images/BTspeedPackets.zip BTspeedPackets.zip])&lt;br /&gt;
* 1 packet of 115200 bytes sent from computer to e-puck: about 10 seconds ([https://www.gctronic.com/doc/images/BTspeedFile.zip BTspeedFile.zip])&lt;br /&gt;
Explanation: dividing a packet in small chunk of data (such as a single command) introduces pauses generated by the Bluetooth device of the PC. The mean measured delay time between a packet and the other is about 3 ms, but could be as high as 20 ms. Sending the packet in one single block like in the third experiment, has no pauses and thus needs exactly the theoretical time of 10 seconds for the channel at 115&#039;200 Baud.&lt;br /&gt;
&lt;br /&gt;
==Bluetooth Communication Testing - robot to robot==&lt;br /&gt;
Some tests were performed also to analyze the maximum speed reachable between two robots using direct communication, that is one acting as the master and the other as the slave. The Bluetooth 2.0 specification asserts 1 Mbit/s air data rate, but in practice with the Bluetooth protocol overhead the usable bandwidth is lower; moreover in our case there are others two facts to take in consideration:&lt;br /&gt;
# the communication between the robot and the BT chip is configured to be at 115200 bps&lt;br /&gt;
# the buffer handling system of the BT chip is capable of receive at maximum 200 packets per second (refers to [https://projects.gctronic.com/E-Puck/docs/BT/SB_UART_AN.pdf UART buffer AN.pdf])&lt;br /&gt;
From the tests the resulting throughput is &#039;&#039;&#039;18 Kb/s&#039;&#039;&#039;, sending a total of 41000 bytes with 41 bytes for each packet and waiting the response from the chip before sending the next packet; moving the slave device several meters away from the master influences the communication speed, that slows down. &amp;lt;br/&amp;gt;&lt;br /&gt;
The sources (MPLAB project) of the firmware used for this test can be downloaded from the following link [https://projects.gctronic.com/E-Puck/DemoGCtronic-BT.zip DemoGCtronic-BT.zip] (master=selector position 9, slave=selector position 4).&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
There is an additional example that shows how to establish a direct Bluetooth link between two e-pucks. This firmware is intended to be programmed on the master robot (selector 0); the master will send commands using the &amp;quot;asercom protocol&amp;quot; to a slave robot, that is the first robot found during the search, in order to turn on its leds in sequence. The slave robot is intended to be programmed with the [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware standard firmware] (selector position 3).&amp;lt;br/&amp;gt;&lt;br /&gt;
You can download the MPLAB X project from here [https://projects.gctronic.com/E-Puck/DemoGCtronic-BT-asercom.zip DemoGCtronic-BT-asercom.zip]; in order to build refer to section [https://www.gctronic.com/doc/index.php/E-Puck#Project_building Project_building]. The Bluetooth library was extended to build this demo, you can download it from here [https://projects.gctronic.com/E-Puck/bluetooth.zip bluetooth.zip]; this library must replace the one included in the e-puck library in order to build the project.&amp;lt;br/&amp;gt;&lt;br /&gt;
There are various modes available on this demo, depending on the selector position:&lt;br /&gt;
* 0: search for an e-puck1 or e-puck2 and connect to the first one found, then send some commands to it through the [https://www.gctronic.com/doc/index.php/Advanced_sercom_protocol advanced sercom protocol]&lt;br /&gt;
* 1: receiver mode (template)&lt;br /&gt;
* 2: connect directly to an e-puck1 (no search is accomplished) and then send some commands to it&lt;br /&gt;
* 3: connect directly to an e-puck2 (no search is accomplished) and then send some commands to it&lt;br /&gt;
&lt;br /&gt;
==e-puck balancing==&lt;br /&gt;
The users can transform the e-puck in a self balancing robot by applying some mechanical modifications as shown in the following figure. Here are the 3d models of the [https://projects.gctronic.com/E-Puck/balance/WheelExtensionD52.STL wheel tyre extension] and [https://projects.gctronic.com/E-Puck/balance/Spacer28mm.STL spacer]. For more information on the assembly please contact us.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-balance.jpg|250px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a video of the e-puck trying to self balance; this is only a starting point to demonstrate the feasiblity, so you can take the [https://projects.gctronic.com/E-Puck/balance/DemoGCtronic-balance.zip code (MPLAB X project)] and improve it.&lt;br /&gt;
{{#ev:youtube|JVz0P2ZaCsw}}&lt;br /&gt;
&lt;br /&gt;
==e-puck and Arduino==&lt;br /&gt;
The [https://www.arduino.cc/ Arduino] boards are used widely in the hobby community and you can extend the functionalities of a board by using the so called &#039;&#039;shields&#039;&#039;; there are tons of shields like WiFi, SD reader/writer, battery, XBee, GSM, speech recognition, rfid, ... there is a shield for everything (almost). For these reasons we decided to connect an Arduino to the e-puck robot.&amp;lt;br/&amp;gt;&lt;br /&gt;
I2C is used to communicate between the e-puck (master) and the Arduino (slave), this is the easiest way to get both a communication channel and the power from the e-puck thanks to an already available connector on the robot. The connector is placed on the bottom side of the e-puck main pcb as shown in the following figures:&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-arduino-connector2.jpg|250px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&lt;br /&gt;
[[File:epuck-arduino-connector3.jpg|250px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
The following figure shows the schema to connect the e-puck to the Arduino Uno board; you can follow the same schema to connect to other Arduino boards paying attention to the related pinout.&amp;lt;br/&amp;gt;&lt;br /&gt;
Power and voltage considerations: in this configuration, the e-puck battery (LiPo 3.7Volt) powers directly also the Arduino board to its 5 Volt line. This is ok for the tested demos but it might be limiting in some rare cases. Let us know your goals and experiments to get support. The I2C lines are simply protected with 2 series resistors in order to limit any excessive current into the PIC.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-arduino-schema.png|350px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Here is a video of a demo in which you can control the e-puck with your voice; the e-puck is connected to an [https://www.arduino.cc/en/Main/ArduinoBoardUno Arduino Uno] that is extended with an [https://www.veear.eu/ Easy VR shield] for speech recognition.&lt;br /&gt;
{{#ev:youtube|9tNM7lEzFMQ}}&lt;br /&gt;
The source code of the demo is available in the following links: [https://projects.gctronic.com/E-Puck/arduino/DemoGCtronic-arduino.zip MPLAB project] for the e-puck, [https://projects.gctronic.com/E-Puck/arduino/epuck_arduino.zip Arduino IDE (1.6.6) project] for the Arduino Uno board (you&#039;ll need the Easy VR Arduino library to build the project).&amp;lt;br/&amp;gt;&lt;br /&gt;
A test project that works without any shield is available in the following link [https://projects.gctronic.com/E-Puck/arduino/epuck_arduino_test.zip Arduino IDE (1.6.6) test project], this demo rotates continuously the robot right and left. It works with the same robot firmware as the previous demo.&amp;lt;br/&amp;gt;&lt;br /&gt;
We designed a support in order to mechanically attaching the Arduino board on top of the e-puck robot as shown in the following figure.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:epuck-arduino-support.jpg|350px]]&lt;br /&gt;
&#039;&#039;&amp;lt;font size=&amp;quot;2&amp;quot;&amp;gt;Click to enlarge&amp;lt;/font&amp;gt;&#039;&#039;&amp;lt;br/&amp;gt;&lt;br /&gt;
Here is the [https://projects.gctronic.com/E-Puck/arduino/SuppArduinoONE_V2.STL support 3D model] that you can print with your 3d printer. Alternatively you can purchase an &amp;quot;e-puck arduino set&amp;quot; from the [https://www.gctronic.com/shop.php#e-puck%20accessories shop].&lt;br /&gt;
&lt;br /&gt;
=Known problems=&lt;br /&gt;
==Re-flashing the bootloader on e-puck==&lt;br /&gt;
In some cases it was reported that the internal bootloader on e-puck was corrupted due to a malfunction of the last code upload.&amp;lt;br/&amp;gt;&lt;br /&gt;
In those cases the bootloader ([https://projects.gctronic.com/E-Puck/DemoGCtronic-complete/DemoGCtronic-complete-4bba145+bootloader.hex DemoGCtronic-complete-4bba145+bootloader.hex]) has to be re-flashed on the robot via cable (see figure) with ICD2 or ICD3 and MPLAB IDE or compatible HW and SW.&amp;lt;br/&amp;gt;&lt;br /&gt;
See the procedure ([https://projects.gctronic.com/E-Puck/KnownProblems/Instruction-re-program-bootloader-e-puck.pdf Instruction re-program bootloader.pdf]) and in case of need contact info[at]gctronic.com.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:E-puck_prog_cable1.jpg|400px]] [[File:epuckICDProgConn.png|400px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Uncorrect/unknown bluetooth PIN code==&lt;br /&gt;
In a couple of rare cases it was reported that the PIN code of the Bluetooth chip was not anymore the usual one (same as e-puck number). It seems that&lt;br /&gt;
the issue is linked to trials of robot to robot direct communication. One robot could have picked up the PIN of the other one, so you could try that PIN to get access to the robot. Another possibility is to try the default pin number 0000.&amp;lt;br/&amp;gt;&lt;br /&gt;
In order to restore the name and pin number of the robot you can either make a program specifically for this purpose (1) or use the standard firmware but you would need the serial cable (2):&lt;br /&gt;
# the e-puck library contains the functions to interact with the BT chip and change all its configurations including pin number and friendly name; for a code example refer to the example [https://projects.gctronic.com/E-Puck/DemoBTConfiguration-rev119.zip DemoBTConfiguration.zip], that simply rewrite the pin and friendly name (change only the pin number in the code, the friendly name will be changed accordingly). Another source of insipiration is the [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware Standard_firmware], the part of the code related to selector 11. In case the chip isn&#039;t responding be sure it is in &#039;&#039;command mode&#039;&#039; (use the function &amp;lt;code&amp;gt;e_bt_exit_tranparent_mode&amp;lt;/code&amp;gt;). &lt;br /&gt;
# program the robot with the [https://www.gctronic.com/doc/index.php/E-Puck#Standard_firmware Standard_firmware] and put the selector in position 11. Connect the serial cable to the robot as shown in section [https://www.gctronic.com/doc/index.php/E-Puck#Serial_communication Serial_communication] and to the computer (you would need an USB to serial adapter); open the port using this configuration 115200n8. Once the communication channel is opened type the command &amp;lt;code&amp;gt;H+enter&amp;lt;/code&amp;gt; to get the help. You can get the serial cable from the [https://www.gctronic.com/shop.php#e-puck%20accessories shop].&lt;br /&gt;
&lt;br /&gt;
==Battery isolation (for battery up to 2012)==&lt;br /&gt;
You should be careful when inserting and removing the battery of the e-puck in the robot or in the charger. Otherwise in the long run your battery will eventually lose its front isolator (plastic of cardboard), causing a possible short circuit. If you are already in this situation, you could try placing some isolation tape on the battery, as illustrated in the following figure. The correct procedure to insert and remove the batteries can be found in the following document [https://projects.gctronic.com/E-Puck/docs/CambiareBatte-puck.pdf Change-batteries.pdf]. Basically you need to fully push in the battery compressing the springs before tilting the battery in the final position.&amp;lt;br/&amp;gt;&lt;br /&gt;
[[File:Battery.jpg|300px]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Bluetooth and MacBook==&lt;br /&gt;
Some users experienced problems in connecting to the robot via Bluetooth using MacBook; using an usb BT dongle solved the problem most of the time. Some users instead experienced distance problems with the internal BT chip of the MacBook, that is the robot should be kept within 1.5 meters otherwise the connection is lost/slows down.&lt;br /&gt;
&lt;br /&gt;
==Memory protection==&lt;br /&gt;
The dsPIC processor has the possibility to protect the program memory at various levels through the configuration bits; in principle these protections can be eliminated erasing completely the memory, anyway in some cases it was reported that this procedure fails, leading to a situation in which  the &amp;quot;memory protection&amp;quot; still blocks and the robot cannot be programmed anymore. Thus it is advisable to avoid playing with code protection unless strictly necessary. &amp;lt;br/&amp;gt;&lt;br /&gt;
In principle the procedure to reset the configuration bits eliminating the protection is:&lt;br /&gt;
# Open the MPLAB project and connect the programming cable to the robot&lt;br /&gt;
# Select &amp;quot;Programmer =&amp;gt; Select Programmer =&amp;gt; MPLAB ICD3&amp;quot;&lt;br /&gt;
# Select &amp;quot;Programmer =&amp;gt; Settings&amp;quot;: in the &amp;quot;Program Memory&amp;quot; tab select &amp;quot;Manually select memories and ranges&amp;quot; and check all options, click also on full program memory range &lt;br /&gt;
# In the &amp;quot;Power&amp;quot; tab set the voltage to 5.5 V and check the option &amp;quot;Power target circuit from MPLAB ICD 3&amp;quot;&lt;br /&gt;
# Select &amp;quot;Programmer =&amp;gt; Erase Flash Device&amp;quot;; erase should give no errors &lt;br /&gt;
# Power cycle the robot (unplug and plug again the programming cable); now the configuration bits are reset and program memory is cleared completely; it&#039;s possible to upload a new program selecting &amp;quot;Programmer =&amp;gt; Program&amp;quot;&lt;br /&gt;
&#039;&#039;&#039;&amp;lt;font style=&amp;quot;color:red&amp;quot;&amp;gt;Note that this procedure works only with the ICD3 that is capable of supplying 5V to the processor&amp;lt;/font&amp;gt;&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==Proximity noise==&lt;br /&gt;
It was noticed that the proximity 0 and proximity 7 are subject to noise, in particular the value returned from these two sensors can vary up to 30 (the variation of the others is in the range of 2-3). This noise is coming from the camera clock, thus as a workaround the camera can be turned off if this noise causes problems.&lt;br /&gt;
&lt;br /&gt;
==ICD2 programmer==&lt;br /&gt;
The Microchip ICD2 programmer P/N 10-00319 isn&#039;t supported on 64-bit OS.&lt;br /&gt;
&lt;br /&gt;
==Upload failed==&lt;br /&gt;
If the robot was programmed with a firmware in which the Bluetooth is used to write continuously data to the computer, then you can experience problems in uploading a new firmware to the robot. To solve the problem you should try resetting the robot continuously during the connection to the robot when you are uploading a new firmware, basically you should reset the robot (press and release the button continuously) until the connection led turn on, then stop resetting; with a bit of luck you should be able to upload it.&lt;br /&gt;
&lt;br /&gt;
==Speed precision at very low speed==&lt;br /&gt;
The e-puck motors are step motors. To save energy, the motor phases/steps at low speed are not energized all the time but just partially. This might affect the speed precision at speed below 200. If one has specific needs at that low speed and want the single steps to be more energetic, then the &amp;lt;code&amp;gt;TRESHV&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;MAXV&amp;lt;/code&amp;gt; constants in the file &amp;lt;code&amp;gt;\motor_led\advance_one_timer\e_motors.c&amp;lt;/code&amp;gt; within the e-puck library need to be adapted (decrease their value). Alternatively the power save feature can be completely disabled by commenting the &amp;lt;code&amp;gt;POWERSAVE&amp;lt;/code&amp;gt; constant.&lt;br /&gt;
&lt;br /&gt;
==Mail archive==&lt;br /&gt;
You can have a look at a mail archive (February 2007 - December 2016) regarding the e-puck robot from the following link [https://www.mail-archive.com/e-puck-user@gna.org/index.html https://www.mail-archive.com/e-puck-user@gna.org/index.html]. In this archive you can find problems encountered by users and related solutions.&lt;br /&gt;
&lt;br /&gt;
==Bluetooth slowdown in Ubuntu==&lt;br /&gt;
If you experience a slowdown using the Bluetooth in Ubuntu try removing the package &amp;lt;code&amp;gt;modemmanager&amp;lt;/code&amp;gt; with the following command: &amp;lt;code&amp;gt;sudo apt-get remove modemmanager&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Links=&lt;br /&gt;
[https://e-puck.gctronic.com/ https://e-puck.gctronic.com/] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://cyberbotics.com/doc/guide/epuck?version=R2023a https://cyberbotics.com/doc/guide/epuck?version=R2023a] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://mobots.epfl.ch/e-puck.html https://mobots.epfl.ch/e-puck.html] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://github.com/gctronic/e-puck-library https://github.com/gctronic/e-puck-library] &amp;lt;br/&amp;gt;&lt;br /&gt;
[https://en.wikipedia.org/wiki/E-puck_mobile_robot https://en.wikipedia.org/wiki/E-puck_mobile_robot] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Videos=&lt;br /&gt;
{{#ev:youtube|jB0qq7ffQUg}}&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:serial-cable-shop.jpg&amp;diff=3175</id>
		<title>File:serial-cable-shop.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:serial-cable-shop.jpg&amp;diff=3175"/>
		<updated>2026-04-22T13:05:30Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:RS232_connector_EJumper.gif&amp;diff=3174</id>
		<title>File:RS232 connector EJumper.gif</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:RS232_connector_EJumper.gif&amp;diff=3174"/>
		<updated>2026-04-22T13:05:19Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:rosgraph-single-robot.png&amp;diff=3173</id>
		<title>File:rosgraph-single-robot.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:rosgraph-single-robot.png&amp;diff=3173"/>
		<updated>2026-04-22T13:05:06Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:roscpp_4robots.png&amp;diff=3172</id>
		<title>File:roscpp 4robots.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:roscpp_4robots.png&amp;diff=3172"/>
		<updated>2026-04-22T13:04:53Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:roscpp_1robot.png&amp;diff=3171</id>
		<title>File:roscpp 1robot.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:roscpp_1robot.png&amp;diff=3171"/>
		<updated>2026-04-22T13:04:41Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:Monitor3.0.jpg&amp;diff=3170</id>
		<title>File:Monitor3.0.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:Monitor3.0.jpg&amp;diff=3170"/>
		<updated>2026-04-22T13:04:27Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:e-puck-snapshot.png&amp;diff=3169</id>
		<title>File:e-puck-snapshot.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:e-puck-snapshot.png&amp;diff=3169"/>
		<updated>2026-04-22T13:04:14Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:E-puck-serial-connector.jpg&amp;diff=3168</id>
		<title>File:E-puck-serial-connector.jpg</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:E-puck-serial-connector.jpg&amp;diff=3168"/>
		<updated>2026-04-22T13:03:45Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:epuck-ros-single-robot.png&amp;diff=3167</id>
		<title>File:epuck-ros-single-robot.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:epuck-ros-single-robot.png&amp;diff=3167"/>
		<updated>2026-04-22T13:03:33Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build4.png&amp;diff=3166</id>
		<title>File:e-puck-project-build4.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build4.png&amp;diff=3166"/>
		<updated>2026-04-22T13:02:23Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build3.png&amp;diff=3165</id>
		<title>File:e-puck-project-build3.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build3.png&amp;diff=3165"/>
		<updated>2026-04-22T13:02:11Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build2.png&amp;diff=3164</id>
		<title>File:e-puck-project-build2.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build2.png&amp;diff=3164"/>
		<updated>2026-04-22T13:01:59Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
	<entry>
		<id>http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build1.png&amp;diff=3163</id>
		<title>File:e-puck-project-build1.png</title>
		<link rel="alternate" type="text/html" href="http://www.gctronic.com/doc/index.php?title=File:e-puck-project-build1.png&amp;diff=3163"/>
		<updated>2026-04-22T13:01:46Z</updated>

		<summary type="html">&lt;p&gt;WikiSysop: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>WikiSysop</name></author>
	</entry>
</feed>