After some waiting and more waiting… and some work in the meantime on a different project (I might describe that one also one day), I’m back to this idea of a controllable Roomba. I started to install required software on the Raspberry Pi I’ve bought. The OS is Raspbian Jessie with ROS Kinetic. It’s not difficult – just takes some time, because most of packages had to be built (almost no binaries). I’m happy because I’ve learnt a new thing! Last time I was doing this kind of thing I’ve missed one of the paragraphs in the installation guide and didn’t know exactly how to properly add released packages to the build. I was adding their source code to the standard workspace and than built it. Which worked, but made every build during development quite long (it checks every package in the workspace for updates). In Ubuntu, you can install most of the packages via apt-get. And there are no such binaries for Debian systems. Because why should there be? ROS is not that strongly supported on Debian. Let alone an ARMv7 Debian… But from the installation guide, we see that invoking this (with package names we want to install instead of “packages” in the second line) adds the packages to the basic workspace.
cd ~/ros_catkin_ws rosinstall_generator packages --rosdistro kinetic --deps --wet-only \ --tar > kinetic-custom_ros.rosinstal wstool merge -t src kinetic-custom_ros.rosinstall wstool update -t src rosdep install --from-paths src --ignore-src --rosdistro kinetic -y \ -r --os=debian:jessie sudo ./src/catkin/bin/catkin_make_isolated --install \ -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/kinetic -j2
Basically, the rosinstall_generator creates a rosinstall file for the packages, which allows easy installation of dependencies (rosdep install) and building of those packages from sources (the last line). wstool is used here to update the workspace (let’s just say it has to be there).
Beside installing bare ROS, I have also installed the create_autonomy package I’ve mentioned here and a raspicam_node for using the Pi camera with ROS (quite useful and simple). I did have a problem with the Eigen3 library when building the robot_state_publisher package, which is a dependency for create_autonomy. I fixed it by applying the changes mentioned by bchretien here to the CMakeLists.txt file in the sources of the robot_state_publisher package. When compilng cv_bridge on the other side, the Raspberry ran out of memory. The solution was to change the last option in the last command from -j2 to -j1. It limited the number of cores on which the compilation was taking place from 2 to 1 and thus reducing the amount of memory required to compile. I’m still trying to force myself to write a bigger article about ROS. It’s coming, I promise.
I also managed to strip my Roomba to bare parts (and assemble it back to the functional state). This thing is really well designed. Most of the parts are separate modules. E.g. the motors and wheels. After unscrewing the bottom plate, you just need to unscrew 3 screws and the module pops out. It’s connected with the rest by an edge connector, which makes it even simpler – there are no cables. At least in this part. The front, where there are more sensors is more messed up, but it’s still pretty neat and tidy. Always, in such constructions, the ideal length of the cables is causing me to smile. Quite the contrary of prototype projects.
In the next article I’ll try to describe some basics of 3d printing and how it’ll be useful for this project. Cheers!