From 592b000006d1686df208381342927873a4f93cb7 Mon Sep 17 00:00:00 2001 From: Russell Buchanan Date: Wed, 17 Oct 2018 09:58:30 +0200 Subject: [PATCH] Adds Linux preliminaries (#86) * Adds content for linux prelim and warning about power * Adds warning about shuting down duckiebot too early. Also formatting --- .../atoms_05_part_preliminaries/10_linux.md | 42 ++++++++++++++++++- .../atoms_05_part_preliminaries/40_ssh.md | 2 +- .../1_0_20_duckiebot_initialization-db18.md | 9 ++-- .../2_0_5_make_it_move.md | 2 +- .../2_0_6_camera_data.md | 11 +---- .../2_2_2_camera_calibration.md | 4 +- .../50_camera_trouble.md | 10 +++-- 7 files changed, 59 insertions(+), 21 deletions(-) diff --git a/book/opmanual_duckiebot/atoms_05_part_preliminaries/10_linux.md b/book/opmanual_duckiebot/atoms_05_part_preliminaries/10_linux.md index 8d9f883..1c1e6f2 100644 --- a/book/opmanual_duckiebot/atoms_05_part_preliminaries/10_linux.md +++ b/book/opmanual_duckiebot/atoms_05_part_preliminaries/10_linux.md @@ -1,4 +1,44 @@ # Linux basics {#preliminaries-linus status=draft} -Assigned: OPEN +Assigned: Russell Buchanan +Linux is a group of free and open-source software operating systems built around the Linux kernel first released in 1991. Typically, Linux is packaged in a form known as a Linux distribution such as Fedora or Ubuntu (the latter one is what we use in this course). + + +## Ubuntu + +As of this writing the most recent version of Ubuntu is 18.04 LTS (Long Term Service) which will be supported until April 2023. However it is still very new so we recomend installing Ubuntu 16.04 LTS which will be supported until April 2021. + + +## Installation + +It is highly recomended to install Ubuntu directly on your laptop or as a dual boot operating system alongside your exisiting OS. However we also provide some guidance on installing Ubuntu within a Virtual Enviornment on your laptop. + +### Dual Boot + +* First you need to download a .iso image file which contains the version of Ubuntu you want. Here is [16.04 LTS](http://releases.ubuntu.com/16.04/) make sure to download the desktop image. +* Next, you need a free USB drive with at least 2GB of space. The drive will be completely written over. +* You need some software to write the .iso to the USB. If on Windows you can use [Rufus](https://rufus.ie/) +* Create the bootable USB drive, disconnect the USB then reconnect to your computer. +* Restart your computer + - If your computer simply boots into the existing operating system you need to change the boot order in your BIOS. + - Restart your computer again and press the button during startup which lets you into the BIOS. It may say on your computer what this button is but you may need to Google depending on your laptop model. For example Lenovo might be F1 or F2. + - Look for an option to change boot order and put priority on your USB drive. +* Your computer should now boot into Ubuntu installation and you can follow the instructions for dual boot. + +### Virtual Machine + +* First you need to download a .iso image file which contains the version of Ubuntu you want. Here is [16.04 LTS](http://releases.ubuntu.com/16.04/) make sure to download the desktop image. +* Download you desired Virtual Machine such as Virtual Box + +## Tutorial + +[The Alternative](https://thealternative.ch/index.php?view=linuxdays) is a student club at ETHZ which has several tutorials on using Linux. + +## Terminal + +Some pointers: + +* Open a terminal with Ctrl + Alt + T +* `/` is the top level root directoy which contains your +* `~` refers to your home folder located in `/home/![username]` \ No newline at end of file diff --git a/book/opmanual_duckiebot/atoms_05_part_preliminaries/40_ssh.md b/book/opmanual_duckiebot/atoms_05_part_preliminaries/40_ssh.md index 9fc4bc4..fe5257d 100644 --- a/book/opmanual_duckiebot/atoms_05_part_preliminaries/40_ssh.md +++ b/book/opmanual_duckiebot/atoms_05_part_preliminaries/40_ssh.md @@ -1,4 +1,4 @@ -# Secure Shell {#preliminaries-secure-shell status=draft} +# Secure Shell (SSH) {#preliminaries-secure-shell status=draft} Assigned: OPEN diff --git a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/1_0_20_duckiebot_initialization-db18.md b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/1_0_20_duckiebot_initialization-db18.md index 5dc4a44..099722d 100644 --- a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/1_0_20_duckiebot_initialization-db18.md +++ b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/1_0_20_duckiebot_initialization-db18.md @@ -46,17 +46,19 @@ If you plan on connecting with the Duckiebot over different networks (e.g. at ho laptop $ dts init_sd_card --wifi duckietown:quackquack,myhomenetwork:myhomepassword,myuninetwork:myunipassword -If you want to add additional networks later and you have to edit the `/etc/wpa_supplicant/wpa_supplicant.conf` file in the `root` drive. - If you are using a 16GB SD card, also add the `--compress` option. +Make sure to set your country correctly with the `--country` option. (Ex. CA for Canada, CH for Switzerland) + +If you want to add additional networks later and you have to edit the `/etc/wpa_supplicant/wpa_supplicant.conf` file in the `root` drive. + Note: \[For ETH Zurich students only\] To connect to the netoworks on campus use the `--ethz-username` and `--ethz-password` options. Keep in mind that the ETH network prevents hostname resolution so, in general, you won't be able to connect to yout Duckiebot despite it being connected to the internet. After you run the `dts init_sd_card` command with your options follow the instructions that appear on screen: - You will then have to enter your laptop's `sudo` password to run Etcher. -- Select the drive at `/dev/mmcblk0` by pressing Enter. +- Select the drive with the correct size (usually `/dev/mmcblk0`) by pressing Enter. - When asked "Are you sure?" select y. @@ -131,6 +133,7 @@ After this you will be prompted for your password every time you connect to your ## Rebooting the PI {#setup-duckiebot-reboot} +Warning: Do not test these commands now if you just booted up your duckiebot for the first time. It is likely not finished initializing and shutting down the duckiebot or disconnecting its internet access could interrupt the process and require you to re-flash the SD card. To reboot: diff --git a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_5_make_it_move.md b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_5_make_it_move.md index e9beb2f..c8aa283 100644 --- a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_5_make_it_move.md +++ b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_5_make_it_move.md @@ -93,7 +93,7 @@ The following keys are supported: Run the base image on the duckiebot: - duckiebot $ docker -H ![hostname].local run -it --net host --privileged --name base duckietown/rpi-duckiebot-base:master18 /bin/bash + laptop $ docker -H ![hostname].local run -it --net host --privileged --name base duckietown/rpi-duckiebot-base:master18 /bin/bash Then when the container has started diff --git a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_6_camera_data.md b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_6_camera_data.md index e53b73c..d2e2089 100644 --- a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_6_camera_data.md +++ b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_0_6_camera_data.md @@ -12,14 +12,10 @@ Requires: You have configured Docker communication as documented in [](#docker-s ## Check the camera hardware -It might be useful to do a quick camera hardware check. - -See: The procedure is documented in [](#howto-mount-camera). +It might be useful to do a quick camera hardware check as documented in [](#howto-mount-camera). ## Viewing a Single Image - - These commands assume that you have completed the steps in [](#docker-setup), and in particular that you set `DOCKER_HOST` correctly and can use `docker ps` successfully. @@ -34,14 +30,11 @@ Then point your browser to the address and verify that it is the output from your camera. -If the image is all black, check that you have removed the lens cap. - - Now stop the `picam` container: laptop $ docker -H ![hostname].local stop picam - +warning The `picam` container is just for this example to verify your camera works. You should leave this container stopped if you plan to use the camera in other containers. ## Viewing an Image Stream on Your Laptop diff --git a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_2_2_camera_calibration.md b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_2_2_camera_calibration.md index 00d5222..dca8b13 100644 --- a/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_2_2_camera_calibration.md +++ b/book/opmanual_duckiebot/atoms_17_operation_manual_duckiebot/2_2_2_camera_calibration.md @@ -174,9 +174,9 @@ Arrange the Duckiebot and checkerboard according to [](#fig:extrinsic_setup2). N ### Docker -If you ran +If you ran: - laptop $ dts calibrate ![hostname] + laptop $ dts calibrate ![hostname] then the same terminal will immediately take you into the extrinsic calibration step. After the following Setup step, push Enter. diff --git a/book/opmanual_duckiebot/atoms_18_setup_troubleshooting/50_camera_trouble.md b/book/opmanual_duckiebot/atoms_18_setup_troubleshooting/50_camera_trouble.md index 8ec95ea..e4cfd23 100644 --- a/book/opmanual_duckiebot/atoms_18_setup_troubleshooting/50_camera_trouble.md +++ b/book/opmanual_duckiebot/atoms_18_setup_troubleshooting/50_camera_trouble.md @@ -1,20 +1,22 @@ # Camera troubleshooting {#setup-troubleshooting-camera status=draft} -Assigned: Russell +Assigned: Russell Buchanan ## Cannot see image.jpg in web browser -### Go to your Portainer.io and make sure the picam container is running +### Resolution: make sure the picam container is running You can run with: laptop $ docker -H ![hostname].local run -d --name picam --device /dev/vchiq -v /data:/data duckietown/rpi-docker-python-picamera:master18 -### Make sure dt18_01_health_stats_rpi-simple-server_1 container is running. +### Resolution: make sure dt18_01_health_stats_rpi-simple-server_1 container is running. If it's not running something went wrong with your initialization. Try: laptop $ docker -H ![hostname].local run -dit --privileged --name dt18_01_health_stats_rpi-simple-server_1 --net host --restart unless-stopped duckietown/rpi-simple-server:master18 -### Remove the battery pack and check the camera cable for damage. +However you likely either shutdown or disconnected it from the internet during initialization. The only fix is to re-flash the SD card. + +### Resolution: remove the battery pack and check the camera cable for damage. Some people bent the cable too much breaking it. ## You see a black image like this: