https://airwiki.elet.polimi.it/api.php?action=feedcontributions&user=MatteoRossi&feedformat=atomAIRWiki - User contributions [en]2024-03-29T02:18:43ZUser contributionsMediaWiki 1.25.6https://airwiki.elet.polimi.it/index.php?title=Microcontrollers_and_accessories&diff=9338Microcontrollers and accessories2009-11-10T15:56:20Z<p>MatteoRossi: /* Hardware */</p>
<hr />
<div>Many AIRLab projects use [http://en.wikipedia.org/wiki/Microcontroller microcontrollers]. There are many producers of microcontrollers, but for legacy reasons we usually tend to use the PIC line of products by [http://www.microchip.com/ Microchip].<br />
<br />
[http://www.voti.nl/swp/index.html Here] you can find a good introduction to the design of circuits based on PIC microcontrollers.<br />
<br />
== Hardware ==<br />
In AIRLab/Lambrate you can find three Microchip ICD2 "debuggers" (Microchip product number DV164007). <br />
<br />
[[Image:Microchip_ICD2-DV164007.jpg|center|Microchip ICD2]]<br />
<br />
All these devices should stay in the Lab! If removed, the person taking them have to write that he/she is taking it away on the table at the end of this section. <br />
<br />
<br />
These are devices which let you write, read and run the code running on a PIC. To do that, the PIC can be accessed in two ways: <br />
* if you were thoughtful enough, you designed your PCB including a port to connect to the pins of the PIC used for programming: in this case, the PIC can be left on the PCB and it is sufficient to hook up the ICD2 to the board with a suitable cable;<br />
* if you were not so thoughtful (or if the PCB comes from someone else who wasn't), each time you need to communicate with the PIC you have to extract it from its socket and put it into an auxiliary board (Microchip product number AC162049) connected to the ICD2, then to put it back into the socket when you are finished.<br />
[[Image:Microchip_AC162049.jpg|center|Microchip AC162049 auxiliary board]]<br />
<br />
<br />
Of course you have to POWER DOWN THE CIRCUIT when taking out the PIC or putting it back!<br />
<br />
Two Olimex USB JTAG programmers are now available in AirLAB - these can be found in the workshop next to the ARM microcontrollers.<br />
<br />
=== Booking ===<br />
<br />
If you want to remove these devices from the lab, please book in advance by adding an entry to the table.<br />
Please keep the table lines ordered by time (nearest bookings first); add new entries like this:<br />
{| border="1"<br />
! Day !! Time !! Person<br />
|-<br />
| Monday 13 March || 11:00-18:00 || [[User:DonaldDuck | Donald Duck]]<br />
|- <br />
| Friday 15 April || 9:30-13:00 || [[User:MickeyMouse | Mickey Mouse]]<br />
|-<br />
|}<br />
<br />
Use abbreviations, if you like.<br />
Please remove old entries.<br />
<br />
<br />
<br />
<br />
- - - - - - - <br />
<br />
ST REva Evaluation Board STM32 -> Martino Migliavacca (9/4/8)<br />
Olimex USB JTAG programmer -> Matteo Rossi (November 2009)</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=Microcontrollers_and_accessories&diff=9337Microcontrollers and accessories2009-11-10T15:53:33Z<p>MatteoRossi: /* Hardware */</p>
<hr />
<div>Many AIRLab projects use [http://en.wikipedia.org/wiki/Microcontroller microcontrollers]. There are many producers of microcontrollers, but for legacy reasons we usually tend to use the PIC line of products by [http://www.microchip.com/ Microchip].<br />
<br />
[http://www.voti.nl/swp/index.html Here] you can find a good introduction to the design of circuits based on PIC microcontrollers.<br />
<br />
== Hardware ==<br />
In AIRLab/Lambrate you can find three Microchip ICD2 "debuggers" (Microchip product number DV164007). <br />
<br />
[[Image:Microchip_ICD2-DV164007.jpg|center|Microchip ICD2]]<br />
<br />
All these devices should stay in the Lab! If removed, the person taking them have to write that he/she is taking it away on the table at the end of this section. <br />
<br />
<br />
These are devices which let you write, read and run the code running on a PIC. To do that, the PIC can be accessed in two ways: <br />
* if you were thoughtful enough, you designed your PCB including a port to connect to the pins of the PIC used for programming: in this case, the PIC can be left on the PCB and it is sufficient to hook up the ICD2 to the board with a suitable cable;<br />
* if you were not so thoughtful (or if the PCB comes from someone else who wasn't), each time you need to communicate with the PIC you have to extract it from its socket and put it into an auxiliary board (Microchip product number AC162049) connected to the ICD2, then to put it back into the socket when you are finished.<br />
[[Image:Microchip_AC162049.jpg|center|Microchip AC162049 auxiliary board]]<br />
<br />
<br />
Of course you have to POWER DOWN THE CIRCUIT when taking out the PIC or putting it back!<br />
<br />
Two Olimex USB JTAG programmers are now available in AirLAB.<br />
<br />
=== Booking ===<br />
<br />
If you want to remove these devices from the lab, please book in advance by adding an entry to the table.<br />
Please keep the table lines ordered by time (nearest bookings first); add new entries like this:<br />
{| border="1"<br />
! Day !! Time !! Person<br />
|-<br />
| Monday 13 March || 11:00-18:00 || [[User:DonaldDuck | Donald Duck]]<br />
|- <br />
| Friday 15 April || 9:30-13:00 || [[User:MickeyMouse | Mickey Mouse]]<br />
|-<br />
|}<br />
<br />
Use abbreviations, if you like.<br />
Please remove old entries.<br />
<br />
<br />
<br />
<br />
- - - - - - - <br />
<br />
ST REva Evaluation Board STM32 -> Martino Migliavacca (9/4/8)<br />
Olimex USB JTAG programmer -> Matteo Rossi (November 2009)</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7815LURCH - The autonomous wheelchair2009-09-22T10:03:45Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CANbus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack on top of the CANbus.<br />
<br />
This should ensure automatic error recognition and resolution, device addressing and packet segmentation/desegmentation.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x05, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x03 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
The HID Library is a very convenient way to handle USB communication in PIC microcontrollers; it only consists in five methods:<br />
* '''Hid_Enable()''' activates the USB module and enables the USB interrupt;<br />
* '''Hid_Disable()''' deactivates the USB module and interrupt;<br />
* '''Hid_Read()''' populates the input buffer with data coming from the USB host;<br />
* '''Hid_Write()''' sends data from the output buffer to the USB host;<br />
* '''Hid_InterruptProc()''' must be called from the interrupt handling routine and automatically processes USB interrupts.<br />
<br />
The programmer only has to create a Report Descriptor for his device and produce/consume data to be sent/read from the bus.<br />
The mikroC IDE also features an ''HID Terminal'' (similar to MS Windows HyperTerminal) that can be used to easily debug the code by sending and receiving data to/from a given HID device.<br />
<br />
Our firmware repeatedly polls the status of the buttons and sends appropriate data to the host in order to move the cursor and operates the two buttons.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
By now, the movements of the mouse pointer are controlled by simple buttons, and the values of the X,Y axes can only be [-20; 0; 20]; in the final release, the joystick will drive the pointer with proportional values, allowing more intuitive and precise control.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7814LURCH - The autonomous wheelchair2009-09-22T09:42:02Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CANbus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack on top of the CANbus.<br />
<br />
This should ensure automatic error recognition and resolution, device addressing and packet segmentation/desegmentation.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x05, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x03 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
The HID Library is a very convenient way to handle USB communication in PIC microcontrollers; it only consists in five methods:<br />
* '''Hid_Enable()''' activates the USB module and enables the USB interrupt;<br />
* '''Hid_Disable()''' deactivates the USB module and interrupt;<br />
* '''Hid_Read()''' populates the input buffer with data coming from the USB host;<br />
* '''Hid_Write()''' sends data from the output buffer to the USB host;<br />
* '''Hid_InterruptProc()''' must be called from the interrupt handling routine and automatically processes USB interrupts.<br />
<br />
The programmer only has to create a Report Descriptor for his device and produce/consume data to be sent/read from the bus.<br />
The mikroC IDE also features an ''HID Terminal'' (similar to MS Windows HyperTerminal) that can be used to easily debug the code by sending and receiving data to/from a given HID device.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
By now, the movements of the mouse pointer are controlled by simple buttons, and the values of the X,Y axes can only be [-20; 0; 20]; in the final release, the joystick will drive the pointer with proportional values, allowing more intuitive and precise control.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7813LURCH - The autonomous wheelchair2009-09-22T09:31:27Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CANbus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack on top of the CANbus.<br />
<br />
This should ensure automatic error recognition and resolution, device addressing and packet segmentation/desegmentation.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x05, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x03 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
The HID Library is a very convenient way to handle USB communication in PIC microcontrollers; it only consists in five methods:<br />
* '''Hid_Enable()''' activates the USB module and enables the USB interrupt;<br />
* '''Hid_Disable()''' deactivates the USB module and interrupt;<br />
* '''Hid_Read()''' populates the input buffer with data coming from the USB host;<br />
* '''Hid_Write()''' sends data from the output buffer to the USB host;<br />
* '''Hid_InterruptProc()''' must be called from the interrupt handling routine and automatically processes USB interrupts.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
By now, the movements of the mouse pointer are controlled by simple buttons, and the values of the X,Y axes can only be [-20; 0; 20]; in the final release, the joystick will drive the pointer with proportional values, allowing more intuitive and precise control.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7768LURCH - The autonomous wheelchair2009-09-21T13:49:08Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack on top of the CANbus.<br />
<br />
This should ensure automatic error recognition and resolution, device addressing and packet segmentation/desegmentation.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x05, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x03 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
By now, the movements of the mouse pointer are controlled by simple buttons, and the values of the X,Y axes can only be [-20; 0; 20]; in the final release, the joystick will drive the pointer with proportional values, allowing more intuitive and precise control.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7767LURCH - The autonomous wheelchair2009-09-21T13:36:33Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x05, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x03 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
By now, the movements of the mouse pointer are controlled by simple buttons, and the values of the X,Y axes can only be [-20; 0; 20]; in the final release, the joystick will drive the pointer with proportional values, allowing more intuitive and precise control.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7766LURCH - The autonomous wheelchair2009-09-21T13:28:21Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x06, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x01 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the ''USBDsc.c'' file that we included in our project and can be downloaded here: [[Media:USBDsc.zip]].<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:USBDsc.zip&diff=7765File:USBDsc.zip2009-09-21T13:27:07Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7764LURCH - The autonomous wheelchair2009-09-21T13:26:21Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x06, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
** Collection: 0xA1, 0x01 (Application)<br />
*** Usage: 0x09, 0x01 (Pointer)<br />
*** Collection: 0xA1, 0x00 (Physical)<br />
**** Usage Page: 0x05, 0x09 (Buttons)<br />
**** Usage Minimum: 0x19, 0x01 (01) ''Button 1''<br />
**** Usage Maximum: 0x29, 0x03 (03) ''Button 3''<br />
**** Logical Minimum: 0x15, 0x00 (0) ''Button idle''<br />
**** Logical Maximum: 0x25, 0x01 (1) ''Button pressed''<br />
**** Report Count: 0x95, 0x03 (3) ''3 buttons available''<br />
**** Report Size: 0x75, 0x01 (1) ''One bit per button''<br />
**** Input: 0x81, 0x02 (Data, Variable, Absolute) ''Variables''<br />
**** Report Count: 0x95, 0x01 (1) ''Padding''<br />
**** Report Size: 0x75, 0x05 (5) ''5 bits''<br />
**** Input: 0x81, 0x01 (Constant) ''Constant padding''<br />
**** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
**** Usage: 0x09, 0x30 (X)<br />
**** Usage: 0x09, 0x31 (Y)<br />
**** Logical Minimum: 0x15, 0x81 (-127)<br />
**** Logical Maximum: 0x25, 0x7F (127)<br />
**** Report Size: 0x75, 0x08 (8)<br />
**** Report Count: 0x95, 0x02 (2)<br />
**** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
*** End Collection: 0xC0<br />
** End Collection: 0xC0<br />
<br />
Analyzing this table one can see how a Report Descriptor is organized: it is formed by multiple items, each providing its own data size, count and type, along with the range of values that it will generate.<br />
The standard mouse descriptor declares:<br />
* Three ''button'' items, that take only one bit each and can assume only logic levels (0 or 1); this is obtained by setting ''Report Count'' to 3, ''Report Size'' to 1 and choosing 0 and 1 as ''Logical Minimum'' and ''Maximum''.<br />
* One 5-bit padding to be added to obtain a byte (HID descriptors only accept complete bytes); a 5-bit constant value (''Input'' set to 0x06).<br />
* Two ''axes'' items (''X'' and ''Y'') that take a whole byte each and whose values can range from -127 to 127; ''Report Count'' is set to 2, ''Report Size'' to 8 (bits) and the range is set by ''Logical Minimum'' and ''Maximum''.<br />
<br />
An appropriate descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization. The output of this tool was then copied into the source file we obtained from the ''HID Terminal'' provided with the compiler.<br />
The result is the file that we included in our project.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7763LURCH - The autonomous wheelchair2009-09-21T12:47:17Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
HID devices support a variety of protocols:<br />
<br />
* 0 = None<br />
* 1 = Keyboard<br />
* 2 = Mouse<br />
* 3...255 = Reserved<br />
<br />
Our descriptor will use protocol 2.<br />
<br />
All the descriptors will be automatically handled by the HID Library, but we have to provide a valid mouse Report Descriptor, similar to the following:<br />
<br />
* Usage Page: 0x06, 0x01 (Generic Desktop)<br />
* Usage: 0x09, 0x02 (Mouse)<br />
<br />
* Collection: 0xA1, 0x01 (Application)<br />
<br />
** Usage: 0x09, 0x01 (Pointer)<br />
<br />
** Collection: 0xA1, 0x00 (Physical)<br />
<br />
*** Usage Page: 0x05, 0x09 (Buttons)<br />
*** Usage Minimum: 0x19, 0x01 (01)<br />
*** Usage Maximum: 0x29, 0x03 (03)<br />
*** Logical Minimum: 0x15, 0x00 (0)<br />
*** Logical Maximum: 0x25, 0x01 (1)<br />
*** Report Count: 0x95, 0x03 (3)<br />
*** Report Size: 0x75, 0x01 (1)<br />
*** Input: 0x81, 0x02 (Data, Variable, Absolute)<br />
<br />
*** Report Count: 0x95, 0x01 (1)<br />
*** Report Size: 0x75, 0x05 (5)<br />
*** Input: 0x81, 0x01 (Constant)<br />
<br />
*** Usage Page: 0x05, 0x01 (Generic Desktop)<br />
*** Usage: 0x09, 0x30 (X)<br />
*** Usage: 0x09, 0x31 (Y)<br />
*** Logical Minimum: 0x15, 0x81 (-127)<br />
*** Logical Maximum: 0x25, 0x7F (127)<br />
*** Report Size: 0x75, 0x08 (8)<br />
*** Report Count: 0x95, 0x02 (2)<br />
*** Input: 0x81, 0x06 (Data, Variable, Relative)<br />
<br />
** End Collection: 0xC0<br />
<br />
* End Collection: 0xC0<br />
<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7758LURCH - The autonomous wheelchair2009-09-21T11:34:58Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
The ''Device Descriptor'' identifies which other class descriptors are present, and indicates their size (for example, ''Report'' and ''Physical'' descriptors).<br />
<br />
A ''Report Descriptor'' describes each piece of data that the device generates, and what the data is actually measuring;<br />
<br />
A ''Physical Descriptor'' (optional) provides information about the part(s) of the human body used to operate the device.<br />
<br />
<br />
<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7757LURCH - The autonomous wheelchair2009-09-21T10:46:07Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
We are currently designing a new electronic main board for the wheelchair.<br />
The idea is to base the whole system on a CAN bus, allowing a complete modularization of the on-board electronics.<br />
<br />
We are now evaluating the [http://en.wikipedia.org/wiki/CANopen CANOpen] standard, that provides high-level communication layers by implementing the ISO/OSI stack over the CANbus.<br />
<br />
One of the modules that will be connected to the CAN bus is the USB mouse.<br />
For development and debug purposes, a simple master/slave system has been put together using two [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550 microcontrollers]<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Master/slave prototype board. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The [http://www.usb.org/developers/devclass_docs/HID1_11.pdf USB HID Class Definition] states that the device must provide the host a descriptor in which it informs the lattest on which kind of informations it will generate.<br />
<br />
<br />
<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7701LURCH - The autonomous wheelchair2009-09-10T15:05:57Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Main Board prototype. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The USB HID standard states that the device must provide the host a descriptor in which it informs the host on which kind of informations it will generate.<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP SP2<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux 9.04<br />
* Mac OS X 10.5.8<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7700LURCH - The autonomous wheelchair2009-09-10T12:35:24Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Main Board prototype. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The USB HID standard states that the device must provide the host a descriptor in which it informs the host on which kind of informations it will generate.<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux<br />
* Mac OS X<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7699LURCH - The autonomous wheelchair2009-09-10T12:27:45Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Main Board prototype. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
The USB HID standard states that the device must provide the host a descriptor in which it informs the host on which kind of informations it will generate.<br />
An appropriate USB mouse descriptor was generated using the [http://www.usb.org/developers/hidpage#HID Descriptor Tool HID Descriptor Tool] provided by the USB organization.<br />
<br />
A simple circuit has been designed to test the mouse firmware:<br />
<br />
[[Image:Mouse_board_lurchbox.png|400px|thumb|center|Circuit for the USB mouse emulation firmware.]]<br />
<br />
All the components have been placed on a small piece of perfboard to test the circuit on different computers and operating systems:<br />
<br />
[[Image:Mouse_lurchbox.png|400px|thumb|center|Prototype board for the USB mouse emulation firmware.]]<br />
<br />
The mouse emulator was instantly recognized by all the operative systems we tested it on:<br />
* Microsoft Windows XP<br />
* Microsoft Windows Vista<br />
* Ubuntu Linux<br />
* Mac OS X<br />
<br />
[[Image:Mouse_on_xp.png|400px|thumb|center|The USB mouse emulator recognized by Windows XP.]]<br />
<br />
[[Image:Mouse_on_linux.PNG|400px|thumb|center|The USB mouse emulator recognized by Ubuntu Linux.]]<br />
<br />
[[Image:Mouse_on_osx.PNG|400px|thumb|center|The USB mouse emulator recognized by Max OS X.]]<br />
<br />
[[Image:Mouse_on_parallels.PNG|400px|thumb|center|The USB mouse emulator managed by Parallels Desktop on Mac OS X while virtualizing Windows XP.]]<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_on_parallels.PNG&diff=7698File:Mouse on parallels.PNG2009-09-10T12:26:09Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_on_osx.PNG&diff=7697File:Mouse on osx.PNG2009-09-10T12:25:27Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_on_linux.PNG&diff=7696File:Mouse on linux.PNG2009-09-10T12:24:54Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_on_xp.png&diff=7695File:Mouse on xp.png2009-09-10T12:23:48Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_board_lurchbox.png&diff=7694File:Mouse board lurchbox.png2009-09-10T11:20:07Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Mouse_lurchbox.png&diff=7693File:Mouse lurchbox.png2009-09-10T10:10:18Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7692LURCH - The autonomous wheelchair2009-09-10T10:01:16Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Main Board prototype. The LCD (managed by the master PIC) is showing symbols indicating the successful connection to the USB host and the correct initialization of the serial port.]]<br />
<br />
The USB mouse is emulated by a [http://www.microchip.com/wwwproducts/Devices.aspx?dDocName=en010300 PIC18F4550] microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the [http://www.mikroe.com/en/compilers/mikroc/pro/pic/ mikroC PRO for PIC] compiler.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7691LURCH - The autonomous wheelchair2009-09-10T09:52:25Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Breadboard_lurchbox.jpg|400px|thumb|center|Main Board prototype]]<br />
<br />
The USB mouse is emulated by a PIC18F4550 microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the ''mikroC PRO for PIC'' compiler.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:Breadboard_lurchbox.jpg&diff=7690File:Breadboard lurchbox.jpg2009-09-10T09:50:01Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=7689LURCH - The autonomous wheelchair2009-09-10T09:48:31Z<p>MatteoRossi: /* Electronics development */</p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
<br />
LURCH is an extended version of an commercial electric wheelchair (Rabbit by OttoBock) equipped with:<br />
# An interface circuit for digital drive via a radio serial link (XBee modules)<br />
# Two on-board computers ([[PCBricks]]), powered by wheelchair batteries<br />
# A 7-inch touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSV]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# A colour camera FireI400 (resolution 640×480)<br />
# An odometry system based on encoders applied to the rear wheels<br />
<!-- #Accelerometer, gyroscope, magnetometer XSens MTi.--><br />
<br />
Main goals of the LURCH project are:<br />
# Add sensors and robotic functionalities to the powered wheelchair.<br />
# Add various command interfaces, such as Joypad wireless, speech command, [[Brain-Computer Interface|brain-computer interface]].<br />
# Semi-autonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Functions currently provided by LURCH:<br />
# Driving by the original joystick or a Logitech RumblePad2 wireless joypad.<br />
# Obstacle sensing using planar scanner lasers.<br />
# Basic collision and obstacle avoidance behaviours.<br />
# Indoor localization by a ''fiducial marker system''<br />
# Path planning and basic autonomous navigation.<br />
# [[Brain-Computer Interface|Brain-computer interface]] driving system <br />
<br />
==Media Coverage==<br />
Lurch project appeared in many national and international media. You can see the related articles and videos in the [[MediaCoverage]] page.<br />
<br />
==Available Documentation==<br />
<br />
- Documentation on the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to connect to the interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about the interface circuit between the wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description of the LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description of the communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Battery replacement done on May 2009, description of work: [[Media:LurchBatteryReplacement.pdf]].<br />
<br />
- Thesis by Simone Ceriani, titled ''Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori'' (Development of an autonomous wheelchair to help motor-disabled persons): [[Media:LurchThesisCeriani.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos don't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
- Thesis by Marco Dalli, titled ''Sviluppo di un sistema di controllo basato su odometria per una carrozzina robotica'' (Development of a control system based on odometry for a robotic wheelchair): [[Media:LurchThesisDalli.pdf]] (in Italian)<br />
<br />
- Thesis presentation by Marco Dalli: [[Media:LurchPresentazioneThesisDalli.zip]]<br />
<br />
- Pdf with ArtoolKitPlus Fiducial Markers collection. Dimension are 160x160mm. [[Media:ArtoolKitPlusMarkers-160mm.pdf.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A new main board for coupling the wheelchair joystick to the PCBricks is currently under design.<br />
<br />
It will count two PIC microcontrollers configured as a master-slave system, where the slave emulates a standard USB mouse that will be operated by the wheelchair joystick when needed.<br />
<br />
[[Image:Esempio.jpg]]<br />
<br />
The USB mouse is emulated by a PIC18F4550 microcontroller; this unit features an on-board USB module that can be controlled by the HID (''Human Interface Device'') Library provided with the ''mikroC PRO for PIC'' compiler.<br />
<br />
==LURCH YouTube Videos==<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://www.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://www.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://www.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://www.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
{{#ev:youtube|zlhePZbRxZA}}<br />
*[http://www.youtube.com/watch?v=zlhePZbRxZA External link]<br />
<br />
==Software Installation [TODO: complete]==<br />
This guide is tested on Ubuntu 8.10, 9.04 and Xubuntu 8.10. GCC version in 4.3.<br />
<br />
* Install the following packages:<br />
** qt3-dev-tools<br />
** qt4-dev-tools<br />
** build-essential<br />
** flex<br />
** bison<br />
** libjsw-dev<br />
** libboost-dev<br />
** libdc1394-13-dev<br />
** libgsl0-dev<br />
** libgtk2.0-dev<br />
** libncurses5-dev<br />
<br />
If you want you can cut and paste this command line:<br />
sudo apt-get install ...<br />
<br />
* Download this file: [TODO], which contains ARToolKitPlus Libraries<br />
<br />
** unpack it in /opt folder<br />
** go into /opt/ARToolKitPlus_2.1.1<br />
** export ARTKP=/opt/ARToolKitPlus_2.1.1<br />
** qmake<br />
** make<br />
** sudo make install<br />
<br />
* download lurch-control.tar.gz<br />
** extract it in your home folder<br />
** make cleanall<br />
** make ROBOT=wheelchair MODULE=misc<br />
** make ROBOT=wheelchair<br />
** cd wheelchair<br />
** ln -s ../logExtract.sh ./<br />
** ln -s ../run.sh ./ <br />
<br />
* download lurch-wheelchair-standalone.tar.gz <br />
** extract it in your home folder<br />
** go into lurch-wheelchair-standalone/config<br />
** edit config.ini<br />
*** replace line with hostname=airlab-blackbox with hostname=<yourhostname><br />
** edit agent.ini<br />
*** find and replace all "airlab-blackbox" with <yourhostname><br />
<br />
* download the server for simulation (you need sun-java6-jdk installed and Eclipse is suggested)<br />
...<br />
<br />
* from lurch-wheelchair-standalone<br />
** sudo ./run.sh<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|Matteo Matteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|Giulio Fontana]]<br />
<br />
[[User:BernardoDalSeno|Bernardo Dal Seno]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (ex-Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Assegnista di ricerca)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
[[User:MarcoAssini|Marco Assini]] (Tesista)<br />
<br />
[[User:MauroBrenna|Mauro Brenna]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=LURCH_-_The_autonomous_wheelchair&diff=4412LURCH - The autonomous wheelchair2008-10-13T21:54:36Z<p>MatteoRossi: </p>
<hr />
<div>[[Image:LURCH wheelchair.jpg|thumb|right|300px|LURCH in DEI exploration]]<br />
L.U.R.C.H. is the acronym of "Let Unleashed Robots Crawl the House".<br />
Click [http://airlab.elet.polimi.it/index.php/airlab/projects/robotics_for_disabled_people/politam2_lurch_robotic_wheelchair here] for a brief description of the project, taken from the AIRLab website.<br />
<br />
LURCH is an extended version of an electric commercial wheelchair (Rabbit by OttoBock) equipped with<br />
# Interface circuit for digital drive via radio serial link (XBee modules)<br />
# Two onboard computers ([[PCBricks]]), powered by wheelchair batteries<br />
# 7" touchscreen monitor ([http://www.xenarc.com/product/700tsv.html Xenarc 700TSW]), 800x480 resolution (16:10 AR)<br />
# Two laser scanners Hokuyo URG 04LX<br />
# Colour camera FireI400 (resolution 640*480)<br />
# Accelerometer, gyroscope, magnetometer XSens MTi.<br />
<br />
Main goals of the LURCH project are:<br />
# Add sensor and robotics functionality to the powered wheelchair.<br />
# Add various command interface, such as Joypad wireless, speech command, Brain Computer Interface.<br />
# Semiautonomous navigation with collision and obstacle avoidance.<br />
# Autonomous navigation by path planning and localization.<br />
<br />
Function currently provided by LURCH:<br />
# Drive by original Joystick or Logitech RumblePad2 Wireless Joypad.<br />
# Obstacle identification using planar scanner laser.<br />
# Collision and Obstacle Avoidance basic behaviours.<br />
# Indoor localization by ''Fiducial Marker System''<br />
# Path Planning and basic autonomous navigation.<br />
<br />
==Available Doumentation==<br />
<br />
- Documentation on interface circuit between wheelchair joystick and computer: [[Media:LurchCircuitDocument.pdf]].<br />
<br />
- '''WARNING''': the circuit was modified and the documentation above is upgraded by this new file: [[Media:LurchXBee.pdf]].<br />
<br />
- How to modify the wheelchair joystick to adapt to interface circuit: [[Media:LurchCircuitJoystick.pdf]].<br />
<br />
- Brief discussion about interface circuit between wheelchair joystick and computer: [[Media:LurchCircuitJoystickBrief.pdf]].<br />
<br />
- Brief description about LURCH project: [[Media:LurchBriefDesc.pdf]].<br />
<br />
- Brief description about communication between the wheelchair interface circuit and a PC via RS232 port: [[Media:LurchProtocol.pdf]].<br />
<br />
- Source code for PIC 18F452 microprocessor and Eagle project (schematic and board): [[Media:LurchCircuitProject.zip]].<br />
<br />
- Thesis by Simone Ceriani, title "Sviluppo di una carrozzina autonoma d'ausilio ai disabili motori": [[Media:LurchThesisCeriani.pdf]]<br />
<br />
- Thesis presentation by Simone Ceriani (note: Videos doesn't work, you can found similar videos below): [[Media:LurchPresentazioneThesisCeriani.zip]]<br />
<br />
==PCBricks Configuration==<br />
PCBrick-03 and PCBrick-05 feature Xubuntu Linux 7.10, Xfce Window Manager, Openchrome graphics drivers and eGalax touchscreen drivers v1.08.1227 (Drivers [http://210.64.17.162/web20/TouchKitDriver/linuxDriver.htm here]).<br />
The touchscreen is configured and calibrated on both machines, hence it can be used with either one or the other indifferently.<br />
<br />
==Electronics development==<br />
A universal interface to connect various models of joysticks to the wheelchair onboard systems is currently under design. The interface should be programmable in order to accept absolute or differential analog voltage inputs and generate a coherent output, while transferring the values read to the PC via serial port.<br />
<br />
= LURCH YouTube Video =<br />
<br />
{{#ev:youtube|7bZ45sGf3qs}}<br />
<br />
*[http://it.youtube.com/watch?v=7bZ45sGf3qs External link]<br />
<br />
{{#ev:youtube|PFjlmcTbGVs}}<br />
*[http://it.youtube.com/watch?v=PFjlmcTbGVs External link]<br />
<br />
{{#ev:youtube|RBfIq8eQJ6Q}}<br />
*[http://it.youtube.com/watch?v=RBfIq8eQJ6Q External link]<br />
<br />
{{#ev:youtube|iRw8PhY8IF4}}<br />
*[http://it.youtube.com/watch?v=iRw8PhY8IF4 External link]<br />
<br />
=People Involved=<br />
<br />
[[User:AndreaBonarini|Andrea Bonarini]]<br />
<br />
[[User:MatteoMatteucci|MatteoMatteucci]]<br />
<br />
[[User:DavideMigliore|Davide Migliore]]<br />
<br />
[[User:GiulioFontana|GiulioFontana]]<br />
<br />
[[User:MarcoDalli|Marco Dalli]] (Tesista)<br />
<br />
[[User:SimoneCeriani|Simone Ceriani]] (Ex-Tesista)<br />
<br />
[[User:MatteoRossi|Matteo Rossi]] (Tesista)<br />
<br />
=== Laboratory work and risk analysis ===<br />
<br />
Laboratory work for this project is mainly performed at AIRLab/Lambrate. It includes some mechanical work and electrical and electronic activity. Potentially risky activities are the following:<br />
* Use of mechanical tools. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Use of soldering iron. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Transportation of heavy loads (e.g. robots). Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.<br />
* Robot testing. Standard safety measures described in [http://airlab.elet.polimi.it/index.php/airlab/content/download/461/4110/file/documento_valutazione_rischi_AIRLab.pdf Safety norms] will be followed.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=User:MatteoRossi&diff=4411User:MatteoRossi2008-10-13T21:44:32Z<p>MatteoRossi: </p>
<hr />
<div>{{SMWUser<br />
|firstname=Matteo<br />
|lastname=Rossi<br />
|email=saltafoss(at)gmail(dot)com<br />
|photo=MatteoRossi.jpg<br />
|advisor=MatteoMatteucci<br />
|projectpage=LURCH - The autonomous wheelchair<br />
}}<br />
<br />
'''Matteo Rossi'''<br />
<br />
saltafoss (at) gmail (dot) com<br />
<br />
'''Esperienza professionale'''<br />
<br />
<br />
'''Istruzione e formazione'''<br />
<br />
- ''Settembre 2003 – Settembre 2006'' Laurea in Ingegneria Informatica presso Politecnico di Milano. Votazione 97/110.<br />
<br />
- ''Settembre 1998 - Luglio 2003'' Maturità scientifica. Liceo Scientifico Banfi - Vimercate (MI). Votazione 80/100.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=User:MatteoRossi&diff=4410User:MatteoRossi2008-10-13T21:44:16Z<p>MatteoRossi: </p>
<hr />
<div>{{SMWUser<br />
|firstname=Matteo<br />
|lastname=Rossi<br />
|email=saltafoss(at)gmail(dot)com<br />
|photo=MatteoRossi.png<br />
|advisor=MatteoMatteucci<br />
|projectpage=LURCH - The autonomous wheelchair<br />
}}<br />
<br />
'''Matteo Rossi'''<br />
<br />
saltafoss (at) gmail (dot) com<br />
<br />
'''Esperienza professionale'''<br />
<br />
<br />
'''Istruzione e formazione'''<br />
<br />
- ''Settembre 2003 – Settembre 2006'' Laurea in Ingegneria Informatica presso Politecnico di Milano. Votazione 97/110.<br />
<br />
- ''Settembre 1998 - Luglio 2003'' Maturità scientifica. Liceo Scientifico Banfi - Vimercate (MI). Votazione 80/100.</div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=File:MatteoRossi.jpg&diff=4409File:MatteoRossi.jpg2008-10-13T21:44:05Z<p>MatteoRossi: </p>
<hr />
<div></div>MatteoRossihttps://airwiki.elet.polimi.it/index.php?title=User:MatteoRossi&diff=4408User:MatteoRossi2008-10-13T21:40:36Z<p>MatteoRossi: New page: {{SMWUser |firstname=Matteo |lastname=Rossi |email=saltafoss(at)gmail(dot)com |photo=nophoto.png |advisor=MatteoMatteucci |projectpage=LURCH - The autonomous wheelchair }} '''Matteo Rossi...</p>
<hr />
<div>{{SMWUser<br />
|firstname=Matteo<br />
|lastname=Rossi<br />
|email=saltafoss(at)gmail(dot)com<br />
|photo=nophoto.png<br />
|advisor=MatteoMatteucci<br />
|projectpage=LURCH - The autonomous wheelchair<br />
}}<br />
<br />
'''Matteo Rossi'''<br />
<br />
saltafoss (at) gmail (dot) com<br />
<br />
'''Esperienza professionale'''<br />
<br />
<br />
'''Istruzione e formazione'''<br />
<br />
- ''Settembre 2003 – Settembre 2006'' Laurea in Ingegneria Informatica presso Politecnico di Milano. Votazione 97/110.<br />
<br />
- ''Settembre 1998 - Luglio 2003'' Maturità scientifica. Liceo Scientifico Banfi - Vimercate (MI). Votazione 80/100.</div>MatteoRossi