OCCRA
Go to Post I think being successful in FIRST is creating an environment where people can grow, learn, change, and recreate... It's about making an environment where kids feel they can be successful... in whatever discipline they choose. - ColleenShaver [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
  #1   Spotlight this post!  
Unread 07-11-2017, 01:12 AM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
ResetVisionFramework- Get your vision code up and running in minutes!

ResetVisionFramework
Easy, Quick, Fully Customizable, Get your Vision code up and running in minutes!

Github: https://github.com/Reset-Robotics/ResetVisionFramework

Features
Fully customizable framework allowing you to do whatever you want to do with your vision tracking. A GUI that auto generates vision code to your team's needs in a matter of seconds for beginners and experts! Able to set how many cameras, what operations wanted, what to calculate (CenterX, CenterY), filter by aspect ratio, GPU acceleration option, communication library and more! Use the code generator to get started quickly or start coding manually using the framework.
Detailed framework allowing beginners to quickly learn how to code vision is C++ as well as giving full extensive options for experts to do various operations, filtering, and calculations.

How to Use
Note: this requires CMake and C++ compiler to already be installed. If you are not using CMake, just modify and use the .cpp on the platform you want.

Code Framework
1. Download the folder from the github which contains ResetVisionFramework.cpp and a CmakeLists.txt

2. First open up CMakeLists.txt and follow the commented instructions and what it does and what to change to fit your needs.

3. Then open up the .cpp file and go over the framework. The comments will explain out what each section does, give some examples, and give you a template code to write out what you need. If you want to perform functions that are not in the examples, the OpenCV Documents are a great place to find them.

4. After going through the template and having created your code, save both files and now you have a completed .cpp and CMakeLists.cpp

Code Generator Interface (coming soon)

1. Click on all the options you want
2. Press Submit
3. It will auto generate a .cpp file (and a CMakeLists.txt if selected)

Final Steps

1. Now that you have your .cpp and CMakelists.txt, go into the build folder (create an empty build folder if there is no build folder)
2. run cmake..
3. Then run make
4. then ./filename.cpp

ResetVision Code Generator vs GRIP
The code generator is still in the works, but it sounds a lot like GRIP. The main differences between GRIP and this one is that this one will be a lot simpler to use and offer extra features that GRIP does not have like GPU acceleration, and ZMQ and UDP communication protocol support. This generator generates code that is easily customizable since it is based off the framework which allows it to be much more flexible and hopefully easier to integrate than GRIP to do all those complicated operations that the code generators do not offer. GRIP is still a great tool and I think that these two tools can complement each other.

Optional
Make your program run on startup

If you have any questions or comments please feel free to open up an issue on github, post it here, or shoot us an email at support@resetrobotics.org. You can check for any updates on the ChiefDelphi Thread or on Github.

Coming Soon
GUI Code Generator
Instructions on adding program to startup
Python Vision Framework
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star

Last edited by Praj : 07-11-2017 at 11:21 PM. Reason: GRIP section update
Reply With Quote
  #2   Spotlight this post!  
Unread 07-11-2017, 07:08 AM
marshall's Avatar
marshall marshall is offline
Discerning and exacting individual
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,969
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by Praj View Post
The code generator is still in the works
Indeed it is.

Quote:
Originally Posted by Praj View Post
but it sounds a lot like GRIP
In a way, I sound like James Earl Jones.

Looks like an interesting project and I'm now following it on GitHub.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #3   Spotlight this post!  
Unread 07-11-2017, 07:42 AM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by marshall View Post

Looks like an interesting project and I'm now following it on GitHub.
Thanks! Your team's vision projects are amazing! I definitely got some inspiration from them
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #4   Spotlight this post!  
Unread 07-11-2017, 01:49 PM
SamCarlberg's Avatar
SamCarlberg SamCarlberg is offline
GRIP, WPILib. 2084 alum
FRC #2084
Team Role: Mentor
 
Join Date: Nov 2015
Rookie Year: 2010
Location: MA
Posts: 216
SamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud ofSamCarlberg has much to be proud of
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
The main differences between GRIP and this one is that this one will be a lot simpler to use and offer extra features that GRIP does not have like multiple camera support, GPU acceleration, and other communication protocol support
I'd like to point out that GRIP supports arbitrarily many camera inputs and GPU support is in the works.

