Step-by-step setup of a new laptop for robotics

I was lucky enough to be given a new 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 18.04 LTS with a Windows 10 dual boot, followed by a robotics specific set up.

Installing Ubuntu 18.04 LTS

Installing Ubuntu with a Windows 10 partition on a Dell Alienware involves some initial setup to enable booting from the Ubuntu install USB stick.

  1. 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.
  2. Download Ubuntu 18.04 Desktop and create a bootable Ubuntu USB stick using Rufus.
  3. 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)
  4. 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 I experienced. 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 using sudo 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 by update-initramfs -u
      • Restart the laptop

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.

  1. Install ROS Melodic Mornia  which supports Ubuntu 18.04.
  2. Install the Vim editor using sudo apt-get install vim (see this previous post on how to configure Vim for C++)
  3. 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.
  4. 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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s