View Single Post
  #23   Spotlight this post!  
Unread 14-10-2014, 02:20
yash101 yash101 is offline
Curiosity | I have too much of it!
AKA: null
no team
 
Join Date: Oct 2012
Rookie Year: 2012
Location: devnull
Posts: 1,191
yash101 is an unknown quantity at this point
Re: Vision: what's state of the art in FRC?

I am doing vision less because it is so powerful, but more for the experience and learning. There is a lot to learn through it. There's a good amount of math involved behind the scenes, which I am slowly catching up on. It is also dependent on your algorithmic development skills. If you are able to figure out exactly what you want out of your program and draft how you are going to do it, the code is actually quite simple. It only took me a couple of hours to write my actual vision processing code. What took me the longest was A) optimizations B) features (yes, I overcomplicate things) C) Calibration/Testing/Getting people to listen and get out of your way when testing .

Think of the entire program like a cake. What makes a cake a cake is the bread inside. It may be covered with frosting, or it may be bare. The preparation to bake the cake are the testing protocols and your testing workbench. This step also involves you ensuring that what you are trying to solve is feasible, and worth the pain. The bread (cake) is your processing loop. This should be your first priority. After you have written your basic processing code, and have a test-bench and some testing protocols to ensure it works, you can proceed to the decoration stage. Optimizing the code and making it run with peak efficiency is what you should now work on. This stage is just like putting the frosting on the cake. Next, you can start writing on the cake -- adding features and Easter-eggs! Now that you have successfully made your cake, it is time to inspect it -- make sure you don't have any errors or bugs. Use the testing protocols you should have created before even starting this project to ensure everything you want is working. Finally, it is time to eat the cake! Om nom nom! Eating the cake is while at competitions, where your software is working perfectly, and you are doing much better than the other robots.

I came up with this model last year, where I failed to get my vision program completed in time. I started to write on the frosting before I even baked the cake, so there was nothing supporting my excessive features and everything broke. I also did not have a proper testing protocol last year, so my first demo to my mentors went as a flop. I didn't know about threading back then, and the camera buffers were overflowing, so I was getting 20+ seconds of lag. That is -- not a very great first impression.

Because of these problems I faced last year, I have been working on some software to help me get to the cake first, which are also open source. I have some grabber templates and I am working on a small OpenCV extension, as I mentioned before.

My two cents: If you are wanting to pursue anything complex in the next build season, get started right now. Create your development/testing platform, so when you get started coding, you have one step out of your way!

Last edited by yash101 : 14-10-2014 at 02:22.