Skip to content
CalebJ2 edited this page Aug 10, 2020 · 29 revisions

Development environment setup

  1. Install git or a git GUI client like SmartGit or SourceTree
  2. If you haven't already, clone this repository using the GUI or by running git clone --recurse-submodules https://gitlab.cs.wallawalla.edu/robotics-club/Rover.git
  3. Install VSCode
  4. Install some VSCode extensions. Get a list by opening the repository folder in VSCode, pressing f1, and running the Extensions: Show Recommended Extensions command. The most important is PlatformIO for VSCode. This is basically a different IDE for Arduino that has good command line support.
  5. Install docker. linux, windows
  6. Install docker compose
  7. Run and build everything with docker-compose up
  8. Start coding. See Development process

Rover PC Setup

  1. Install docker
  2. Install docker compose
  3. Install the GitLab runner
  4. Register the runner as a shell executor and give it the rover_remote tag. Get the url and token from the repository Settings > CI/CD > Runners page.
  5. Add gitlab-runner user to docker group with sudo usermod -aG docker gitlab-runner. See Building Docker images with GitLab.
  6. Install platformio on the GitLab runner account by running sudo su gitlab-runner && pip install -U platformio then restart the terminal to switch back to your normal user. Ideally all GitLab stuff should be done in Docker and changing that would be fairly straightforward.
  7. (Optional) Set up DNS forwarding to more easily access the robot's local ip
  8. (Optional) enable ssh to remotely access the PC
  9. (If the PC can't boot due to excessive current draw on startup) Change BIOS settings to limit max power consumption.
    • Advanced > Power and Performance > CPU - Power Management Control
      • Boot performance mode: Max battery (default: Max Non-Turbo Performance)
      • HDC Control > Turbo Mode: Disabled (default: Enabled)
      • HDC Control > CPU - Power Management Control > Configurable TDP boot mode: Down (default: Nominal)
      • (optional, this sets max average power draw in milliwatts for normal mode) HDC Control > CPU - Power Management Control > Config TDP Configurations > Power Limit 1: (default: 20000)
      • (optional, this sets max average power draw in milliwatts for turbo mode) HDC Control > CPU - Power Management Control > Config TDP Configurations > Power Limit 2: (default: 44000)

Local IP DNS forwarding

  1. Enable DNS for your domain and add the DNS record you want to be updated. namecheap's instructions
  2. Install ddclient sudo apt-get install ddclient -y
  3. Enter the configuration if you know it (namecheap's example). Guess if you don't know.
  4. Edit the configuration file sudo nano /etc/ddclient.conf. Edit most fields to match instructions from your dns provider, there are a lot of tutorials for this so I'll skip that. To make it use the local ip, the "use" line should be use if, if=wlp1s0 or similar. This makes check the wifi interface's ip instead of getting the public ip by asking some website. View available interfaces with the ifconfig command.
  5. Restart ddclient sudo /etc/init.d/ddclient restart
  6. Hopefully you should be able to access the website at your.domain.com:8080 or similar when you are on the same network.

Installing in Ubuntu (not docker)

It might be useful to install ROS etc. in a regular Ubuntu install.

  1. Install Ubuntu 18.04.2 LTS: https://www.ubuntu.com/download/desktop There are several ways to do this:
  2. Install git sudo apt install git
  3. Clone this repository git clone https://gitlab.cs.wallawalla.edu/robotics-club/Rover.git
  4. Run the installation script cd Rover && install.sh
  5. Go through the development environment setup section above

Troubleshooting

  • If docker gives an error like "Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection", try changing your DNS server to 8.8.8.8 and restarting.

Clone this wiki locally