I would suggest starting with a laptop (most any old
one will do) and formatting it with Ubuntu. Install ROS and
install the Botvac package. Go through the ROS tutorials
and also the tutorials from A Gentle Introduction.
Eventually, create the micro SD card as described in the
intro_to_ros repository. This will be used to boot and run
the same stack on a RaspPi (I’m currently using the RP2).
The exercises you have been going through on the laptop
(turtlesim, in particular) can now be applied to a physical
First, you’ll be driving the robot around with either the
keyboard or joystick; mapping or creating a drawing of the
room. I prefer the keyboard since the goal will be to get a
map on the screen, and the last thing you need is another
device of which to keep track of (the joystick).
The goal simply is to get a good chart on the screen.
Once you’ve got your map, stop! While it’s better to end
up where you started (i.e., close the loop), you can always
“set” the pose when you run the navigation stack.
The reason it’s best to close the loop and be facing the
same way (pose) is because this is the navigation stack’s
starting point. The robot will be “pre-localized.” The reason
I say stop when you get a good enough map is from
personal experience, where many a “good enough” version
got ruined by going for a perfect one.
The goal should be to chart out the perimeter of the
room. If it’s too large or parts are not navigable, map out a
corner or side of the room and just navigate back and forth
in that area.
The real core of the package is the
neato_driver.py Python files that you can find at
The driver (
neato_driver.py) has the Neato API
commands; the ROS wrapper node (
neato.py) presents this
information as ROS topics, correlating LIDAR scans with
wheels; optometry creates maps in ROS gmapping. The
map is then saved, and the grid-mapping package is killed.
Finally, launch the Navigation stack (which consists of
move_base and amcl). At this point, the system will load
the map you just saved with global costmaps (inflation
barriers around obstacles and walls) and local costmaps
(active readings by the LIDAR which also feature inflation
barriers around active walls and obstacles).
The way I like to do it is as follows: ( This is a checklist
or cheat sheet for mapping and navigating with ROS and
the Neato robot. I’m using my IP addresses. The robot is
192.168.43.51 and the remote “Host” computer is
192.168.43.20, so you’ll have to change the IP addresses to
match your system):
1. Ping the Pi (or computer) in (or on) the robot with
your remote “host” to verify connection and speed. If you
have problems, check back to make sure your robot and
remote workstation are still talking, and the latency isn’t
too great (>100 ms). ROS depends on IP connectivity.
2. ssh to the robot and sudo ntpdate 192.168.43.20 to
synchronize the remote computer and Pi. There’s no
mention of this on GitHub, but I find it necessary. Steps 2,
3, and 4 are run from the robot terminal. The IP address is
that of your remote workstation. Others use “chrony.”
3. sudo chmod 666 /dev/ttyACM0 gives rights to
attach to the robot.
4. roslaunch bv80bot_node bv80bot_base_only.launch
... launch base_only ... run gmapping and nav stack on
5. On the remote workstation, open a terminal session
<ctl,alt,t> and run roslaunch bv80bot_node
bv80bot_map_gui.launch. This is the grid-mapping routine
7. Open another terminal session on the remote
workstation and launch rosrun teleop_twist_keyboard
teleop_twist_keyboard.py. This is the teleoperation node for
the keyboard. There is more than one configuration of this.
I prefer the one designed for the Turtlebot.
8. At this point, with teleop_twist in the foreground
and Rviz (should have launched with
bv80bot_map_gui.launch) one level below, you should be
able to drive the robot around with the i, m, j, l, and k keys.
On the screen, you will see a map emerge that will look like
48 SERVO 01.2018
I've found it better to use a portable phone charger to power
the Pi. That way, you can put in or remove the whole system
without permanently modifying the robot. Here, I’ve plugged
into a local Wi-Fi router rather than depend on whatever Wi-Fi
might be available. The “bin” can be pried off the lid with a
wide flat-head screwdriver so you can keep the robot
covered. Extra bins can be found on eBay so you still have a
vacuum cleaner. Be sure and specify “XV” or “Botvac.”
*If you have a lot of trouble with ROS communication
between the robot and the remote computer, it could be
environmental variables or the “./bashrc” file