What communication protocols are you planning on supporting? GRIP has network tables, ROS, and runs an HTTP REST endpoint.
__________________
WPILib developer
GRIP, RobotBuilder, Shuffleboard
Reply With Quote
  #5   Spotlight this post!  
Unread 07-11-2017, 02:02 PM
marshall's Avatar
marshall marshall is offline
Discerning and exacting individual
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,969
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by SamCarlberg View Post
GRIP has... ROS
Yeah it does.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #6   Spotlight this post!  
Unread 07-11-2017, 11:14 PM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by SamCarlberg View Post
I'd like to point out that GRIP supports arbitrarily many camera inputs and GPU support is in the works.

What communication protocols are you planning on supporting? GRIP has network tables, ROS, and runs an HTTP REST endpoint.
I was planning on supporting ZMQ (TCP) and possibly a basic UDP setup and network tables of course. The main goal of the generator is to generate code based off the framework so that teams can easily adapt it to their situation. I really like the GRIP pipeline setup but I felt that integrating it with the robot was a bit harder. I want to make this generator easier to integrate because the framework allows the person to learn what exactly is going on and than they can go into the generated file and add in optimizations that either code generators do not have. My bad on the communications, I'll edit the post.
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #7   Spotlight this post!  
Unread 07-11-2017, 11:24 PM
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 405
cpapplefamily is a jewel in the roughcpapplefamily is a jewel in the roughcpapplefamily is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

I can't wait to give this a go. I would love to see some tutorials and videos.
Reply With Quote
  #8   Spotlight this post!  
Unread 07-11-2017, 11:27 PM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by cpapplefamily View Post
I can't wait to give this a go. I would love to see some tutorials and videos.
I might make some soon. Definitely check out the current framework released and feel free to ask any questions.
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #9   Spotlight this post!  
Unread 07-11-2017, 11:57 PM
cpapplefamily cpapplefamily is offline
Registered User
FRC #3244 (Granite City Gearheads)
Team Role: Mentor
 
Join Date: May 2015
Rookie Year: 2015
Location: Minnesota
Posts: 405
cpapplefamily is a jewel in the roughcpapplefamily is a jewel in the roughcpapplefamily is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

No computers at the lake. Even phone internet is sketchy. I'll take a look at work this weekend.
Reply With Quote
  #10   Spotlight this post!  
Unread 07-12-2017, 01:32 AM
Peter Johnson Peter Johnson is offline
WPILib Developer
FRC #0294 (Beach Cities Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Redondo Beach, CA
Posts: 327
Peter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant futurePeter Johnson has a brilliant future
Re: ResetVisionFramework- Get your vision code up and running in minutes!

I see you're using system() calls to set camera settings and using the OpenCV VideoCapture object for image capture. I recommend you consider using the cscore library instead for this functionality, as it is much more robust than the OpenCV VideoCapture object regarding things like camera dropouts (disconnect/reconnect). The cscore library also provides MJPG server functionality for sending the camera stream to the dashboard. It's designed to interoperate nicely with OpenCV, so it should be pretty close to a drop-in for the OpenCV VideoCapture stuff.

You may also want to look at https://github.com/wpilibsuite/VisionBuildSamples
__________________
Author of cscore - WPILib CameraServer for 2017+
Author of ntcore - WPILib NetworkTables for 2016+
Creator of RobotPy - Python for FRC

2010 FRC World Champions (294, 67, 177)
2007 FTC World Champions (30, 74, 23)
2001 FRC National Champions (71, 294, 125, 365, 279)

Last edited by Peter Johnson : 07-12-2017 at 04:32 AM.
Reply With Quote
  #11   Spotlight this post!  
Unread 07-12-2017, 11:31 AM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by Peter Johnson View Post
I see you're using system() calls to set camera settings and using the OpenCV VideoCapture object for image capture. I recommend you consider using the cscore library instead for this functionality, as it is much more robust than the OpenCV VideoCapture object regarding things like camera dropouts (disconnect/reconnect). The cscore library also provides MJPG server functionality for sending the camera stream to the dashboard. It's designed to interoperate nicely with OpenCV, so it should be pretty close to a drop-in for the OpenCV VideoCapture stuff.

