build details

Show: section status errors & todos local changes recent changes last change in-page changes feedback controls

Setup - Laptop

Modified 2021-03-20 by Andrea Censi

An Ubuntu 20.04 environment with sufficient free disk space (recommended 100 GB).

Internet connection.

About 10 minutes.

A laptop ready to be used for Duckietown.

Minimal Laptop Requirements

Modified 2021-03-21 by Andrea F. Daniele

These installation steps make sure that you have a minimal “sane” environment, which includes:

  1. Git;
  2. Docker;
  3. The Duckietown Shell.

Native installation vs virtual machines

Modified 2021-03-21 by Andrea F. Daniele

Having Ubuntu installed natively on your laptop is recommended but not strictly required.

If you are running Ubuntu in a VM make sure that you are using a Bridged network adapter (for example VirtualBox uses NAT by default). This allows you to be on the same subnetwork as your Duckiebot.

Sometimes when running a VMware machine on a Mac OS host, it is neccessary to have two network adapters: Share with my Mac for connecting to the internet and Bridged Networking for connecting to the Duckiebot.

For more information about networking with VMware, see here.

Setup for Ubuntu 20.04

Modified 2021-03-21 by Andrea F. Daniele

System installation

Modified 2021-03-21 by Andrea F. Daniele

Install Ubuntu 20.04.

if you have a robot, you must install Ubuntu natively.

For instructions, see for example this online tutorial.

Basic dependencies

Modified 2021-03-21 by Andrea F. Daniele

Installs pip3, git, git-lfs, curl, wget:

laptop $ sudo apt update
laptop $ sudo apt install -y python3-pip git git-lfs curl wget


Modified 2023-02-08 by Jacopo Tani

Install Docker by following the instructions here.

Adds user to “docker” group:

laptop $ sudo adduser `whoami` docker

you need to log out and back in for the group change to take effect.

Make sure you have docker-compose installed:

laptop $ sudo apt-get install docker-compose

Make sure the Docker version is v.0.8.0+ and buildx version v1.4.0+ through:

docker --version

docker buildx --version

If you missed this step, you will later run into docker permission issues.

Duckietown Shell

Modified 2021-03-21 by Andrea F. Daniele

If you are not using Ubuntu environment and you would like to install Duckietown Shell, you should refer to this page.

Install the Duckietown Shell using the following command,

laptop $ pip3 install --no-cache-dir --user --upgrade duckietown-shell

The first thing you need to do with the Duckietown Shell, is set the Duckietown software distribution you want to work with, for this version of the book, we use daffy. Set the shell to use the daffy distribution by running the following command,

laptop $ dts --set-version daffy

For virtual machines

Modified 2021-03-21 by Andrea F. Daniele

For VMWare, install the package open-vm-tools:

laptop $ sudo apt install open-vm-tools

Setting up Mac OS X

Modified 2020-09-10 by frank-qcd-qk

this configuration is not officially supported. There might be problems with implementation. We strongly urge you to use Ubuntu 20.04 enviornment.

Basic dependencies

Modified 2018-09-27 by Andrea Censi

You will need to find the instructions for git, git-lfs.


Modified 2021-09-26 by Jacopo Tani

You will also need the latest version of XQuartz.

You can install using brew as follows:

laptop $ brew install xquartz

Or, download from here and follow the instructions.

After installing XQuartz, run it in the command line with:

laptop $ open -a XQuartz

Go to “Preferences” and in the “Security” tab make sure that the checkbox next to “Allow connections from network clients” is set. Now close XQuartz.

You may want to add the following lines to your .bashrc file:

export IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost +$IP

You may also need to add /usr/X11/bin to your system path in order for it to find xhost.

These will find your IP and then allow incoming connections to it in order to be able to popup windows from within docker containers.

Alternatively, you can run them each time before you want to use X11 forwarding. This is done for you when you run things through the duckietown shell.


Modified 2022-11-17 by Kathryn Hite

If you are using Docker Desktop for Mac, you will need to specify the amount of memory for Docker to use in order to run the Duckietown containers. Open the Docker menu and go to “Preferences” then “Advanced”. Use the slider in the Advanced tab to increase Memory to a minimum of 4.5GB.

Duckietown Shell

Modified 2021-03-21 by Andrea F. Daniele

Follow these instructions.