Difference between revisions of "Neato XV-11"

From RECESSIM, A Reverse Engineering Community
Jump to navigation Jump to search
Line 5: Line 5:
 
[[File:Neato-xv-11.jpg|thumb]]
 
[[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.'''
  
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.
  
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
  
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.
 
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
+
# cd; mkdir ros; cd ros
svn co https://brown-ros-pkg.googlecode.com/svn/tags/brown-ros-pkg/teleop_twist_keyboard
+
# 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/slam_coreslam/coreslam
svn co http://albany-ros-pkg.googlecode.com/svn/trunk/neato_robot
+
# svn co http://albany-ros-pkg.googlecode.com/svn/trunk/neato_robot
echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
+
# echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
echo ‘export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}’ >> ~/.bashrc
+
# echo ‘export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}’ >> ~/.bashrc
source ~/.bashrc
+
# source ~/.bashrc
sudo su
+
# sudo su
echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
+
# echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
echo ‘export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}’ >> ~/.bashrc
+
# echo ‘export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}’ >> ~/.bashrc
exit
+
# exit
cd ~/ros/teleop_twist_keyboard; rosmake
+
# cd ~/ros/teleop_twist_keyboard; rosmake
cd ~/ros/coreslam; rosmake
+
# cd ~/ros/coreslam; rosmake
cd ~/ros/neato_robot; 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.
 
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
+
# sudo su
echo “usbserial vendor=0x2108 product=0x780B” >> /etc/modules
+
# echo “usbserial vendor=0x2108 product=0x780B” >> /etc/modules
echo “blacklist cdc_acm” >> /etc/modprobe.d/blacklist.conf
+
# echo “blacklist cdc_acm” >> /etc/modprobe.d/blacklist.conf
modprobe usbserial vendor=0x2108 product=0x780B
+
# modprobe usbserial vendor=0x2108 product=0x780B
rmmod cdc_acm
+
# rmmod cdc_acm
exit
+
# 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.
+
 
 +
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.
  
ls /dev/ttyU*
+
# roslaunch 2dnav_neato move_base.launch
Once you plug in the XV-11 you should see /dev/ttyUSB0 appear. Now lets load the XV-11 drivers.
+
# (open a new tab before running the next command)
 +
# rosrun rviz rviz
  
roslaunch neato_node bringup.launch
+
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.
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
+
# rosrun teleop_twist_keyboard teleop_twist_keyboard.py
(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 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.
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.
 
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.

Revision as of 21:45, 24 April 2020

Hacking the Neato XV-11

This content has been migrated from the old xv11hacking.com website

What is the Neato XV-11 you ask?? The Neato XV-11(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). 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


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.

  1. sudo sh -c ‘echo “deb http://code.ros.org/packages/ros/ubuntu maverick main” > /etc/apt/sources.list.d/ros-latest.list’
  2. wget http://code.ros.org/packages/ros.key -O - | sudo apt-key add -
  3. sudo apt-get update
  4. 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.

  1. cd; mkdir ros; cd ros
  2. svn co https://brown-ros-pkg.googlecode.com/svn/tags/brown-ros-pkg/teleop_twist_keyboard
  3. svn co http://albany-ros-pkg.googlecode.com/svn/trunk/slam_coreslam/coreslam
  4. svn co http://albany-ros-pkg.googlecode.com/svn/trunk/neato_robot
  5. echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
  6. echo ‘export ROS_PACKAGE_PATH=~/ros:${ROS_PACKAGE_PATH}’ >> ~/.bashrc
  7. source ~/.bashrc
  8. sudo su
  9. echo ‘. /opt/ros/cturtle/setup.sh’ >> ~/.bashrc
  10. echo ‘export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}’ >> ~/.bashrc
  11. exit
  12. cd ~/ros/teleop_twist_keyboard; rosmake
  13. cd ~/ros/coreslam; rosmake
  14. 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.

  1. sudo su
  2. echo “usbserial vendor=0x2108 product=0x780B” >> /etc/modules
  3. echo “blacklist cdc_acm” >> /etc/modprobe.d/blacklist.conf
  4. modprobe usbserial vendor=0x2108 product=0x780B
  5. rmmod cdc_acm
  6. 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.

  1. ls /dev/ttyU*

Once you plug in the XV-11 you should see /dev/ttyUSB0 appear. Now lets load the XV-11 drivers.

  1. 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.

  1. roslaunch 2dnav_neato move_base.launch
  2. (open a new tab before running the next command)
  3. 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 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.

  1. 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.