Installing Ubuntu(18.04 LTS) on Raspberry Pi 4 with ROS Melodic and RealSense D435 + RTAB-Map
I thought of writing this article because I had to face a lot of problems when configuring the Intel RealSense D435 camera to work in a ROS environment on top of the Raspberry Pi 4.
As of December 2021 the only official Ubuntu desktop version that supports Raspberry Pi 4 is Ubuntu 20.10. However since my target is to use Raspberry Pi 4 in a ROS-related application, I cannot use this option as ROS versions are only supported in LTS versions. (Ex: 16.04, 18.04, 20.04). Therefore my only option is to install Ubuntu Server on Raspberry pi 4 and then install a suitable desktop version on top of that and then install RealSense drivers. But the problem here is when I do this, some of the hardware of the Raspberry Pi 4 board is not accessible because the ubuntu-desktop version is not properly configured to work on a Raspberry Pi 4 board making the RealSense D435 camera fail.
However, I managed to properly install the RealSense D435 camera and RTAB-Map on Raspberry Pi 4 and use it in my final year research project. So the steps I followed are briefed below.
Install Ubuntu 18.04 Desktop on Raspberry Pi 4
The first thing would be to download Ubuntu 18.04 server image for the Raspberry Pi 4 from this link — https://cdimage.ubuntu.com/releases/18.04/release/. (ubuntu-18.04.5-preinstalled-server-arm64+raspi4.img.xz).
Then burn it to a SD card (storage greater than 32GB is recommended) using the Raspberry Pi imager.
Then connect a mouse, keyboard, and a display to your raspberry pi 4 and power the board after inserting the SD card.
After that, you have to add your network information to the Raspberry Pi 4 in order to connect to the internet. Refer to the following tutorial to do that.
How to Setup WiFi on Raspberry Pi 4 with Ubuntu 20.04 LTS 64-bit ARM Server - Blog - BuilderSoft…
It's actually pretty simple and here are the steps: You need 3 pieces of info in order to setup your WiFi: Raspberry Pi…
Now it is time to install Ubuntu Desktop GUI on top of the Ubuntu server. You can easily do that by entering the following command in the command line.
sudo apt install ubuntu-desktop
This will take some time. Once the installation is completed, reboot the Raspberry pi 4. Now you will see the beautiful Ubuntu GUI on your monitor.
Install ROS Melodic
The next step is installing ROS Melodic. To do that please follow the tutorial below which is mentioned in ROS wiki.
We are building Debian packages for several Ubuntu platforms, listed below. These packages are more efficient than…
Then type the following commands to update and install the dependencies and tools which are required before moving into RealSense related installations.
sudo apt-get update
sudo apt-get install automake libtool vim cmake libusb-1.0–0-dev libx11-dev xorg-dev libglu1-mesa-dev
Install RealSense related dependencies
Follow the below step-by-step approach in order to build the required drivers and packages which are required for the proper operation of the RealSense D435 camera.
Raspberry Pi 4 and Intel RealSense D435 · acrobotic/Ai_Demos_RPi Wiki
You can't perform that action at this time. You signed in with another tab or window. You signed out in another tab or…
NOTE: However, you might have to install some additional dependencies while you go through the above approach. For your convenience, I will mention some tips and commands under the relevant sub-topics in case if you face any issues. (Sub-topics are ordered in the same order as the above approach)
When increasing the SWAP size, you have to type CONF_SWAP_SIZE=2048 in /etc/dphys-swapfile and then press ZZ to exit from the vi editor.
Installation — install protobuf
Before following the steps under install protobuf section, first install Python3-pip and utils using the following commands.
sudo apt install python3-pip
sudo pip3 install utils
Installation — install libtbb-dev
Before following the steps under install libtbb-dev, first add an armhf architecture using the following command.
sudo dpkg — add-architecture armhf
Installing RealSense ROS wrapper
To install the RealSense ROS wrapper please follow the below instructions.
sudo apt-get install ros-melodic-ddynamice-reconfigure
Then create a catkin workspace and clone and build the following package.
Additionally, if you want to enable SSH on your Raspberry pi 4, please follow the below guide by enabling the SSH through raspi-config.
How to Enable and Use SSH on Raspberry Pi 4 (Raspberry Pi OS/Raspbian) - The Robotics Back-End
In this tutorial you'll learn how to enable ssh on Raspberry Pi 4, with the Raspberry Pi OS (previously Raspbian). On…
Then from your remote laptop/ computer type ssh ubuntu@<ip_address> in order to access the Raspberry pi 4 through SSH.
Finally, if someone is planning to use RTAB-Map with RealSense d435, you can follow the instructions mentioned below in order to install RTAB-Map in your Raspberry Pi4.
sudo apt-get install ros-melodic-rtabmap
sudo apt-get install ros-melodic-move-base
sudo apt-get install ros-move-base-msgs
Then clone and build the rtabmap-ros package into your catkin workspace from the following link.
GitHub - introlab/rtabmap_ros: RTAB-Map's ROS package.
RTAB-Map's ROS package. For more information, demos and tutorials about this package, visit rtabmap_ros page on ROS…
That’s it. Now you can build maps using RTAB-Map with RealSense D435 camera on your Raspberry Pi 4.
If you are planning to use Ubuntu 20.04 LTS and ROS Noetic, please follow the steps provided in the below link. It was written by my friend Ramith when we were working on a project related to Ubuntu 20.04 LTS and ROS Noetic with RealSense D435 camera.
Getting the installation Right! Raspberry Pi 4 with Ubuntu 20.04 + ROS Noetic + Intel RealSense
Here I am after lot of iterations trying to install Ubuntu on Raspberry Pi 4(RPi4). Initially I made certain mistakes…