Assigned: Andrea Censi
This page is for the DB18
configuration used in classes in 2018.
For last year's instructions, see here.
Requires: A laptop with free disk space.
Requires: Internet connection.
Requires: About 10 minutes.
Results: A laptop ready to be used for Duckietown.
These installation steps make sure that you have a minimal "sane" environment, which includes:
- Git and Git LFS;
- Docker;
- The Duckietown Shell.
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.
TODO: give some pointers for VM.
Install Ubuntu 18.
See: For instructions, see for example this online tutorial.
Installs pip, git, git-lfs, curl, wget:
laptop $ sudo apt install -y python-pip git git-lfs curl wget
Installs Docker:
laptop $ sudo apt install -y docker.io
Adds user to "docker" group:
laptop $ sudo adduser `whoami` docker
Note: you need to log out and in for the group change take effect.
To install the Duckietown shell, use:
laptop $ pip install --user --no-cache-dir -U duckietown-shell
Edit the file ~/.profile
and add the line:
export PATH=~/.local/bin:$PATH
Note: do not use sudo pip
to install the Duckietown Shell.
Log out and in. This command should succeed:
laptop $ dts version
Other useful packages:
laptop $ sudo apt install vim byobu openssh-server nfs-common zsh
Edit ~/.profile
and add:
export EDITOR=vim
$ sudo apt install zsh
$ chsh -s /usr/bin/zsh
Install oh-my-zsh
:
$ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"
Edit ~/.zshrc
and set a different theme using:
ZSH_THEME="bureau"
You can find other themes at this page.
Also add the line:
. ~/.profile
To add passwordless sudo:
laptop $ sudo visudo
Change the line
%sudo ALL=(ALL:ALL) ALL
into
%sudo ALL=(ALL:ALL) NOPASSWD: ALL
$ sudo apt install iotop atop htop
For VMWare, install this:
laptop $ sudo apt install open-vm-tools
Assigned to: Liam
Note: this configuration is not officially supported.
You will need to find the instructions for git, git-lfs.
You will also need the latest version of XQuartz.
You can install using brew
as follows:
laptop $ brew cask 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.
It is also recommended that you add the following lines to your .bashrc
file:
export IP=$(ifconfig en0 | grep inet | awk '$1=="inet" {print $2}')
xhost +$IP
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.
Follow these instructions
To install the Duckietown shell, use:
laptop $ pip install --user --no-cache-dir -U duckietown-shell
Edit the file ~/.profile
and add the line:
export PATH=~/.local/bin:$PATH
Note: do not use sudo pip
to install the Duckietown Shell.
Log out and in. This command should succeed:
laptop $ dts version
Note: It is suggested to use Ubuntu 18.
Install Ubuntu 16.04.3.
See: For instructions, see for example this online tutorial.
On the choice of username: During the installation, create a user for yourself with a username different from ubuntu
, which is the default. Otherwise, you may get confused later.
Installs pip, git, git-lfs, docker, duckietown-shell:
laptop $ sudo apt-get install software-properties-common curl
laptop $ sudo add-apt-repository ppa:git-core/ppa
laptop $ curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
laptop $ sudo apt-get install -y python-pip git git-lfs
laptop $ curl -fsSL https://get.docker.com | sudo bash
laptop $ sudo usermod -aG docker `whoami`
Note: you need to log in and out to have the group change take effect.
Install the Duckietown Shell using:
laptop $ pip install --no-cache-dir -U --user duckietown-shell
Edit the file ~/.profile
and add the line:
export PATH=~/.local/bin:$PATH
Note: do not use sudo pip
to install the Duckietown Shell.
Log out and in. This command should succeed:
laptop $ dts version