Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Before embarking on this subteam bootcamp, please ensure you’ve completed the these instructions in: Bootcamper Onboarding .

This bootcamp is in effect starting 2023-09-06 . If you are doing the Autonomy bootcamp, you are at the right place!

...

  1. If you haven’t already, download and install Git: https://git-scm.com/

    1. Git should already be installed on Linux and MacOS.

  2. Windows (Linux and MacOS users skip step): Ensure core.autocrlf is set to true or input . Line endings on GitHub are LF only, not CRLF!Set line endings.

    1. Check: git config --get core.autocrlf

      1. If it is true or input , you do not need to set anything.

    2. Set: git config --global core.autocrlf [setting] .

      1. --global is optional, and replace [setting] with the desired setting (either true or input ).

      2. When in doubt, use input.

    3. Additional information here: https://www.git-scm.com/book/en/v2/Customizing-Git-Git-Configuration#_core_autocrlf

  3. Configure Git with your name and email: https://linuxize.com/post/how-to-configure-git-username-and-email/

    • --global if you want to use it as the default, otherwise it will just be for the current repository.

    • You can use your anonymous GitHub no-reply email.

  4. Go to GitHub and navigate to your copy of the repository, under your account. Do not go to WARG’s copy of the repository!

  5. Click on the green Code button.

  6. In the dropdown, you can copy either the HTTPS or SSH link.

    1. Windows and MacOS: Copy the HTTPS link (although you can copy the SSH link if you desire).

    2. Linux: Copy the SSH link.

      1. If you really want to use HTTPS on Linux, you have to install the Git Credential Manager or create a Personal Access Token on GitHub. How to do this is left as an exercise for the bootcamper.

  7. If you’re using the SSH link (HTTPS link users skip this):

    1. If you haven’t already, create a new SSH key and add it to your GitHub account:

      1. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

      2. https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account

  8. Pick a parent directory to clone into.

    1. Example: Cloning in C:\Users\Username\ will create a folder and then populate it: C:\Users\Username\autonomy-bootcamp-2023\[bootcamp stuff]

  9. Open the console in the parent directory.

    1. Windows: Command prompt or Powershell.

    2. Linux and MacOS: Terminal.

  10. Run: git clone [link you copied] , where [link you copied] is the link you copied in step 5.

    1. HTTPS link users: You will be prompted to log into your GitHub account. Do so.

  11. Done!

...

  1. If you haven’t already, download and install Python 3.8: https://www.python.org/

    1. If you already have Python 3.7 or below installed, you must install Python 3.8 (you do not need to uninstall the other version(s)). This is because of a package dependency which requires Python 3.8 or greater.

    2. If you have Python 3.9 or above installed, you’re probably fine. Probably. The bootcamp was designed and tested on Python 3.8 so use a different version at your own risk.

  2. Open the console in the repository root.

    1. Example: C:\Users\Username\autonomy-bootcamp-2023

  3. Create a virtual environment called venv by running: [python] -m venv venv/ , where [python] is Python 3.8 (e.g. python , python38 ).

    1. You can check which version of Python it is by running [python] --version .

    2. If you move the repository to a different path after creating a virtual environment, you will have to delete the venv directory and repeat this step.

    3. If you want to call the virtual environment by a different name, replace venv/ with the name you want. Virtual environments are identified by their path, so different projects with the same venv virtual environment name is fine.

      1. Example: C:\Users\Username\autonomy-bootcamp-2023\venv\ and C:\Users\Username\computer-vision-python\venv\ are different.

  4. Activate the virtual environment:

    1. Windows command prompt: venv\Scripts\activate.bat

    2. Windows Powershell: .\venv\Scripts\Activate.ps1

    3. Linux and MacOS: source venv/bin/activate

  5. You should now see (venv) in the prompt line.

  6. Confirm the virtual environment uses Python 3.8: python --version .

    1. Literally use python , none of the fancy stuff above.

    2. Example output: Python 3.8.10

  7. Open requirements.txt .

    1. MacOS: Remove +cu117 from both torch and torchvision .

    2. Windows and Linux:

      1. If you have a CUDA capable GPU but don’t want to use it for some reason, change +cu117 to +cpu for both torch and torchvision .

      2. If you don’t have a CUDA capable GPU, don’t change anything.

  8. Download and install required packages: pip install -r requirements.txt

    1. This will install in your virtual environment under venv . The rest of your system is unaffected.

  9. Done!

...

  • BOOTCAMPERS DO NOT MODIFY THIS FILE. : Do not modify this file! Your submission will not be accepted if these files are modified.

  • BOOTCAMPERS TO COMPLETE. : Search for BOOTCAMPERS MODIFY BELOW THIS COMMENT (there may be multiple) and follow the instructions.

Do not commit extra files! Your submission will not be accepted if you have extra files.

Do not import any additional libraries. The bootcamp is completable as is.

...

The current workaround is to hide the GPU: export CUDA_VISIBLE_DEVICES=-1

This is not ideal since you are removing a hardware advantage.

MobaXterm display issues:

...

Hi WARG Bootcamper,

Welcome to the team. I've taken the liberty of compiling some starter tasks to get you up to speed. They should be pretty easy to complete. Feel free to reach out if you have any questions.

Brian SJ. Smith, Ph.D.
Senior Manager, Software Development
AutoBots

...

Info

The documentation is wrong or missing?

Unfortunately, documentation is not guaranteed to be correct or complete. This is where using trial complete. The only reliable way to know how code behaves is to run it*. Trial and error is important to figure out what is really happening!

*Or to mathematically prove that the code will behave in a certain way using static analysis tools, but this is really hard (if you’re interested in why, search for Halting Problem and Gödel's Incompleteness Theorem).

Note

Hints:

  • You can use the debugger and set breakpoints to see the object and its attibutes returned by predict() .

  • A confidence threshold value of 0.7 works. Other values are also acceptable as long as it’s not too low or high.

  • Ultralytics documentation is slightly out of date, so some of the requested settings are not included. Try searching outside of the documentation!

  • Think about what you’re returning. Is it safe to assume that the code that will end up using your returned values has a check for None ? After all, the method signature promises to return a list of BoundingBox , not a list of BoundingBox | None .

...

Note

Hints:

  • You can write a helper function to calculate the distance between 2 Location objects. This will make the finding closest landing pad code easier to read and write.

  • You can initialize the distance value with a very large number (e.g. infinity). Then the first landing pad’s distance will definitely be smaller than this. Details of the loop and logic are for you to implement…

    • Don’t constantly recalculate the distances if you don’t need to.

  • What if the closest landing pad is directly on the waypoint? Your code needs to handle this case.

Note

Bonus:

  • Square roots are computationally expensive, is there a way to avoid using it?