Skip to content
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.

2729StormRobotics/StormCV2017

Repository files navigation

StormCV2017

Computer Vision code for the 2017 FRC season. This is a GRIP based vision system. We utilize the "Generate Code" feature in order to run python code on our Raspberry Pi 3.

Getting Started

If you wish to use our setup just clone this repo to your Raspberry Pi

git clone https://github.com/2729StormRobotics/StormCV2017.git

Project Structure

  • Base directory: start-mjg-streamer.sh streams video to port 1181.
  • /GRIP-CodeGeneration: Vision processing code. run_cv.py is changed manually for desired calcuations.
  • /GRIP-CodeGeneration: All other .py files are generated by GRIP tools > GenerateCode.

Prerequisites

We use Python 3 and OpenCV3 on our Raspberry Pi 3. Python is super easy to install...

sudo apt-get install python3

OpenCV3 is a bit more of a pain.

Also on a windows computer you will need Eclipse with the wpilib plugins

Lastly you'll need to install all the other packages we use from pip which are stored inside our requirements.txt

pip install -r requirements.txt

Please feel free to browse the file for a list of the pip dependencies we use

Running the Code

Assuming you've gotten all the installs running the code is fairly straightforward

  • Connect both the pi and Windows machine to the same network
  • On eclipse press WPIlib>RunOutlineViewer>StartServer
  • Run the python code in the StormCV2017/GRIP-CodeGeneration directory
python3 run_cy.py

Acknowledgments

We learned how to run our generated GRIP code from WPILibs.