Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Tower Tracker 1.0 (http://www.chiefdelphi.com/forums/showthread.php?t=142173)

FleventyFive 21-01-2016 15:49

Re: Tower Tracker 1.0
 
Also interested in running this on RoboRio and in C++. Anyone have any luck compiling a C++ WPIlib robot program with some opencv in it? If so, I'd love to hear how you did it.

akablack 21-01-2016 15:49

Re: Tower Tracker 1.0
 
Thanks for sharing that! How did you get the opencv libraries onto the roborio? I've been having some trouble with that

Ronso007 21-01-2016 15:56

Re: Tower Tracker 1.0
 
wow! Amazing!
I just wish that we had something like that in labview :/

kmckay 21-01-2016 17:29

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by jreneew2 (Post 1527829)
https://github.com/team2053tigertron...016/src/vision

Its a bit messy, and the algorithm is a bit different, but you can change it easily. Also, im getting resource initialized error after a while. It might be an array error.

Thanks! I will see what we can do and get back in touch with you for any improvements we can make.
Ideally, I'd love to see this processed on board with a raspberry pi or arduino board, but that's version 2.0 stuff.

Fauge7 21-01-2016 17:58

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by Ronso007 (Post 1527917)
wow! Amazing!
I just wish that we had something like that in labview :/

It works with labview! all you have to do is output to a network table, and from there you can get the values in labview.

Quantum Byte 21-01-2016 20:03

Re: Tower Tracker 1.0
 
Nicely done.

So how would you use this to get the values of the contours?

Lets say I want my robot to "auto" shoot when the contours are a specific dimension. Anyway I can do that with this ?

Thanks.

Fauge7 21-01-2016 22:02

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by Quantum Byte (Post 1528050)
Nicely done.

Lets say I want my robot to "auto" shoot when the contours are a specific dimension. Anyway I can do that with this ?

Thanks.

I will add in the network table features today since i finally got it to work (longer then expected)

essentially you need to find the amount that your shooter can be off (tolerance) while still "scoring", for instance it can make it anywhere from 6-8 feet from the goal. Then you need to make sure your robot keeps driving until it is somewhere between that tolerance and then it can start its fire sequence. I would recommend looking into a pid drive system for that, its a closed loop drive that would work nicely with this.

jreneew2 22-01-2016 06:43

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by FleventyFive (Post 1527913)
Also interested in running this on RoboRio and in C++. Anyone have any luck compiling a C++ WPIlib robot program with some opencv in it? If so, I'd love to hear how you did it.

Quote:

Originally Posted by akablack (Post 1527914)
Thanks for sharing that! How did you get the opencv libraries onto the roborio? I've been having some trouble with that

We followed 2168's vision example and there precompiled version worked fine for us. Any questions, just ask.

Greg McKaskle 22-01-2016 07:55

Re: Tower Tracker 1.0
 
Quote:

I just wish that we had something like that in labview :/
You might want to look at the Getting Started Window, Tutorials tab, say #8.

Greg McKaskle

TheGuyWhoCodes 23-01-2016 14:03

Re: Tower Tracker 1.0
 
When trying to run the program on the Jetson TK1, I get the error

Code:

java.lang.UnsatisfiedLinkError: no libopencv_java2410 in java.library.path
I did the install tutorial off of OpenCV's documentation. We have also verified that it has been working on a Windows machine. I think the reason might be that we don't have the correct *.so file inside of the working directory for OpenCV. Is there anybody that can upload the .so file to verify if that's the problem? The so file we are trying to find in the program is called libopencv_java248.so, and it's inside the directory /usr/lib/
Thank you!
-Chris

FleventyFive 24-01-2016 02:46

Re: Tower Tracker 1.0
 
In case anyone is still daring to try to do vision on the Rio, and wants to put it right in their normal C++ project, I was able to (finally) get opencv to build for ARM and integrate into a WPILib project. Been unable to test on a Rio so far, but at least it builds. Here's an example project with the special opencv build and a file (BuildOpenCV.txt) explaining how to set it up. Was a big PIA for me, so thought i'd leave notes on the steps I went through. You can just throw in your own source files into the project, but make sure to delete/comment out the line #define REAL in WPILib.h, as it creates some conflict of OPENCV. Okay it's 3 a.m I should go to sleep now.

FleventyFive 24-01-2016 02:52

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by akablack (Post 1527914)
Thanks for sharing that! How did you get the opencv libraries onto the roborio? I've been having some trouble with that

If you want more detailed build steps than the 2168 thing from last year, here's a 2016 project with a working (building, at least) opencv on C++ as well as instructions on how to set it up if you want to build it yourself (easiest on Ubuntu or similar) in the BuildOpenCV.txt file.

FleventyFive 24-01-2016 20:52

Re: Tower Tracker 1.0
 
Nevermind, I have no idea what I'm doing.

Fauge7 25-01-2016 00:26

Re: Tower Tracker 1.0
 
Quote:

Originally Posted by FleventyFive (Post 1529532)
Nevermind, I have no idea what I'm doing.

why are you trying to run it on a jetson or something else...

virtuald 25-01-2016 00:34

Re: Tower Tracker 1.0
 
FYI, anyone looking for a precompiled version of opencv 3.1 for the roboRIO, the robotpy project has had one available since before build season. Works with C++, Java, and Python 2/3 -- very easy to install the shared libraries on the roboRIO through our opkg repo.

https://github.com/robotpy/roborio-opencv


All times are GMT -5. The time now is 22:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi