| Note: This tutorial assumes that you have completed the previous tutorials: Connecting the XV-11 Laser to USB, ROS Tutorials. |
Running the XV-11 Laser Node
Description: This tutorial will walk you through installing and running the XV-11 Laser Node so that you get laser scans in rviz.Keywords: xv11 xv-11 neato laser rviz udev ftdi
Tutorial Level: BEGINNER
Contents
Install the Driver
We assume you have ros-cturtle-base and rosinstall installed.
- Install git (if you don't already have it installed). For example, on Ubuntu use
sudo apt-get install git-core
- Use rosinstall to get the code
rosinstall ~/cwru-ros-pkg /opt/ros/cturtle 'http://www.ros.org/wiki/xv_11_laser_driver/Tutorials/Running%20the%20XV-11%20Node?action=AttachFile&do=get&target=cwru-ros-pkg.rosinstall'
- Add cwru-ros-pkg to your environment
. ~/cwru-ros-pkg/setup.sh
- Build the driver
rosmake --rosdep-install xv_11_laser_driver
Setup udev for FTDI devices
Note: This is an optional step. You only need to complete it if you'd like your XV-11 laser to have a constant device identifier |
Add the following to a new rule file in /etc/udev/rules.d. For example, as root:
# echo 'SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="sensors/ftdi_%s{serial}"' > /etc/udev/rules.d/52-ftdi.rulesThis will create devices in /dev/sensors/ftdi_* where * is the serial number in a particular FTDI USB-Serial chip's EEPROM. This will allow you to refer to the device accurately even if you plug multiple /dev/ttyUSB* devices in in different orders.
Startup the XV11 driver
In successive terminals that have had the cwru-ros-pkg environment setup in them:
- Startup roscore
roscore
- Startup the driver with the appropriate device path (I'm using /dev/ttyUSB0 which assumes you didn't setup the udev rules and the XV-11 laser was the first ttyUSB device you plugged into your computer)
rosrun xv_11_laser_driver neato_laser_publisher _port:=/dev/ttyUSB0
The driver should now be running.
View the data in RVIZ
Download the neato_demo.vcg file
- Startup rviz in a new terminal window
rosrun rviz rviz -d /full/path/to/neato_demo.vcg
This should configure your frames and displays properly. You'll also get a handy grid where each square is 1 meter by 1 meter as well as an axis indicator. The red bar is the +X axis of the laser, the green bar is the +Y axis. The laser readings are in white.
You should now see laser scans all around the XV-11 Laser. It should look something like
Have fun playing with your XV-11 Laser!






