Go to Post make your robot so it's not a problem and it won't be a problem - pfreivald [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-02-2015, 17:34
wildefriend1 wildefriend1 is offline
Registered User
AKA: Nathan Wilde
FRC #5137 (Iron Kodiaks)
Team Role: Programmer
 
Join Date: Feb 2015
Rookie Year: 2014
Location: San Marcos
Posts: 1
wildefriend1 is an unknown quantity at this point
Image processing?

We were wondering where we could get started for image processing/ tracking for command based java. We want to be able to track the toats is autonomous mode.
Reply With Quote
  #2   Spotlight this post!  
Unread 08-02-2015, 22:47
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
You will run into problems. I would recommend getting a coprocessor or using the driver station with something such as my solution which should be good enough. With my solution I was able to get a robot to align to a tote and run into it, I will also be coming out with a vision library soon that makes vision stupidly simple to do basic stuff with. Pm me if you have questions about any of the java stuff, I looked into all of this week 1...
__________________
Engineering Inspiration - 3019


Tower Tracker author (2016)
  • 1 regional finalist
  • 1 regional winner
  • 3 innovation in control awards
Reply With Quote
  #3   Spotlight this post!  
Unread 09-02-2015, 10:51
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,679
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Image processing?

Quote:
Originally Posted by Fauge7 View Post
You will run into problems.
Problems getting the vision software itself to work, problems with the rest of the robot because so much CPU is tied up in vision processing, or something else?
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 09-02-2015, 11:12
Ozuru's Avatar
Ozuru Ozuru is offline
It's always the programmer's fault.
no team
 
Join Date: May 2013
Rookie Year: 2010
Location: Earth
Posts: 268
Ozuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to beholdOzuru is a splendid one to behold
Re: Image processing?

Quote:
Originally Posted by GeeTwo View Post
Problems getting the vision software itself to work, problems with the rest of the robot because so much CPU is tied up in vision processing, or something else?
I'm not him or her but I'm willing to wager that they were suggesting there will be issues with the rest of the robot due to the intensity and resources used during vision processing on the rather meager RoboRIO, for which that I agree with.

I recommend you check out DaisyCV from 2012 or 2013 as they have been an incredibly useful resource for me (and other programmers) regarding vision tracking. Storm (2729) also publishes their code on GitHub each year and has a well-documented OpenCV driver-based solution from last year they published. If you run into any specific issues, let me know -- the documentation for OpenCV is greatly lacking and getting started was the hard part.
Reply With Quote
  #5   Spotlight this post!  
Unread 09-02-2015, 13:42
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Image processing?

Quote:
Originally Posted by Ozuru View Post
I'm not him but I'm willing to wager that they were suggesting there will be issues with the rest of the robot due to the intensity and resources used during vision processing on the rather meager RoboRIO, for which that I agree with.
yes, not only does it take a good amount of processing power which might lag the robot controls, but it also is almost impossible to do in java. The NIVision libraries are not documented and dont event work. The only option is using opencv java bindings which are also poorly documented. Your best option is using a coprocessor or driverstation computer with C++,C, or python, Python is relatively easy to learn.
Reply With Quote
  #6   Spotlight this post!  
Unread 09-02-2015, 14:13
weaversam8 weaversam8 is offline
Team Captain
AKA: Sam Weaver
FRC #4534 (Wired Wizards)
Team Role: Leadership
 
Join Date: Jan 2014
Rookie Year: 2014
Location: Wilmington, North Carolina
Posts: 137
weaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to beholdweaversam8 is a splendid one to behold
Our team uses a Jetson TK1 we got from first choice to process along side the RoboRIO. They communicate using serial
__________________
ORB Haow!

Reply With Quote
  #7   Spotlight this post!  
Unread 09-02-2015, 15:04
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: Image processing?

Has this changed much this year?

I was hoping to have the kids install the camera at our next practice and play with the axisCamera sample code as well as the vision processing examples. Do they just not work? Or are the problems encountered the same as the past 3 years?

We had some success 2 years ago with NI Vision libs running on the cRIO-- we had a separate thread running at low priority to do all the vision and once a pic was done it would update a global value that we could read each time through a pid loop. Essentially we used the global var to set our gyro setpoint and the image processing updated it about once every 0.3s maybe iirc. It wasn't great, but it kept us on track. We eventually went to dashboard side processing, but those involved with that part have left the team. I figured I'd start with the on-RIO solution and the separate thread idea which I can teach to the students how it fully works. But if things are broken this year with respect to past years, I want to try a different direction from the start.

But if the concerns raised are the same old issues, then I think I'll try the old approach as it was pretty easy to get up and running. And if the roboRIO is truly 100x faster than the cRIO as I thought I saw advertised, then that update every 0.3s could be every 3ms which is more than fast enough. I also thought I'd investigate roboRealm as that looked like it had good how-to info to incorperate it, and it looks like it did what our previous solution was doing.

Last edited by cstelter : 09-02-2015 at 15:07.
Reply With Quote
  #8   Spotlight this post!  
Unread 09-02-2015, 18:37
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Image processing?

its not at all 100x times faster
Reply With Quote
  #9   Spotlight this post!  
Unread 09-02-2015, 19:08
RufflesRidge RufflesRidge is offline
Registered User
no team
 
Join Date: Jan 2012
Location: USA
Posts: 990
RufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant futureRufflesRidge has a brilliant future
Re: Image processing?

Quote:
Originally Posted by Fauge7 View Post
yes, not only does it take a good amount of processing power which might lag the robot controls, but it also is almost impossible to do in java. The NIVision libraries are not documented and dont event work.
That's an interesting assertion given that the plugins contain not one but two different examples to find auto totes.

Just because you didn't have success or found a bug doesn't mean that everything is broken and the sky is falling.
Reply With Quote
  #10   Spotlight this post!  
Unread 09-02-2015, 19:27
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Image processing?

I have not tried them yet but I know the documentation is horrible. To effectively do vision processing you should use a better processor and not java. Yes you can do some basic processing.
Reply With Quote
  #11   Spotlight this post!  
Unread 09-02-2015, 19:29
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Image processing?

Eh. Java is doable with vision. It is definitely not the more common language, but I know that people in my lab, when they implement, they do it in java sometimes.

For example, opencv is incredibly biased for c++.
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote
  #12   Spotlight this post!  
Unread 09-02-2015, 19:39
cstelter cstelter is offline
Programming Mentor
AKA: Craig Stelter
FRC #3018 (Nordic Storm)
Team Role: Mentor
 
Join Date: Apr 2012
Rookie Year: 2012
Location: Mankato, MN
Posts: 77
cstelter will become famous soon enough
Re: Image processing?

Quote:
Originally Posted by Fauge7 View Post
I have not tried them yet but I know the documentation is horrible. To effectively do vision processing you should use a better processor and not java. Yes you can do some basic processing.
In the past years the NIVision code ran in c as a foreign language interface to java and java only had to process the resulting particle tables of data which are small (width, height, etc.). At lest that was my understanding-- I'm a C/C++ guy but that's how my co-mentor described it to me so I assumed he was right.

So exactly how much faster does the roboRIO operate than the cRIO? We went from single core 400MHZ to dual core 667 MHz but that doesn't necessarily tell much of a tale by itself. I could have sworn I heard 100x faster at St. Louis last year, but can't find any such reference on the web, so I must have misunderstood or heard wrong.
--
Craig
Reply With Quote
  #13   Spotlight this post!  
Unread 09-02-2015, 21:52
zDrakon zDrakon is offline
Registered User
FRC #3501
 
Join Date: Feb 2015
Location: Sunnyvale
Posts: 12
zDrakon is an unknown quantity at this point
Lightbulb Re: Image processing?

Can anyone refer me to a link or help my team through this forums?

We are using the ODROID (external coprocessor) to receive images from a usb camera. We ran into the problem of not being able to run it directly from the roborio for whatever reason.

I am searching over the interwebs and cheif delphi FRC forums for a solution in how to make the Roborio actually receive the image input from the usb camera. We are using BOOFCV similar to OPENCV but apparently in java instead of C++. Thanks so much please reply asap as we would love to get vision working!
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 18:08.

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