Skip to content

ftcteam7060/RobotixVisionStatement

Repository files navigation

FTC-Sees!

FTC Vision Library Build Status

Computer Vision library for FTC based on OpenCV, featuring beacon color and position detection, as well as an easy-to-use VisionOpMode format and many additional detection features planned in the future.

Installing from Scratch

  1. Clone FTCVision into a clean directory (outside your robot controller app) using the following command: git clone --depth=1 https://github.com/lasarobotics/ftcvision.
  2. Open the FTCVision project using Android Studio
  3. Copy your OpModes from your robot controller directory into the appropriate directory within ftc-robotcontroller. Then, modify the FtcOpModeRegister appropriately to add your custom OpModes.
  4. Before running the app for the first time, install the "OpenCV Manager" from the Google Play Store to enable Vision processing.
  5. Run and test the code! Let us know if you encounter any difficulties.
  6. You can now write your own VisionOpMode!

Installing into Existing Project

  • Clone FTCVision into a clean directory (outside your robot controller app) using the following command: git clone --depth=1 https://github.com/lasarobotics/ftcvision.
  • Navigate to the FTCVision directory that you just cloned and copy the ftc-visionlib and opencv-java folders into your existing robot controller app.
  • Open your robot controller app in Android Studio. Make sure you have the Project mode selected in the project browser window (so you can see all of the files in your project).
  • Find your settings.gradle file and append the following two lines:
include ':opencv-java'
include ':ftc-visionlib'
  • Find the AndroidManifest.xml under your ftc-robotcontroller folder, sometimes named sample or similar.
  • Insert the following uses-permission tag in the appropriate location (look at the rest of the file for context).
<uses-permission android:name="android.permission.CAMERA" android:required="true" />
  • Find your build.gradle in the parent folder of AndroidManifest.xml and insert the following line under dependencies:
compile project(':ftc-visionlib')
compile project(':opencv-java')
  • Update Gradle configuration by pressing the green "Sync Project with Gradle Files" button in the header (this may take a minute)
  • Copy in Vision opmodes (those that end in VisionSample.java, located in [vision-root]/ftc-robotcontroller/src/main/java/com/qualcomm/ftcrobotcontroller/opmodes) from the FTCVision directory into your opmode directory.
  • Before running the app for the first time, install the "OpenCV Manager" from the Google Play Store to enable Vision processing.
  • Run and test the code! Let us know if you encounter any difficulties.
  • You can now write your custom VisionOpMode!

Status

This library is currently under insanely active development. We're in the Beta phase right now. If you have any questions or would like to help, send a note to smo-key (contact info on profile). Thank you!

Accuracy Test

A test from 8 feet away

Distance Test

A test from 8 feet away

Goals

  • Locate the lit target (the thing with two buttons) within the camera viewfield
  • Move the robot to the lit target, while identifying the color status of the target
  • Locate the button of the target color and activate it

Progress

  • Beacon located successfully in multiple environments. Now, we are tuning detection so that it is (virtually) fail- and competition-proof.
  • A competition-proof OpMode scheme created so that the robot controller does not need to be modified to use the app.
  • Now supports nearly every phone since Android 4.2, including both the ZTE Speed and Moto G.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages