Getting started with the TurtleBot
My TurtleBot arrived! I pre-ordered the robot from Clearpath Robotics in June and their robotsmiths sent it out last week. I’m ecstatic.
Wait, what’s a TurtleBot?
The TurtleBot is a robot consisting of an iRobot Create (a Roomba, without the vacuum), a Kinect, a gyro sensor, and a netbook computer.
The TurtleBot represents the most advanced and complete robot platform to reach the thousand-dollar price point yet. While all the components of the TurtleBot have been available for almost a year, the TurtleBot platform brings everything together in one standard package.
The creators of the TurtleBot are also the maintainers of the Robot Operating System (ROS), which the TurtleBot runs. ROS is a popular, extensible collection of libraries and tools for robotics. The beauty of ROS is anyone can contribute a package for it. Need the ability to interpret Kinect sensor data? There’s a package for that. Looking for an algorithm to intelligently navigate a room? Yep, there’s a package for that.
The TurtleBot arrived, now what?
Assembling
I’m going to assume the TurtleBot arrived fully assembled with ROS installed. If a TurtleBot kit was ordered instead, the documentation includes detailed instructions on assembling and the ROS TurtleBot page contains TurtleBot-specific ROS installation.
However, even an assembled TurtleBot requires a few extra build instructions before beginning.
First, the gyro sensor must be connected to the Create, as pictured. The gyro sensor aids in providing better odometry to the robot. In other words, the sensor provides more accurate sense of direction and speed.
USB cannot supply the 12V the Kinect requires. The TurtleBot includes an adapter cable that splits the Kinect cable into a USB adapter and a power adapter. The power adapter connects to the gyro sensor and draws its power from the Create.
Finally, while tempting to leave the netbook open on top of the robot, be sure to secure it! The TurtleBot can jitter when being teleoperated, which will cause the laptop to fall off the top. Secure the netbook to the top (bungee cords? velcro? I’m open to suggestions) or leave the computer snug in the bottom deck.
Network Configuration
When logging in to the TurtleBot netbook the TurtleBot stack will start up in the background. The network will need to be configured the first time logging into the laptop as most interaction with the robot will happen over SSH from the workstation.
Before continuing any further, change the default passwords. Seriously, someone will SSH into the robot at the least opportune time. Treat the robot like any server and secure it.
The following instructions will change the password for the turtlebot user and root user.
# Changes the password for the user turtlebot
passwd
# Changes the password for root
sudo passwd
To test the network configuration, SSH from the workstation into the netbook. ROS does not have to be installed on the workstation for SSH-only sessions.
# SSH into the TurtleBot
# The IP address of the TurtleBot can be found using ifconfig
ssh turtlebot@10.0.1.18
Run an “app”
Okay, the boring stuff is over, time to get the TurtleBot to do something. A simple app to start with is the Keyboard Teleoperation app, which allows the TurtleBot to be controlled by the workstation’s keyboard. To begin, run the keyboard_teleop.launch in the SSH shell:
roslaunch turtlebot_teleop keyboard_teleop.launch
Now, pressing the arrow keys from the workstation should move the robot forward or backward, or turn left or right.
What does roslaunch do? Well, ROS is based on the idea of connecting separate, specialized programs called nodes. One node can process data from a Kinect while another node computes a navigation route. A launch file is an XML file describing which nodes to run. Roslaunch reads in the launch file and executes the nodes with any specified parameters.
For example, keyboard_teleop.launch sets the velocity of the TurtleBot and listens to the keyboard for direction instructions (referenced as cmd_vel in the file).
Most of the TurtleBot “apps” are launch files and their associated nodes. Running these apps is a matter of running roslaunch on the launch file.
Where to go from here?
There are more advanced apps ready to play with on the TurtleBot. Following the Network Setup and Bring Up tutorials will be necessary before running the advanced apps.
The gmapping app creates a 3D map of the robot’s environment. It may look simple from videos, but actually navigating the TurtleBot around and seeing it update the map in real-time is nerdtastic. The Gmapping app also serves as an excellent introduction to the SLAM technique, which helps a robot understand its surroundings.
A list of apps configured for the TurtleBot are available on the TurtleBot wiki.
Digging deeper into the robot’s capabilities will involve digging into the Robot Operating System. Luckily, ROS has exceptional documentation, including a start guide and tutorials covering developing for ROS.
What if I have a question?
The first place I recommend for support is the TurtleBot wiki pages on ros.org. The answer may be a couple links in, or simply be a matter of re-reading the instructions (which has helped me a few times already).
If you need to ask a question, answers.ros.org is a Stack Overflow-like Q&A site with many knowledgeable and friendly roboticists.
blog comments powered by Disqus