In my last post, I described this project and how to get the Raspberry Pi set up and tested. This post continues with getting the Robot Operating System installed and working and getting a few parts selected and ordered.
Why use the Robot Operating System?
The Robot Operating System (ROS) is a framework to build advanced robots using Python, Lisp or C++. I elected to go with the ROS because of it’s long list of prebuilt capabilities (e.g. vision and navigation) and extensibility. The framework provides a way to create a publish/subscribe messaging and services infrastructure that can span multiple controllers and computers. Robot components are controlled through specialized code running in ROS Nodes. ROS Nodes interact with each other through a server node controlling the overall infrastructure. A multiple controller design can communicate over a local WiFi network or be contained entirely on a single controller. I am still learning about this framework and currently plan to run everything on the Raspberry Pi with Python and use my laptop as a development, monitoring and debugging node. As I learn more about the performance characteristics, I will have the option to move work off of the Raspberry Pi to other controllers or convert the Python to C++.
Installing the ROS
I would like to have the ROS on my Mac as well as the Raspberry Pi. The ROS Indigo distribution is fully supported on Ubuntu but only experimentally on the Mac. I elected to use VirtualBox to run Ubuntu on my Mac:
- Installed Ubuntu with VirtualBox on the Mac using these instructions. Note that ROS Indigo supports Ubuntu 14.04 “Trusty Tahr”. This was a very easy install and worked without a problem.
- I updated the Network Settings of the Ubuntu VM by selecting the Network tab and changing the Attached to: option to use Bridged Adapter. This will enable the VM and Raspberry Pi to reach each other (e.g. ping, ssh). This setting may be revisited depending on experience.
- I made the Ubuntu desktop full screen. This was a side effect of using the VirtualBox menu on the running desktop: Devices … Insert Guest Additions CD image …
- Installed ROS Indigo on Ubuntu using these instructions on the ROS site. I went through all of the beginner tutorials to ensure the installation worked. This was also straightforward with no issues.
- Installed ROS Indigo on the Raspberry Pi using these instructions on the ROS site. A few problems came up:
- Much of the installation is actually a build from source code. This process took many, many hours – the better part of a full day.
- The build from source for the liburdfdom-dev package failed because it was unable to find the requested Boost Library version 1.55.0. I manually installed the lib-boost-thread-dev and lib-boost-system-dev libraries using apt-get install.
- The GUI-based turtle tutorials were not tested because I was remotely accessing the Raspberry Pi via ssh. I have not gone back and connected a monitor and keyboard to the Raspberry Pi to confirm they work.
- I was able to confirm the rest of the tutorial by running the pub/sub example.
- I was able to get the Ubuntu VM to run the main server (roscore) and the publisher example while the Raspberry Pi successfully subscribed and received the messages on the same topic.
Next Steps for Set-Up
I’d like to get a Python IDE working that can easily work within the ROS package directory requirements. The Adafruit WebIDE is great for beginners but there appears to be challenges getting the source tree assumptions aligned with the ROS package source assumptions. I may be able to use a symbolic link from the ROS src directory to the WebIDE directory to make that work. Alternatively, I am exploring the use of LiClipse on Ubuntu working against the source tree mounted on the Raspberry Pi MicroSD card.
I’ve been waiting for HobbyKing to deliver the HK15298 servos for the arm and it’s been a frustrating experience. The servos are now backordered (even though they appear to be in stock at a different US warehouse) and after a long delay and terrible customer service, the servos have been canceled. I have selected a substitute that I think should work: Power HD High-Torque Servo 1501MG. The 1501MG has slightly more torque at 6V and equivalent turn rate. It is not high voltage and it is not digital but those features should not matter for this application.
On the 3D printed parts front, I have decided not to get my own 3D printer. While it sounds cool to have your own 3D printer, the ABS plastic smell, printing noise and the need for a temperature controlled room eliminated that option for me. Instead, I am using 3D printing services like www.3dhubs.com. I found a local engineering company that has many great reviews and ordered all 28 parts for the right hand and forearm. The parts are done and being shipped in the next few days.