Open main menu

Changes

4,854 bytes added ,  22:27, 24 April 2020
[[File:Neato-xv-11.jpg|thumb]]
=== Connecting to ROS ===
'''<br />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.
# sudo sh -c ‘echo “deb http://code.ros.org/packages/ros/ubuntu maverick main” > /etc/apt/sources.list.d/ros-latest.list’# wget http://code.ros.org/packages/ros.key -O - | sudo apt-key add -# sudo apt-get update# sudo apt-get install ros-cturtle-base
The last command will install approximately 5GB worth of software so grab some coffee, a Rockstar, or your stimulant of choice! Once it is done installing run the commands below to install some more ROS software in your home folder.
# cd; mkdir ros; cd ros# svn co https://brown-ros-pkg.googlecode.com/svn/tags/brown-ros-pkg/teleop_twist_keyboard# svn co http://albany-ros-pkg.googlecode.com/svn/trunk/slam_coreslam/coreslam# svn co http://albany-ros-pkg.googlecode.com/svn/trunk/neato_robot# echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc# echo ‘export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}’ >> ~/.bashrc# source ~/.bashrc# sudo su# echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc# echo ‘export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}’ >> ~/.bashrc# exit# cd ~/ros/teleop_twist_keyboard; rosmake# cd ~/ros/coreslam; rosmake# cd ~/ros/neato_robot; rosmake
Now we will edit the /etc/modules file so the usbserial driver will be automatically loaded with the parameters needed. We also add the cdc_acm driver to the blacklist so it will not be used with the XV-11. On a Macbook Pro the system used this driver instead of usbserial.
# sudo su# echo “usbserial vendor=0x2108 product=0x780B” >> /etc/modules# echo “blacklist cdc_acm” >> /etc/modprobe.d/blacklist.conf# modprobe usbserial vendor=0x2108 product=0x780B# rmmod cdc_acm# exit
Almost time to plug your XV-11 into the system!! For the sake of simplicity do not plug in any other USB to serial devices at this point. This will ensure your XV-11 appears as '''/dev/ttyUSB0''' and will simplify setup at this point.
# ls /dev/ttyU*
Once you plug in the XV-11 you should see '''/dev/ttyUSB0''' appear. Now lets load the XV-11 drivers.
# roslaunch neato_node bringup.launch
Entering the above command should initiate a connection to '''/dev/ttyUSB0''' and after a couple seconds you will hear the LIDAR start to spin on the XV-11. Don’t worry if you don’t hear it, press '''CTRL-C''' to exit the driver then enter the command again. I have found it does not seem to start properly upon first load. Now press '''CTRL-SHIFT-T''' while your terminal window is selected to open a new tab within that terminal window, just like a new web browser tab. We will open a few of these tabs to load the different ROS drivers/programs.
# roslaunch 2dnav_neato move_base.launch# (open a new tab before running the next command)# rosrun rviz rviz
Just to verify, you should have three tabs open now with these three commands simultaneously running. SWEET HUH!! Now you have the GUI application running, just a couple more steps and its play time! On the top menu bar click '''Plugins -> Manage''' then click the box next to '''Loaded''' and click '''OK'''. There is a video [http://www.ros.org/wiki/navigation/Tutorials/Using%20rviz%20with%20the%20Navigation%20Stack here] with details on setting up RViz. You can use this file with RViz and it has all those parameters already setup. Right click on the file and save it. Within RViz just go to '''File -> Open Config''' and select the XV11.vcg file. Now open a new terminal which we will use for keyboard control to manually navigate the XV-11.
# rosrun teleop_twist_keyboard teleop_twist_keyboard.py
You will see which keys are used to navigate on the screen once the program is running. The default speed settings are too fast for the XV-11 so you need to reduce the speed before it will respond to any input. Repeatedly press the '''“x”''' key to reduce speed when traveling in a straight line to about 0.10 and then do the same with the “c” key to reduce rotational speed to about 0.15. Now you can use the keyboard keys to navigate.
From this point you need to create your own map using gmapping and save the map so a map of your area is loaded when launching 2dnav_neato. gmapping needs to be modified from the base install on your system at this point to correct the reversed laser scan data. This wiki will be updated shortly with that procedure. gmapping is what will allow you to create a map of your surroundings which you will use to navigate.
 
== Disassembly and Reassembly ==
Pictorial instructions for disassembling and reassembling an XV-11 can be found at the [http://www.hbrobotics.org/ Homebrew Robotics Club] wiki linked off of the page: [http://hbrobotics.org/wiki/index.php?title=Dave%27s_XV-11_notes Dave’s XV-11 Notes]. There are a few other XV-11 notes there as well, such as how to tap into the battery supply, and I’ll be adding more as I go along. I’m too lazy to update two wiki’s so I’ve decided to make the HBRC wiki my ‘home’ and cross-link from here to there and there to here. Anyway, the disassembly/reassembly instructions were done because I kept forgetting where all the screws go.
 
Hope it helps.
 
== Hacking with Neato Firmware ==
 
=== Neato Firmware v2.6 ===
A version 2.6 Neato XV-11 can be reverted to a previous firmware by pressing and holding the Back button (curved arrow) and the orange Start button at the same time for 4 seconds. When the robot reboots it will be running an older firmware with all the previous commands available.
 
'''''Hidden Neato menu in newer 2.6 firmware!'''''
 
Anyone who has updated their Neato firmware will notice a new message is returned when you enter ” Help” when connected to the robots USB port. Entering Help with a space before it used to return an extended hidden help menu with a lot more commands! When Neato released the 2.6 firmware update (or maybe earlier?) they removed the ” Help” and instead you got this response...
 
 
''Nice try, but I’m not falling for that one again! :P''
 
 
Some commands such as “SetStreamFormat” let you actually SEE what the robot is doing while driving around and mapping the environment internally. Some of the guys on Trossen Robotics forum (Chunk) have made really good progress using the output from this command! Sadly this is one of the commands removed from the 2.6 firmware version. But not for long!!
 
 
If you just press and hold the orange Start button and Back button at the same time for 4 seconds the robot will reboot into a different firmware that includes all those previous commands! Below is a capture from the on-board 4 pin serial port that shows debug data while the XV-11 is booting.
 
 
This capture is of the normal reboot (just holding the orange Start button for 4 seconds)
 
<code>Neato Robotics XV-11/XEB V11:16:01</code>
 
<code>Copyright (c) 2006-2010 Neato Robotics, Inc</code>
 
 
<code>Loading installed application</code>
 
<code>Starting app</code>
 
<code>NEROSConfigErr: BlowerType=-1 (Expected 0</code>
 
<code>ConfigErr: BrushMotorType=-1 (Expected 0</code>
 
<code>ConfigErr: SideBrushType=-1 (Expected 0</code>
 
<code>FCB Invalid! Configurations may need to be initialized.</code>
 
 
<code>Build 15840 Nov 14 2011 16:09:19</code>
 
 
<code>Init A2D</code>
 
<code>Configure power to STANDBY.</code>
 
<code>uart0EnablePeripheral</code>
 
<code>Power On reset: 8 :Software</code>
 
<code>DEBUG compile</code>
 
 
<code>Edison Design Group compiler</code>
 
 
<code>Init Pushbuttons.Finished halInit();</code>
 
<code>Sending GetVersion...</code>
 
<code>RCVD: ''Finished LDS getversion cmd in 5 ms''</code>
 
''<code>LDS reports build , we need build 15295 (size=16512)</code>''
 
''<code>Stop LDS driver to prevent contention</code>''
 
''<code>[]</code>''
 
''<code>Finished LDSBurn.</code>''
 
''<code>Sending GetVersion...</code>''
 
''<code>RCVD:</code>'' <code>Finished LDS getversion cmd in 4 ms</code>
 
<code>mmcReset Error</code>
 
 
<code>PH-drvrInit:Ignoring detected battery type because XV11.</code>
 
<code>PH-drvrStart:vacuumType(): Invalid SCB blower value. How did we get here?!</code>
 
 
'''This capture is after holding the Start and Back buttons for 4 seconds.'''
 
 
<code>Neato Robotics XV-11/XEB V11:16:01</code>
 
<code>Copyright (c) 2006-2010 Neato Robotics, Inc</code>
 
 
<code>Loading factory application</code>
 
<code>Starting app</code>
 
<code>NEROS Build 12882:12959 Jul 26 2010 22:38:28</code>
 
 
<code>Init A2D</code>
 
<code>Configure power to STANDBY.</code>
 
<code>uart0EnablePeripheral</code>
 
<code>Power On reset: 8 oftware</code>
 
<code>DEBUG compile</code>
 
 
<code>Edison Design Group compiler</code>
 
<code>Enabling USB-CDC ...</code>
 
 
<code>Crashblock file: @ 0</code>
 
<code>Crashblock fn:</code>
 
<code>Crashblock TOS:0x00000000</code>
 
<code>Crashblock watchvalues:</code>
 
 
<code>Init Pushbuttons.Finished halInit();</code>
 
<code>mmcReset Error</code>
 
 
<code>PH-drvrInit:</code>
 
<code>PH-drvrStart:</code>
 
 
'''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!'''