ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I highly recommend sticking with a platform / distribution that has binaries available for the sake of maintainability.

I would go with Ubuntu Mate and removing everything you don't need. It's what I'm running on 2 RPis and it is both stable and easy to maintain.

One big drawback of Ubuntu Mate is that you need to connect the RPi to a screen / keyboard / mouse once to do some configuration (setting your user name etc., enabling SSH)

Things to do after installing Ubuntu Mate:

  • Enable and secure SSH server: not enabled by default on most recent distributions. Many people did not change the SSH password and this made a lot of RPis vulnerable, now it is disabled by default.
  • Disable X server (raspi-config is the easiest way to do this)
  • Enable extra functionalities if needed like SPI, I2C etc..(raspi-config again)
  • Remove packages that are not needed and take space (https://www.commandlinefu.com/commands/view/3842/list-your-largest-installed-packages-on-debianubuntu).
  • Control services at startup to boot faster (systemd-analyze blame is probably the best tool for this).
  • Use htop (or top) to debug what is taking RAM / CPU, there shouldn't be much to do after the install.
  • You are probably going to compile and the RPi has limited RAM; if you fill up the RAM you'll have to reboot the RPi by hardware, expect corrupted files; creating a swap file helps preventing such crashes:

Create a 500 Mb swap file, set appropriate rights on this file, configure it as swap, enable swap, show swap info

sudo fallocate -l 500M /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show

Create an entry in /etc/fstab so that the swap partition is automatically mounted at boot:

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

That way you have a clean, pretty minimal install and you will receive ROS updates whenever they are available. I think this solution is the best compromise if you are looking for:

  • Maintainability
  • Ease of use
  • 'Upgradability' (it should be easy to switch to Ubuntu 18.04 Mate)
  • Acceptable booting times (~ 1 minute on my side, what is acceptable highly depends on the application)
  • ROS updates (that is one very important point that will spare you a lot of time)

I highly recommend sticking with a platform / distribution that has ROS binaries available for the sake of maintainability.

I would go with Ubuntu Mate and removing everything you don't need. It's what I'm running on 2 RPis and it is both stable and easy to maintain.

One big drawback of Ubuntu Mate is that you need to connect the RPi to a screen / keyboard / mouse once to do some configuration (setting your user name etc., enabling SSH)

Things to do after installing Ubuntu Mate:

  • Enable and secure SSH server: not enabled by default on most recent distributions. Many people did not change the SSH password and this made a lot of RPis vulnerable, now it is disabled by default.
  • Disable X server (raspi-config is the easiest way to do this)
  • Enable extra functionalities if needed like SPI, I2C etc..(raspi-config again)
  • Remove packages that are not needed and take space (https://www.commandlinefu.com/commands/view/3842/list-your-largest-installed-packages-on-debianubuntu).
  • Control services at startup to boot faster (systemd-analyze blame is probably the best tool for this).
  • Use htop (or top) to debug what is taking RAM / CPU, there shouldn't be much to do after the install.
  • You are probably going to compile and the RPi has limited RAM; if you fill up the RAM you'll have to reboot the RPi by hardware, expect corrupted files; creating a swap file helps preventing such crashes:

Create a 500 Mb swap file, set appropriate rights on this file, configure it as swap, enable swap, show swap info

sudo fallocate -l 500M /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon --show

Create an entry in /etc/fstab so that the swap partition is automatically mounted at boot:

echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab

That way you have a clean, pretty minimal install and you will receive ROS updates whenever they are available. I think this solution is the best compromise if you are looking for:

  • Maintainability
  • Ease of use
  • 'Upgradability' (it should be easy to switch to Ubuntu 18.04 Mate)
  • Acceptable booting times (~ 1 minute on my side, what is acceptable highly depends on the application)
  • ROS updates (that is one very important point that will spare you a lot of time)