Skip to content

Latest commit

 

History

History
74 lines (70 loc) · 5.84 KB

ubuntu-install.md

File metadata and controls

74 lines (70 loc) · 5.84 KB

Installation and Configuration of Ubuntu and ROS on RasPi4

  • Install Ubuntu MATE 20.04 LTS on Raspberry Pi 4

    • (On Windows) Write file ubuntu-mate-20.04.1-desktop-arm64*raspi.img.xz to 32 GB micro SDcard using Raspberry Pi Imager
      • This takes about 30 minutes
    • Boot Pi from new SDcard and configure
      • This takes about 10 minutes
    • Unattended update
      • This takes about 3 hours
    • From Welcome screen -> Getting Started -> System Specifications -> Utilities
      • Install:
        • System Profiler and Benchmark
        • GParted
        • Psensor
  • sudo apt update

  • sudo apt upgrade

  • At this point, with about 4.5 hours invested, I thought it might be a good idea to make a backup image of the micro SD card

    • Used Win 32 Disk Imager on Windows
      • This took about an hour
  • Add 'GitLab Markdown Viewer' extension to Firefox

  • Alternatively, use Markdown Viewer Webext addon to Firefox

  • Resolve /usr/bin/env: ‘python’: No such file or directory errors running python programs starting with !#/usr/bin/env python

    • Added symbolic link. sudo ln -s python3 /usr/bin/python
  • Add robot (and raspi80) to /etc/hosts

  • Install ROS: Ubuntu install of ROS Noetic

  • Configure ROS Environment: Configuring Your ROS Environment

  • Add line to ~/.bashrc : source ~/catkin_ws/devel/setup.bash

  • Install Arduino IDE and rosserial. (It turns out, this isn't used. I thought I was going to need it, but then I discovered PIGPIO.)

  • Configure passwordless ssh to robot How to setup SSH login without password on Linux systems

  • Load codec to enable watching youtube videos. sudo apt install libavcodec-extra

  • Still trying to get video and sound working. Need to edit a couple of files.

    • Google search took me here which has a link here
  • Install pip

    • sudo apt update
    • sudo apt upgrade
    • sudo apt install python3-pip
  • pip install RPi.GPIO

  • Install idle sudo apt install idle3

  • Install python mathutils library pip install mathutils (Has a handy utility function used to normalize quaternion.)

  • Install Jupyter Notebook: How to Install Jupyter Notebook on Ubuntu 20.04 / 18.04. (This isn't actually needed. I installed this when I was trying to learn more about why I couldn't get robot-pose-ekf node working.)

  • Install Caja Share (samba) allowing files on robot to be opened in Caja (This is pretty handy. It allows editing files on robot from raspi4.)

  • Install git -> git version 2.25.1 already installed!

  • Install teleop_twist_keyboard sudo apt install ros-noetic-teleop-twist-keyboard

  • Install gmapping and navigation (This isn't needed either. It turns out all the navigation is being done on robot.)

    • sudo apt install ros-noetic-gmapping
    • sudo apt install ros-noetic-navigation

Here is some hard won Ubuntu-Mate knowledge that I wouldn't want to have to learn a second time...

One day, for no obvious reason, the raspi4 wouldn't connect to wifi. The timing of this issue coincided with a service interruption, so I immediately jumped to an incorrect conclusion. I would be embarassed to say how long I struggled before I figured out the cause. Eventually, I realized what was going on. Months ago, I had fiddled with Mate Tweak to have a look at some alternative desktop styles. In the process, the panels and desktop layout had changed and I didn't notice that the wifi-network-manager applet was no longer displayed in the top panel, nor did I even wonder why it was missing. Once I realized that my desktop was missing its network manager applet from the control panel, it was very simple to restore it:

  • From the Control Center, click MATE Tweak
    • Select Panel then switch to "Traditional"
    • Et voila! The wifi manager applet symbol wifi icon shows up in the top panel.
    • Clicking on it displays a drop down dialog with, among other things, an item labeled Enable WIFI. I clicked it on and the WIFI connected immediately.