Raspberry Pi 4 and ROS Noetic installation - ashBabu/Utilities GitHub Wiki

1. Easiest way

Go through the below methods. As per this guide, it is recommended to install Ubuntu Mate but this is not required at all and moreover it, by default, goes for Ubuntu 22.04 which would require ROS2 or compile ROS from source. Since Method 2., did not work, I found that using the rpi-imager, there are several options to select the OS, of which one is Ubuntu Server 20.04, 64 bit. This is selected to install ROS Noetic hassle free. The reason for selecting Noetic is because all the previous work has been done in that and a migration to ROS2 would take time. Once Ubuntu Server is selected and the image is written on to the microSD card, follow these steps

  • Put the microsd in Rpi
  • This will provide a login screen with login name: ubuntu and password: ubuntu. On log on, change the password.
  • It is important to have an ethernet internet connection
  • sudo apt-get install ubuntu-desktop.
  • reboot to activate the desktop environment
  • Install ROS Noetic

2. What did not work

I tried ubuntu 20.04 on Raspberry Pi4 by following the steps below but it did not work

  • In another computer with SD card read capability (microsd card inside SD adapter)
    • Go to downloads and downloaded the .img.xz file (1.1GB)
    • sudo apt-get install rpi-imager
    • Started the rpi-imager and chose custom from the dropdown and pointed to the img.xz file and made a disk
    • When inserted into RPi, it said the board doesnt support this OS and needed an update

3. Hardest way

I am installing ROS from source. I wanted ROS and not ROS2. Also, the rosdep install threw errors and hence several packages had to be installed manually and is shown below.

  • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
  • sudo apt-get install python3-rosdep2 python3-rosinstall-generator python3-vcstools build-essential
  • sudo apt-get install python3-pip
  • sudo pip install vcstool
  • sudo rosdep init
  • rosdep update
  • mkdir ~/ros_catkin_ws
  • cd ~/ros_catkin_ws
  • rosinstall_generator desktop --rosdistro noetic --deps --tar > noetic-desktop.rosinstall
  • mkdir ./src
  • vcs import --input noetic-desktop.rosinstall ./src

Manually Installed packages

  • sudo apt install -y python3-empy libboost-all-dev python3-nose libconsole-bridge-dev libpoco-dev libtinyxml2-dev libtinyxml-dev qtbase5-dev python3-sip python3-sip-dev pyqt5-dev pyqt5-dev-tools curl libcurl4-openssl-dev libgtest-dev liblz4-dev libeigen3-dev libcppunit-dev libassimp-dev libogre-1.9-dev liburdfdom-dev liburdfdom-headers-dev libopencv-dev libbz2-dev python3-opencv libgpgme-dev liblog4cxx-dev libyaml-cpp-dev

urdfdom_headers and Orocos KDL

  • git clone https://github.com/ros/urdfdom_headers.git
  • cd urdfdom_headers && mkdir build && cd build
  • cmake ..
  • make && sudo make install
  • git clone https://github.com/orocos/orocos_kinematics_dynamics.git
  • cd orocos_kinematics_dynamics/orocos_kdl && mkdir build && cd build
  • cmake ..
  • make && sudo make install