Go to Post It is hard to write code that conforms to a standard that isn't published... - AustinSchuh [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-14-2016, 04:12 PM
GRSICP GRSICP is offline
Greta Rauch
FRC #5822 (WolfByte)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2010
Location: Chicago
Posts: 18
GRSICP is an unknown quantity at this point
Sending Image from Camera to GRIP

Hi Everyone!

Our team did not use vision tracking this year so we are spending some time this summer figuring it out. We have learned how to process an image in GRIP and how to read the Network Tables in eclipse. However, we do not understand how to send an image from a live camera feed to GRIP. We are using a Logitech c270 HD Webcam and code in Java. Any tips or advice would be appreciated!

Thanks!
Greta
Team 5822 WolfByte
Reply With Quote
  #2   Spotlight this post!  
Unread 07-17-2016, 12:35 PM
Jayd009's Avatar
Jayd009 Jayd009 is offline
Registered User
AKA: Jonathan
FRC #4468 (Fernbank LINKS)
Team Role: Programmer
 
Join Date: Jan 2016
Rookie Year: 2016
Location: Atlanta, Georgia
Posts: 27
Jayd009 is on a distinguished road
Re: Sending Image from Camera to GRIP

If you are running GRIP on the driver station laptop or roboRIO, you can add the camera by clicking on Add Webcam in the sources section of GRIP. This section is in the bottom left corner of the window.



If you are trying to run GRIP on a Raspberry Pi, you'll have to follow the steps in this guide.
__________________
2016: District Event Winner @ Columbus District Qualifier (PCH)
2016: Engineering Inspiration Award @ Peachtree District State Championship
2016: Tesla Subdivision Playoffs Appearance @ FIRST Championship


Reply With Quote
  #3   Spotlight this post!  
Unread 07-19-2016, 02:58 PM
GRSICP GRSICP is offline
Greta Rauch
FRC #5822 (WolfByte)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2010
Location: Chicago
Posts: 18
GRSICP is an unknown quantity at this point
Re: Sending Image from Camera to GRIP

We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?
Reply With Quote
  #4   Spotlight this post!  
Unread 07-21-2016, 10:08 PM
GoldenGollem's Avatar
GoldenGollem GoldenGollem is offline
Java Programmer
FRC #2509 (Hutchinson Tigerbots)
Team Role: Programmer
 
Join Date: Dec 2015
Rookie Year: 2015
Location: Minnesota
Posts: 24
GoldenGollem is an unknown quantity at this point
Re: Sending Image from Camera to GRIP

Quote:
Originally Posted by GRSICP View Post
We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?
Have you been able to access the camera via the RoboRio Webdashboard.
Reply With Quote
  #5   Spotlight this post!  
Unread 07-22-2016, 12:10 PM
ahartnet's Avatar
ahartnet ahartnet is offline
Registered User
AKA: Andrew Hartnett
FRC #5414 (Pearadox)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2005
Location: Houston, Texas
Posts: 194
ahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant future
Re: Sending Image from Camera to GRIP

Quote:
Originally Posted by GRSICP View Post
We tried that but cannot add the USB camera feed from the rio. Is there another way to access it?
A couple of things:

1) I don't believe GRIP can use the camera if you're also sending that information to the driver station. So if you have robot code opening up the camera, it'll hog it and grip will not be able to see it
2) So if your robot code would normally open webcamX, then your GRIP code should now open webcamX instead
3) My opinion is that running GRIP on the roboRIO is to slow for anything other than learning a little bit about vision processing. If you have the resources to get a Kangaroo PC (~$100) I would highly recommend that instead. Additionally, there are instructions for using a raspberry pi.
3a) some extra context: If I recall, robot code wants to use about 60% of the processor running fairly basic robot code. GRIP also wants about 60% of the processor if you have what I would consider a reasonable quality image for vision processing. In my experience, we couldn't reduce the delay to much less than 2-3 seconds running grip on the roboRIO, even with reducing the quality of the image substantially.

Good luck
__________________
Team 451 The Cat Attack, Student Alumni (2005)
Team 1646 Precision Guessworks, Mentor (2006-2008)
Team 2936 Gatorzillas, Mentor (2011-2014)
Team 5414 Pearadox, Mentor (2015-Present)
Reply With Quote
  #6   Spotlight this post!  
Unread 07-24-2016, 09:05 PM
GRSICP GRSICP is offline
Greta Rauch
FRC #5822 (WolfByte)
Team Role: Programmer
 
Join Date: Oct 2015
Rookie Year: 2010
Location: Chicago
Posts: 18
GRSICP is an unknown quantity at this point
Re: Sending Image from Camera to GRIP

Quote:
Have you been able to access the camera via the RoboRio Webdashboard.
Yes we have

Quote:
1) I don't believe GRIP can use the camera if you're also sending that information to the driver station. So if you have robot code opening up the camera, it'll hog it and grip will not be able to see it
2) So if your robot code would normally open webcamX, then your GRIP code should now open webcamX instead
3) My opinion is that running GRIP on the roboRIO is to slow for anything other than learning a little bit about vision processing. If you have the resources to get a Kangaroo PC (~$100) I would highly recommend that instead. Additionally, there are instructions for using a raspberry pi.
3a) some extra context: If I recall, robot code wants to use about 60% of the processor running fairly basic robot code. GRIP also wants about 60% of the processor if you have what I would consider a reasonable quality image for vision processing. In my experience, we couldn't reduce the delay to much less than 2-3 seconds running grip on the roboRIO, even with reducing the quality of the image substantially.
Thank you so much for the advice! Would you recommend a Kangaroo PC or a raspberry pi?
Reply With Quote
  #7   Spotlight this post!  
Unread 07-24-2016, 10:19 PM
ahartnet's Avatar
ahartnet ahartnet is offline
Registered User
AKA: Andrew Hartnett
FRC #5414 (Pearadox)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2005
Location: Houston, Texas
Posts: 194
ahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant futureahartnet has a brilliant future
Re: Sending Image from Camera to GRIP

I haven't used the raspberry pi. The kangaroo worked great, but there are a couple of gotchas. Mainly that the kangaroo will use the other ethernet port from the 2016 radio. Meaning toy either need an extra router, or be ok only connecting wirelessly
__________________
Team 451 The Cat Attack, Student Alumni (2005)
Team 1646 Precision Guessworks, Mentor (2006-2008)
Team 2936 Gatorzillas, Mentor (2011-2014)
Team 5414 Pearadox, Mentor (2015-Present)
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 08:20 AM.

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