Skip to content

Commit

Permalink
fixed laptop software tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-qcd-qk committed Sep 10, 2020
1 parent 5af4913 commit 95ec3a6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Getting a Ubuntu Environment {#USB-ubuntu status=ready}
# Getting a Ubuntu Environment {#USB-ubuntu status=beta}

This page instructs you how to get a Ubuntu Environment that is installed on a USB stick.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ For previous year's instructions, see [here](https://docs.duckietown.org/DT17/).

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

Requires: A Duckiebot in configuration `DB18`
Requires: A Duckiebot in configuration `DB18` or above.

Requires: A laptop with free disk space.
Requires: A Ubuntu 18.04 or 20.04 environment with free disk space.

Requires: Internet connection.

Expand All @@ -18,9 +18,6 @@ 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:
Expand All @@ -29,53 +26,65 @@ These installation steps make sure that you have a minimal "sane" environment, w
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.

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 in 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.
Sometimes when running a VMware machine in 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](https://wiki.ros.org/ROS/NetworkSetup)


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

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

Install Ubuntu 18.
Install Ubuntu 18 or 20.

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, curl, wget:
Installs pip3, git, git-lfs, curl, wget:

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

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

Install Docker by following the instructions [here][docker_install].

[docker_install]:https://docs.docker.com/install/linux/docker-ce/ubuntu/
[docker_install]: https://docs.docker.com/install/linux/docker-ce/ubuntu/

Adds user to "docker" group:

laptop $ sudo adduser `whoami` docker

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

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

Make sure you have docker-compose installed:

laptop $ sudo apt-get install docker-compose

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

Follow the instructions in [repo README][shell_install].
Note: If you are not using Ubuntu environment and you would like to install Duckietown Shell, you should refer [HERE](https://github.com/duckietown/duckietown-shell)

Install Duckietown shell command by using the following command:

[shell_install]:https://github.com/duckietown/duckietown-shell
laptop $ pip3 install --no-cache-dir --user -U duckietown-shell

After you have completed the above step, you will need to _log out and in_ for the shell command to take effect.

You can verify the command install by typing:

laptop $ which dts

and it should output something like `/home/USER/.local/bin/dts`.

### Other suggested configuration

Expand Down Expand Up @@ -106,7 +115,6 @@ Also add the line:

. ~/.profile


#### Passwordless sudo

To add passwordless sudo:
Expand All @@ -123,7 +131,6 @@ into

### Other packages useful for development


$ sudo apt install iotop atop htop

### For virtual machines
Expand All @@ -132,12 +139,9 @@ For VMWare, install this:

laptop $ sudo apt install open-vm-tools



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


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

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

Expand All @@ -149,34 +153,27 @@ 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. 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
Note: You may also need to add `/usr/X11/bin` to your system path in order for it to find `xhost`.

Note: 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.


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

Follow [these instructions](https://docs.docker.com/docker-for-mac/install/)
Expand All @@ -185,8 +182,6 @@ Follow [these instructions](https://docs.docker.com/docker-for-mac/install/)

Follow [these instructions](https://github.com/duckietown/duckietown-shell)



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

Note: It is suggested to use Ubuntu 18.
Expand All @@ -199,8 +194,7 @@ 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.

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

Expand All @@ -216,8 +210,7 @@ Installs pip, git, git-lfs, docker, duckietown-shell:
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.

Note: you need to _log in and out_ to have the group change take effect.

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

Expand All @@ -231,7 +224,6 @@ Edit the file `~/.profile` and add the line:

Note: do not use `sudo pip` to install the Duckietown Shell.


Log out and in. This command should succeed:

laptop $ dts version

0 comments on commit 95ec3a6

Please sign in to comment.