Setting up a new laptop for robotics can be time consuming. This post will focus on using the Dell Alienware 15 R4 laptop. With its Intel i9 processor and Nvidia GTX 1080 graphics card, it’s the perfect laptop for robotics or computer vision projects.
Setting up the laptop comprises of two main steps: installing Ubuntu with a Windows 10 dual boot, followed by a robotics specific set up.
Which version of Ubuntu to install
ROS Kinetic currently only supports Ubuntu 16.04 whilst ROS Melodic supports Ubuntu 18.04. Presently, it is best to resist the urge to install Ubuntu 18.04 LTS because ROS Melodic is still beta (in terms of available packages, support).
Installing Ubuntu 18.04 LTS (not recommended)
Installing Ubuntu with a Windows 10 partition on a Dell Alienware involves some initial setup to enable booting from the Ubuntu install USB stick.
- Create a Windows 10 recovery drive. This is very important in case anything goes wrong with the Ubuntu partitioning or installation. Booting to this recovery drive and running a full reinstall recovery will reset your laptop to its factory condition.
- Download Ubuntu 18.04 Desktop and create a bootable Ubuntu USB stick using Rufus.
- The Windows 10 installation on the Alienware laptop uses UEFI Bios mode and Rufus creates a UEFI compatible bootable Ubuntu USB stick from the .iso file downloaded in step 2. In order to be able to boot from this USB stick, legacy option ROMs has to be disabled in BIOS otherwise an error appears when attempting to boot from the USB. To fix this:
- Restart the laptop and press F2 to enter BIOS
- Navigate to the ‘Boot’ tab and change ‘Legacy Option ROMs’ to Disabled.
- Exit (the laptop will reboot)
- To boot to the Ubuntu USB stick, restart the laptop and press F12. The GNU GRUB screen will appear. Select Install Ubuntu and continue with a normal installation.
Troubleshooting Ubuntu installation
Although Ubuntu 18.04 is long term support, there are some hardware driver issues. Here are the fixes.
- Laptop not waking up from sleep or hibernation. This happens because of the graphics card and can be fixed by re-installing the Nvidia GTX 1080 drivers. In a terminal, type
sudo apt-get remove --purge nvidia-driver-390
and then reinstall usingsudo apt-get install nvidia-driver-390
. Note that 390 is the Nvidia driver for the GTX 1080.
- Laptop trackpad not working at all but an external USB mouse works fine. To fix this, initramfs – a script that gets loaded by the boot loader after the kernel – needs to be updated. To do so, open a terminal and type:
-
sudo su
-
echo 'blacklist i2c_hid' >> /etc/modprobe.d/blacklist.conf
depmod -a
followed byupdate-initramfs -u
- Restart the laptop
-
- Laptop screen brightness cannot be changed from settings. To solve this, install the Brightness Controller application.
Installing Ubuntu 16.04 LTS (recommended)
To install Ubuntu 16.04 follow steps 1-4 above (replacing Ubuntu 18.04 with 16.04 LTS). There is however no NVIDIA driver package for the GTX 1080 (nvidia-driver-390) in Ubuntu 16.04. This must be manually installed from ppa:graphics-drivers/ppa
by typing the following commands into a terminal:
- Add the repository:
sudo add-apt-repository ppa:graphics-drivers/ppa
- Update your packages:
sudo apt-get update
and then install the driver usingsudo apt-get install nvidia-390
Robotics environment setup
This section describes a basic setup for robotics in Ubuntu on the Alienware laptop. This is not an exhaustive list but rather a solid foundation from which to work when customizing your own laptop for robotics software development.
- Install ROS Melodic Mornia which supports Ubuntu 18.04 (however support is not good). For a more stable and complete version, install ROS Kinetic Kame which supports Ubuntu 16.04.
- Install the Vim editor using
sudo apt-get install vim
(see this previous post on how to configure Vim for C++) - Install Visual Studio Code by downloading the .deb file from the official website and running it. After installation, make sure to install the:
- Microsoft C/C++ extension and configure IntelliSense and debugging.
- ROS VSCode extension. This performs some useful ROS related tasks such as automatic environment configuration, automatically adding include paths, starting/stopping/checking the status of ROS Master etc.
- Install Anaconda Python 3.6 version using the official Linux guide. To test the installation just open a terminal and run
conda list
which should display a list of all packages. To get started, follow the instructions on this previous post.