Installation of ROS Can Be A Nightmare
Installing ROS with an image is a lifesaver
ROS is a very important framework for robotic projects. As mentioned in the previous post, I used ROS for the robotic fish project.
There are guidelines on how to install ROS here and there on the internet. However, the installation was not as straightforward as I thought. We need to consider the following factors:
- what hardware
- what Operating System to use
- which ROS version
- if the project depends on certain third-party libraries, what ROS version do they support
For my project, the hardware is Raspberry Pi 4 (Model B 8GB RAM). As a developer, we usually want to use the latest version of the libraries because they have more advanced features and will have a longer support time. However, one of the project’s core dependencies, the raspi_cam node, only works with ROS Kinetic. ROS Kinetic was released back in 2016, so It’s quite outdated as a software version. I spent many hours trying to make it work in newer ROS versions, and I encountered different kinds of problems after many rounds of trial and error. I saw someone posted in the forum that he spent months making it work in ROS Noetic, which is the latest ROS version. That scared me because I didn’t have that much time to drag on the installation.
As a result, I decided to move on with ROS Kinetic. Installation of ROS Kinetic with Ubuntu could take a long time by following official guideline, and people could easily fall into the problem of missing packages.
Luckily, I found ready-made images at Ubiquity Robotics. It’s a lifesaver as the image has been preinstalled with ubuntu16.04+ROS and all needed dependencies. With the image, I got it running in a few hours.
The drawback is that I had to work with Python 2.7.12, OpenCV 3.3.1. However, I really didn’t know how long I would be stuck if I kept trying installing newer versions of ROS.
Update on 21 Aug 2021
After I submitted my project deliveries for academic grading, I came back to try again if I could get ROS Noetic running on Raspberry Pi 4 with Raspbian buster. I found a great guide, following which I successfully installed ROS Noetic. However, another problem came up. Certain packages could not be found by apt, but the wiki pages cv_bridge and sensor_msgs shows clearly the packages are available for Noetic.
apt: Failed to detect successful installation of [ros-noetic-cv-bridge]
apt: Failed to detect successful installation of [ros-noetic-sensor-msgs]
After pulling my hair and googling for many hours, I found a related post in ROS Answers. So, it might be due to armhf or arm64. Whatever!!! It’s frustrating to set up the environment and fix missing packages for weeks.
I will hold on to ROS Kinetic.