You may also want to look at https://github.com/wpilibsuite/VisionBuildSamples
I have actually looked into cscore before. I was originally planning on using that for this year's vision code but it couldn't compile on a Jetson so I used system() calls which worked fine so far so I decided to keep using system() calls in the framework. I could maybe add in a cscore option for the extra features.
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #12   Spotlight this post!  
Unread 07-14-2017, 09:14 PM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Pushed out a release on github. So far the code generator performs all the operations and now I am working on filtering with bounding rectangles. The operations right now are only resize, converting to hsv, hsv threshold, and find contours. However, I'll add more later but I'm going to try to quickly go through the rest and release a beta or take in some beta testers and then add in the extra features.
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #13   Spotlight this post!  
Unread 07-14-2017, 10:26 PM
marshall's Avatar
marshall marshall is offline
Discerning and exacting individual
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,969
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by Praj View Post
Pushed out a release on github. So far the code generator performs all the operations and now I am working on filtering with bounding rectangles. The operations right now are only resize, converting to hsv, hsv threshold, and find contours. However, I'll add more later but I'm going to try to quickly go through the rest and release a beta or take in some beta testers and then add in the extra features.
Code on GitHub seems to be about 4 days old. Not sure what you pushed or changed.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #14   Spotlight this post!  
Unread 07-15-2017, 12:47 AM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Quote:
Originally Posted by marshall View Post
Code on GitHub seems to be about 4 days old. Not sure what you pushed or changed.
Oops, I just realized how misleading that sounds. I just made the the project into a release tag but I have not actually pushed out the new code generator changes. I'm planning on waiting till after finishing the filtering part.
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star
Reply With Quote
  #15   Spotlight this post!  
Unread 09-10-2017, 08:15 PM
Praj's Avatar
Praj Praj is offline
Registered User
FRC #6325 (Reset Robotics)
Team Role: Programmer
 
Join Date: Feb 2017
Rookie Year: 2017
Location: Alpharetta
Posts: 115
Praj is a jewel in the roughPraj is a jewel in the roughPraj is a jewel in the rough
Re: ResetVisionFramework- Get your vision code up and running in minutes!

Heres a big update on whats going on

The original design plans were wiped for something that looks completely different then that was originally in mind. The purpose of this project has also changed and so have the similarities and differences with GRIP.

Code Generator's Purpose
This will be a graphical scripting engine that allows people to write vision scripts without needing to know a single line of code. The engine itself could be used for anything, but we're focusing on vision first because we've noticed many teams struggling with its complexity and we'd like to help lower the barrier to entry.

We are planning on eventually expanding it to cover different use cases, and turning it into an educational tool to help people learn programming. The main difference between this and GRIP is that this will have more of the basic programming functions, such as loops, ifs, mathematical operations, and logic, rather than just vision processing. Also, this aims to be more flexible than grip with what you can do. When this is done, you should be able to be running four different camera pipelines simultaneous each with their own operations and conditions on when to run

The visual script will be compiled into regular code, and will support multiple platforms including the roboRio, raspberry pi, and nvidia jetson with GPU acceleration. It will also have a live mode, where you will be able to run your script from within the program, edit the flowchart while it's running, and see how your changes affect the output in realtime.

There will be monitor blocks that you can use to view images being processed by your script, as well as other data like booleans or numbers. Monitors will be ignored when compiling the script. Eventually, we might create a version of this tool that could be used for every aspect of FRC programming, including main robot code and smart dashboard. However, we would like to ask if anyone would actually want to use this tool for things like robot code and smart dashboard.

Here's a sneak peek so far...

Click image for larger version

Name:	sneakpeek.png
Views:	41
Size:	54.0 KB
ID:	22511
__________________



2017-Rookie All Star/Rookie Inspiration/Highest Rookie Seed. PCH District Championship Rookie All Star

Last edited by Praj : 09-10-2017 at 08:27 PM. Reason: big update on purpose and features
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:48 PM.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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