Skip to content
Permalink
Browse files

Updated setup

  • Loading branch information...
AndreaCensi committed Sep 27, 2018
1 parent 51d38a1 commit a29a2fdf0234f7c0edec4d1acef40a6ef751f866
@@ -0,0 +1,230 @@
# Laptop Setup {#laptop-setup status=beta}

Assigned: Andrea Censi

This page is for the `DB18` configuration used in classes in 2018.

For last year's instructions, see [here](https://docs.duckietown.org/DT17/).

<div class='requirements' markdown='1'>

Requires: A laptop with free disk space.

Requires: Internet connection.

Requires: About 10 minutes.

Results: A laptop ready to be used for Duckietown.

</div>




## Minimal Laptop Requirements {#laptop-setup-reqs}

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

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


## Native installation vs virtual machines {#laptop-setup-vms}

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

TODO: give some pointers for VM.


## Setup for Ubuntu 18 {#laptop-setup-ubuntu-18}

### System installation {#laptop-setup-ubuntu-18-system}

Install Ubuntu 18.

See: For instructions, see for example [this online tutorial][tutorial].

[tutorial]: https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop

### Basic dependencies {#laptop-setup-ubuntu-18-basic}

Installs pip, git, git-lfs, docker, duckietown-shell:

laptop $ sudo apt install -y python-pip git git-lfs

### Docker {#laptop-setup-ubuntu-18-docker}

laptop $ sudo apt install -y docker.io
laptop $ sudo adduser `whoami` docker


Note: you need to *log in and out* to have the group change take effect.


### Duckietown Shell {#laptop-setup-ubuntu-18-shell}

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 suggested configuration

Other useful packages:

laptop $ sudo apt install vim byobu openssh-server nfs-common

Edit `~/.profile` and add:

export EDITOR=vim

#### Passwordless sudo

To add passwordless sudo:

laptop $ sudo visudo

Change the line

%sudo ALL=(ALL:ALL) ALL

into

%sudo ALL=(ALL:ALL) NOPASSWD: ALL

### For virtual machines

For VMWare, install this:

laptop $ sudo apt install open-vm-tools



## Setting up Mac OS X {#laptop-setup-mac}

Assigned to: Liam

Note: this configuration is not officially supported.

### Basic dependencies {#laptop-setup-mac-basic}

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

### Quartz {#laptop-setup-mac-quartz}

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](https://www.xquartz.org/) 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.


### Docker {#laptop-setup-mac-docker}

TODO: to write

### Duckietown Shell {#laptop-setup-mac-shell}

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





## Setup for Ubuntu 16.04 {#laptop-setup-ubuntu-16}

Note: It is suggested to use Ubuntu 18.

### System installation {#laptop-setup-ubuntu-16-system}

Install Ubuntu 16.04.3.

See: For instructions, see for example [this online tutorial][tutorial].

[tutorial]: https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop

**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.


### Basic dependencies {#laptop-setup-ubuntu-16-deps}

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

### Docker {#laptop-setup-ubuntu-docker}

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.


### Duckietown Shell {#laptop-setup-ubuntu-16-shell}

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




@@ -0,0 +1,62 @@
# Duckietown account {#dt-account status=ready}

Assigned: Andrea Censi

This section describes how to register for the Duckietown account
and set up the authentication token.

<div class='requirements' markdown='1'>

Requires: Internet connection.

Requires: About 10 minutes.

Results: Duckietown token correctly set up.

</div>


## Sign up on the Duckietown website {#dt-account-register}

To register on the Duckietown website, go to:

> [`https://www.duckietown.org/site/register`](https://www.duckietown.org/site/register)

Note: If you are a student, please use your official student email address, so that you can be sorted in the right group.


## Find the Duckietown token {#dt-account-find-token}

The Duckietown Token allows to authenticate your devices to the Duckietown network.

The token is a string of letters and numbers that looks something like this:

dt1-7vEuJsaxeXXXXX-43dzqWFnWd8KBa1yev1g3UKnzVxZkkTbfSJnxzuJjWaANeMf4y6XSXBWTpJ7vWXXXX

To find your token, first login to duckietown.org, then open the page:

> [`https://www.duckietown.org/site/your-token`](https://www.duckietown.org/site/your-token)

## Tell the Duckietown Shell your token {#dt-account-set-token}

Use the command

laptop $ dts tok set

and follow the prompt.


Then the following command should work:

laptop $ dts challenges info

and give a similar output to:

You are succesfully authenticated.

name: ![Your name]
login: ![username]

uid: ![user ID]
@@ -51,6 +51,7 @@ If you are interested in obtaining `DB18-Robotarium` Duckiebots, or in building

## Duckiebot versions 2017, or `DB17` {#duckiebot-config-db17}


In the `DB17` version, we had several several different configurations.

The configurations are defined with a root: `DB17-`, indicating the "bare bones" Duckiebot used in the Fall 2017 synchronized course, and an appendix `y` which can be the union (in any order) of any or all of the elements of the optional hardware set $\aset{O} = \{$`w`, `j`, `d`, `p`, `l`, `c`$\}$.
@@ -73,5 +74,5 @@ The elements of $\aset{O}$ are labels identifying optional hardware that aids in
Note: During the Fall 2017 course, three Duckietown Engineering Co. branches (Zurich, Montreal, Chicago) are using these configuration naming conventions. Moreover, all institutions release hardware to their Engineers in training in two phases.
For information on acquiring the parts for these older configurations please see [`DB17-wjd`](http://docs.duckietown.org/17/opmanual_duckiebot/out/acquiring-parts-c0.html) or [`DB17-wjdlc`](http://docs.duckietown.org/17/opmanual_duckiebot/out/acquiring-parts-c1.html).
For information on acquiring the parts for these older configurations please see [`DB17-wjd`](https://docs.duckietown.org/DT17/opmanual_duckiebot/out/acquiring_parts_c0.html) or [`DB17-wjdlc`](https://docs.duckietown.org/DT17/opmanual_duckiebot/out/acquiring_parts_c1.html).

0 comments on commit a29a2fd

Please sign in to comment.
You can’t perform that action at this time.