/learn

Programming learning resources

Primary LanguageJupyter NotebookGNU General Public License v3.0GPL-3.0

Programming team learning resources

Resources for team members wanting to learn to program our bot, vision subsystem, LEDs, and more.

Tools

The tools we use for programming are:

  • Visual Studio Code — Microsoft's free, open source code editor is now the preferred programming tool for FIRST teams. We will be using it in the 2018-2019 season
  • GitHub — We store all our source code in GitHub. This makes it easily available to every member. Plus, by publishing it with an open source license, by FIRST rules we can re-use code as well as use code published by other teams.

GitHub

Visual Studio Code

Programming languages

We use:

  • Java — to program the bot
    • WPLib — is a Java add-on library that we use to control the bot
  • Python — for computer vision, target identification, etc.
    • OpenCV — is a library for image processing, computer vision, etc. which is available for Python (and other languages)
  • Arduino/C++ — for controlling the LED "blinkies"

Java

Java is the primary programming language we use for controlling the bot.

WPILib

Wooster Polytechnic provides the primary robot control library.

Python

Python is what we use on the Jetson / Raspberry Pi for computer vision, target identification, etc.

Installing Python

We use python 3.x (not the older v2.7 that comes installed on some systems). Make sure you install and use the correct version.

The easiest, perhaps best way to get a good python installation with all the tools you need is to install Anaconda.

(For a non-Anaconda way to install python, see https://www.python.org/)

Anaconda includes a couple of tools that will make writing python apps convenient:

  • Jupyter Notebooks - offers you a way to write and run python code in a browser window and see the output in that window. You can then share your resulting project as a runnable "notebook" for others to use.
  • Visual Studio Code - you can optionally install VSCode as part of Anaconda, pre-configured to work with Python projects
Learning Python

OpenCV

OpenCV is a great open source computer vision library. It is a big and complex library that can be hard to navigate. There are OpenCV versions for Python, C/C++, Java & Android, and iOS.

We suggest you wait to explore OpenCV until you have a good feel for programming in Python.

Some learning resources:

Arduino / C++

For our LED strips, we use an Arduino controller and the C++ programming language.

  • Our LED repo covers the basics of how our LEDs and Arduino are setup as well as the code we've used in the past
  • Adafruit's tutorials Adafruit is a supplier of Arduino boards, compatibles, and components. They offer a good selection of tutorials

Looking ahead

RobotPy

RobotPy WPILib is a set of libraries that are used on your roboRIO to enable you to use Python as your main programming language for FIRST Robotics robot development. It includes support for almost all components that are supported by WPILib’s Java implementation. We are not currently using this, but are considering it so that we can focus on a single programming language for almost everything we do.