![]() |
Tower Tracker 1.0
Team 3019 graciously presents their vision tracking program for everybody to use and borrow! Now instead of dreaming about the perils of computer vision YOU can bring your team the joy of having a robot that is capable of tracking the target with ease! No more Grip crashes or weird deploys, can calculate fun things such as: distance to target, and angle to target! to be used to auto align and auto aim!
if you are going to modify the code, all i ask is give me and my team credit in a comment at the top of the code and comment your suggestions and or your praise! to install:
the code is just an example of what it can do, i can add network table stuff soon but i thought i would publish it first! github link want to see an example of what it can output? here you go! how it works: using an axis camera or a mjpeg streamer you can use a stream of a webcam to process images using an opencv program that runs on the driver station computer. This program can be modified to run on a coprocessor and directly input to the roborio for even better results because network tables can only go at 10hz vs the camera stream which is 30hz...this program can easily be ported over to c++ and python and would probably run better with those as c++ and python are way more supported then java with opencv. |
Re: Tower Tracker 1.0
Thank you!
We're looking at non-vision tracking options this year since the retro-tape is so high up. But we'll take a look at this code, too. |
Re: Tower Tracker 1.0
WOW! Awesome work! One question, Can this be deployed to run on the roborio ?
|
Re: Tower Tracker 1.0
Where do I install the Network Table 3.0 jar
|
Re: Tower Tracker 1.0
Quote:
Quote:
When you export the .jar file put it in a folder that looks similar to this where opencv_java310.dll could be opencv_java310.so for linux |
Re: Tower Tracker 1.0
Could this run on a C.H.IP computer?
|
Re: Tower Tracker 1.0
Quote:
|
Re: Tower Tracker 1.0
Quote:
Thank you for this code, I have ported it to c++. I am running it on a separate thread, but just with a static image for now. |
Re: Tower Tracker 1.0
Quote:
|
Re: Tower Tracker 1.0
Thank you so much for making your java vision tracking solution public. For our team vision tracking seemed extremely daunting but this made it a realistic task.
I am trying to run the jar but I get a couple of errors. I may have added the network table user library incorrectly. The steps I took are as follows: I made a new java project, added the user library for opencv following this tutorial: http://docs.opencv.org/2.4/doc/tutor...a_eclipse.html. Then I added the network table user library from this directory: C:\Users\Curtis Johnston\wpilib\java\current\lib. When I try to run the executable jar from command prompt I get the following errors. Code:
platform: /Windows/amd64/ |
Re: Tower Tracker 1.0
Quote:
Again, thank you for this code, it is very helpful. |
Re: Tower Tracker 1.0
Quote:
|
Re: Tower Tracker 1.0
Quote:
the specific file you want is the edu.wpi.first.wpilib.networktables.cpp:NetworkTabl es:3.0.0-SNAPSHOT there it has the instructions for downloading the newest .jar file for the network tables...I made the same mistake when making this |
Re: Tower Tracker 1.0
The roboRIO has two cores and a modern linux scheduler. All processes and threads will be assigned to a processor core based on priority and history of execution. The default robot code doesn't use the entire roboRIO to execute, and in fact can be made much lighter and efficient if that is what the team chooses to do.
It is quite easy to consume an entire core on any computer by writing one loop without a wait or delay of some sort. At that point, you can add more cores or fix the problem. There are intentionally many ways to approach the vision processing challenge, and the tradeoffs are as team-based as technical. I fully expect to see awesome processing based on the DB laptop, based on coprocessors, and based on just the roboRIO. None of these are, in my opinion, a bad approach. And of course there are teams who will solve the challenge with no camera at all. By the way, the DS shows you the CPU trace of the roboRIO in realtime. Just click on the second or third tab on the right side. This info is also logged and can be reviewed using the Log File Viewer after a practice or a match. If the robot feels sluggish, you can try to identify if it was because you maxed the CPU or something else. Greg McKaskle |
Re: Tower Tracker 1.0
Quote:
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. |
| All times are GMT -5. The time now is 00:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi