==Hacking the Neato XV-11==
<br />[[File:Neato-xv-11.jpg|thumb]]'''''This content has been migrated from the old xv11hacking.com website'''''
What is the Neato XV-11 you ask?? The Neato XV-11([[wikipedia:Neato_Robotics|Wikipedia]]) is a robot which vacuum’s your house. It is unlike any other however because it includes a low cost 360 degree laser distance scanner (LIDAR See [[wikipedia:Lidar|Wikipedia]]). This can be removed from the XV-11 and used in your own robotics projects or used within the XV-11 with the help of the Robot Operating System (ROS). The pages within this wiki document interfacing methods into the XV-11 and is open to anyone who wants to help. For $399 you can’t find a better robotics platform in my opinion, definitely worth the cost even if you do nothing more than strip it down for parts. You will find it is very well constructed by some people who definitely know about robotics.
==Connecting to ROS==
=== '''<br ROS Driver''' ===There is a ROS driver that connects to the XV-11 through the USB port, documentation can be found on the [https:/>/wiki.ros.org/neato_robot ROS wiki]. This driver includes both an ROS-independent python implementation and an ROS node wrapper for the python implementation. It currently controls the mobile base, provides odometry feedback, and publishes laser scans. Future versions will include battery and sensor access features (the currently exist in the ROS-independent code, but have not yet been given a proper ROS API). === '''Install ROS on Ubuntu''' ===''The following procedure will help you install the Robot Operating System on Ubuntu 10.10 for use with the XV-11.'''
I have tested this running Ubuntu 10.10 as a VMware virtual machine as well as installed on a system as the booted OS. Ubuntu is a very easy to use Linux release you can download from here Now lets get started! Open a terminal by clicking on '''Applications -> Accessories -> Terminal''' Enter the following commands by copying and pasting them into the terminal window. Use '''CTRL-C''' to copy and then '''CTRL-SHIFT-V''' to paste them in the terminal window.
PH-drvrInit:Ignoring detected battery type because XV11.
PH-drvrStart:vacuumType(): Invalid SCB blower value. How did we get here?!
This capture is after holding the Start and Back buttons for 4 seconds.
'''It appears this may be a secondary firmware loaded as a failsafe in case a USB firmware upgrade fails. This would make tech support easier as you have a firmware to revert too in case something goes wrong. You can see from the dates in each print out that they are completely different builds. Thanks to Theo Deyle for e-mailing me and inspiring me to work on this some more! Hopefully his own hacks will be posted soon as well!'''
=== Neato Firmware v3.0 ===
The Neatos that are delivered with Firmware 3.0 are a different hardware revision compared to previous models.
OK
<nowiki>#</nowiki>testmode off
== Interfacing with LIDAR Sensor ==
I created a board to interface the LIDAR sensor to a PC without the rest of the XV-11. The PCB consists of a PIC18F2221, and FTDI-232R, a 3.3V regulator, and a Fet for controlling the motor. The pic watches the data from the LIDAR and uses the speed information to control the PWM pin attached to the FET. In this way the correct speed can be maintained. The Firmware for the pic currently only supports the old LIDAR firmware ( that is what I have). Hopefully someone else can modify it to work with the other firmware as well. There are jumpers for configuring who talks to what between the PC, PIC, and LIDAR. There are also options for supplying your own 5V instead of getting it from USB and an option for using an XBEE for wireless communication. Schematics are posted below as well as the Eagle brd files. Source code for the PIC will be posted soon. I have spare boards for sale if anyone is interested. Ringo (dot) Davis (at) gmail (dot) com.
[[File:LIDAR mounted on PCB.jpg|none|thumb|533x533px|LIDAR mounter on interface board]]
[[File:LIDAR plugged in to Interface board.jpg|none|thumb|533x533px|LIDAR plugged in to Interface board]]
<br />
== LIDAR API Commands ==
Commands available from the LIDAR via direct serial connection or through the Main PCB API To access the API directly via the serial connection of the sensor, send an ESCAPE character (0x1B). The lidar then responds with an invite : “#” You can then enter commands (below is the result of Help command, some additional hidden commands are probably available)
<br />
#
# Help
GetVersion
Help
Log
SaveCal
SetSerial
Upload
Wanderer
Calibrate b16 b8 SunBlind loop2AA loop155
GetCal A B C LPT LFL LFT LFH IMX IB LPI LCH LPD ANG
SetCal A B C LPT LFL LFT LFH IMX IB LPI LCH LPD ANG
Spin Fake DotX DotI Text Hash Timing Foto RPS Pac
TestEncoder
Commands are case-insensitive, and can be entered incompletly : getversion, getvers, getv, GeTvErSiOn will all work alike. Be aware that one at least of these commands can brick your LDS... Here are the details of what is currently known about these commands: (To be completed!)
GetVersion
Prints informations about the version of the LDS.
Example:
GetVersion...press ESC 3 times to abort...OK
Piccolo Laser Distance Scanner
Copyright (c) 2009-2010 Neato Robotics, Inc.
All Rights Reserved
Loader V2.4.13386
CPU F2802x/c600
Serial AAA42110AA-0003616
LastCal [[[[[[[[2010110136]]
Runtime V2.4.13386
SUCCEEDED