lasarobotics / ftcvision Goto Github PK
View Code? Open in Web Editor NEWComputer Vision library for FIRST Tech Challenge
License: MIT License
Computer Vision library for FIRST Tech Challenge
License: MIT License
Homu appears to be hanging, preventing any checks from passing, so could someone temporarily disable it?
When I switch from extending LinearOpMode to VisionOpMode my control loops for driving the robot get stuck. Is there a way I can call the vision processing from a program in LinearOpMode or is there a way I can control the robot from VisionOpMode?
Thank you!
Well, here's our first OpenCV-related bug.
When drawing ellipses using Imgproc.ellipse()
, weird things happen such as the ellipse color is incorrect or only part of the ellipse is drawn. Conclusion: Imgproc.ellipse()
has a few bugs that OpenCV would take a while to correct. So we have a few options:
Option 1: Revert to OpenCV 2.4.11
So this option is safe, but we will lose the support to build OpenCV on any 64-bit phone (which means that ONLY the Moto G and the ZTE could be used for development. The chance that you have a 32-bit phone today is quite small.
Option 2: Using JNI, write our own C++ code to fix the issue and require downloading our own APK from the Google Store to use Vision
This option is pretty straightforward, but we will have to put in a lot of work to create the OpenCV Manager-like Play Store package that users can just download in addition to the OpenCV Manager.
Option 3: Using JNI, require every user to build the additional fix code from scratch
No. This is severely complicated.
@smo-key are you able to disable status checking? Travis CI appears to be down, and it's preventing any PRs.
Since there were some performance improvements in 3.1.0 (see https://github.com/opencv/opencv/wiki/ChangeLog), it would be nice if OpenCV were updated to 3.1.0. This was attempted at some point, but according to the commit message, it segfaulted. Maybe after #105 is merged, it should be tried again?
I saw you guys had an issue already about this, but we need to detect color after the beacon was pressed. Can you help us try to find a solution to this problem?
Team 7856
Blood, Sweat, & Gears
First thank you for this library. Our team based our opmode off of the LinearVisionSample provided. Everything is mostly working great and I may be missing something but is it possible to detect if the beacon is all red or all blue after a button press to verify the right button was pressed? Currently I still get either red/blue or blue/red even when it is a solid color.
Thanks for your help.
Chad Hartman
Team 9087
After installing FTCVision into a project based on the newest version of ftc_app, using vision in an OpMode gives the following error:
03-26 21:04:30.005 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: Event loop threw an exception
03-26 21:04:30.005 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.lang.NullPointerException: Attempt to read from field 'android.content.Context com.qualcomm.robotcore.hardware.HardwareMap.appContext' on a null object reference
03-26 21:04:30.006 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: org.lasarobotics.vision.opmode.VisionOpModeCore.<init>(VisionOpModeCore.java:30)
03-26 21:04:30.006 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: org.lasarobotics.vision.opmode.VisionOpMode.<init>(VisionOpMode.java:32)
03-26 21:04:30.007 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.ftcrobotcontroller.opmodes.BasicVisionSample.<init>(BasicVisionSample.java:44)
03-26 21:04:30.007 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.lang.reflect.Constructor.newInstance(Native Method)
03-26 21:04:30.007 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.lang.Class.newInstance(Class.java:1572)
03-26 21:04:30.007 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.robotcore.eventloop.opmode.OpModeManager.a(SourceFile:234)
03-26 21:04:30.008 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.robotcore.eventloop.opmode.OpModeManager.runActiveOpMode(SourceFile:175)
03-26 21:04:30.008 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.ftccommon.FtcEventLoop.loop(SourceFile:165)
03-26 21:04:30.008 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.robotcore.eventloop.EventLoopManager$b$1.run(SourceFile:379)
03-26 21:04:30.008 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.robotcore.util.ThreadPool.logThreadLifeCycle(SourceFile:252)
03-26 21:04:30.009 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: com.qualcomm.robotcore.eventloop.EventLoopManager$b.run(SourceFile:330)
03-26 21:04:30.009 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-26 21:04:30.009 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-26 21:04:30.010 10180-23317/com.qualcomm.ftcrobotcontroller E/RobotCore: java.lang.Thread.run(Thread.java:818)
hey, I am from team 8271 and I think what you guys did was awesome, however when I declare a linearopmode the robot controller will crash, be aware the program still runs however the app its self crashes soon afterwards. Thanks!
Training the HAAR cascades is a much more involved process than I had previously anticipated. Generating the classifier with only 10 positive and 20 negative samples is taking around twenty minutes for only four stages on my machine. Using cascade is certainly still an option, but it's going to take a while to get a decent classifier working. If anyone has a more powerful machine, which could be brought in or that we could remotely access to train these, leave a comment below.
FTCVision will remain an active library for the new game, but we need YOUR help. Teams willing to learn how FTCVision works and willing to help build the next version, let me know at [email protected] or reply to this thread! As the founders of this library (@ehsanmasdar and myself) no longer have access to a game field, it is up to a _collective_ of teams to develop code specific to the new challenge.
Teams wishing to use the library as-is for the 2016-2017 game that already have experience can use it immediately. Simply create a new ManualVisionOpMode
tailored to your specific needs. As always, documentation is available at http://ftcvision.lasarobotics.org/ and examples present here and here. The entirety of OpenCV is available to you so please learn about it on their website!
Good luck, teams!
@smo-key
Hello there, do you mind expanding on the documentation a little, i.e. adding examples to your classes, or giving example cases on how this would be used? I would be very appeciative of this.
We should probably correct for screen rotation. Depending on what resolution camera you have, the screen orientation may need to be changed. Also, if you use an app to force an unlock of the screen rotation, then as you rotate the screen, the rotation of the drawn image should be correct.
Anyone want to help with this?
When using LinearVisionSample with the latest version of the sdk we get an error that reads, " Error: User code threw an uncaught exception: RuntimeException - Can't create handler inside thread that has not called Looper.prepare();"
It appears that I may have inadvertently disabled Homu on this repository while trying to find the source of the problems with the status checking (the Travis-CI backend was just down, everything's fine now). For some reason I was able to do that, but seen unable to re-enable it. Could someone with administrative rights do so? Sorry about that.
After installing using Git submodule into the latest FTC SDK, there were multiple compilation errors, After removing the annotations in Eclipse.java IIRC (they shouldn't be mandatory, they are marker annotations), the project compiled. I pushed it onto the phone, but as soon as I chose the sample opmode (all of them had the same issue) and pressed INIT, the RobotController crashed. The error logs are nearly indecipherable, saying something about internal issues (coming from robotcore).
There are some old branches that should be deleted, e.g. feature-distance
, feature-distance2
, and feature-distance3
, which were replaced by feature-distance5
.
How do I view the CV debug screen as shown here? How is this enabled in ManualVisionSample?
Thanks for such an awesome library!
The application will crash straight after starting the LinearVisionSample and other sample opmodes. An error "Opencv was not initialized correctly. Application will be shutdown" is shown and the app will crash. I have already installed the opencv manager on the phone.
So recently I have seen an issue that many others have in the new SDK. Whenever an OpMode is initialized, the robot controller keeps crashing. However I think I found the issue, but dont exactly now why its causing an error. It seems to be in the telemetry in line 257 in https://github.com/lasarobotics/FTCVision/blob/master/ftc-visionlib/src/main/java/org/lasarobotics/vision/opmode/VisionOpModeCore.java#L257. Commenting this line out fixes the problem, but can anyone figure out why this occurs.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.