Git Product home page Git Product logo

houndeye-2022's Introduction

houndeye

OpenCV and OpenNI gamepiece detection code to be used on the 2022 robot.

Features NetworkTables integration to send various datapoints to driver's station and robot.

Won Innovation in Control Award at the FIRST Indiana District Kokomo Event.

Won Autonomous Award at the FIRST Indiana District Tippecanoe Event.

Contributing

Dependencies

Dependencies are in requirements.txt. Commands to install these:

Windows: py -3 -m pip install -r requirements.txt (while working directory is set to project directory)

macOS/Linux: pip3 install -r requirements.txt (while working directory is set to project directory)

It is highly recommended to install dependencies in a virtual environment. If you need help creating this, refer to the Python documentation.

On macOS, make sure you install Python 3 separately and do not use the system install (package installation will fail when not run as root).

In order to use this project with an Astra camera, you must have Orbbec's flavor of OpenNI installed. See Orbbec's develop page and move all the way to the bottom to install their Orbbec OpenNI SDK. Follow the instructions in the README for your system.

Constants and Config

Do not commit changes to the constants.json file. These values have been calibrated for individual cameras and game pieces and need not be changed. You may, however, change the command-line args that you use to change the project's function (i.e. switching to your computer's webcam instead of using the Astra, disabling NetworkTables when not connected to a robot/testbench, or enabling a video feed).

Code Quality and Standards

Refer to the TechHOUNDS coding style guide. Although this is for Java, there is still valuable information for other languages. If your question is not answered by that, use the Google style guide for Python. Documentation is expected for all modules, classes, and functions, and all functions should be type-hinted. For all difficult to understand code, either simplify it or add comments.

Note: for consistency's sake, whenever using both blue and red detection in the same function the order for params and return vars should be blue, red.

scripts Folder

If setting this repository up on any new Raspberry Pi, copy the contents of the scripts folder to /home/pi. This is necessary because static IP addressing based on SSID doesn't work when connected via Ethernet, so we have to manually enable and disable static IP addressing when we want to connect to a different network like CCS. Run sudo ./enable_static.sh to enable static IP addressing (on the robot network, usually), and run sudo ./disable_static.sh to disable static IP addressing (on CCS, or any Internet-connected network).

houndeye-2022's People

Contributors

augustinsanchez18 avatar nv2221 avatar superpenguin612 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

adam98765

houndeye-2022's Issues

Auto calibration

Low priority issue, but I could theoretically implement some features that make it easier to calibrate the constants, by asking a user to click on a ball to center the HSV values on it.

Web Interface

Create a web interface for the project! VNC'ing into the Pi to perform diagnostics, debug, and calibration is kind of annoying, so it'd be great if we could run a web server off of the Pi to make things easier. This would also make auto calibration (#11) much easier.

Reorganize repository

Reorganize and rewrite certain files to allow the repository to be extended in the future. In it's current state (as of 2816765), the repository is an example of patchwork of various functions that just happens to work :). This will be done by the end of this week, most likely sooner, though.

Robot state change based on ball distance

Trigger state change (motor spinning) on a testbench when Astra camera detects a ball within a certain range. Also benchmark running Python process on Roborio or on driver's station computer.

CascadeClassifier + ML

Next year's game piece may not (read: likely will not) be a sphere of uniform color, so we need to explore other solutions for detecting non-standard objects.

Error handling + Graceful shutdowns

Add error handling (especially for network traffic) and graceful shutdown in case something goes wrong. Also make it easier to connect to a client, and allow for an easy way to start the process on the Raspberry Pi.

Multithreaded networking

Lower priority, but may dramatically increase the resolution we can send to the driver’s station. The FPS of the stream is currently degraded because our current method of sending data is blocking; that is, execution stops until the photo data is successfully packaged and sent.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.