Go to Post If you look at where you have come from you can often tell where you are going. - Turtlecoach [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2013, 06:26
matthewgkerr matthewgkerr is offline
Registered User
FRC #4529 (Team Melbourne)
Team Role: Mentor
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Melbourne, Australia
Posts: 26
matthewgkerr is an unknown quantity at this point
Image processing

I have had a look through the forums on the image processing topic trying to work out if we should process images on or off the cRIO. For starters, I would be looking at processing the images on the driver station; probably on an upgraded laptop from the one that comes with the rookie kit. As a rookie team, would the veteran teams recommend one direction over the other. My current thinking is removing the image processing from the cRIO will make for simpler robot code. Any thoughts or suggestions would be appreciated.
  #2   Spotlight this post!  
Unread 23-01-2013, 07:04
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Image processing

The image processing is not really the hard part. The hard part is making the robot do what you want once you have the data from the processing.

If you process an image on the cRIO, you will want to do it then move the robot and shoot. Or maybe do it again to verify and then shoot. Doing 30frames per second is not easy on the robot and not needed unless you are shooting while strafing and spinning.

If you process on the laptop, you have more CPU power and your approaches widen. You can use more edge detection, larger images, and be less efficient. Once you have the data, you have to get it to the robot.

Depending on the language used, I'd first go through the tutorials and learn the problem. The solution, whether on or off the robot is quite similar.

Greg McKaskle
  #3   Spotlight this post!  
Unread 23-01-2013, 07:25
Chadfrom308's Avatar
Chadfrom308 Chadfrom308 is offline
Slave to the bot
AKA: Chad Krause
FRC #0308 (The Monsters)
Team Role: Driver
 
Join Date: Jan 2013
Rookie Year: 2011
Location: Novi
Posts: 272
Chadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to beholdChadfrom308 is a splendid one to behold
Re: Image processing

Are you allowed to have image processing on the laptop? I thought there was a rule about only the robot can do image processing, or maybe that was for something else
  #4   Spotlight this post!  
Unread 23-01-2013, 07:28
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Image processing

Did you actually see the rule, or did someone tell you about it. I believe you were misinformed. There are many ways to do image processing.

Greg McKaskle
  #5   Spotlight this post!  
Unread 23-01-2013, 08:28
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Image processing

We are somewhat interested in this as well. More so, is there a white paper or reference that describes how to do processing on your driver station? What we don't understand is how to transmit the data from the driver station back to the CRIO once the driver station has processed the data. Any document that describes the nuts and bolts of that packet communication would be appreciated here.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #6   Spotlight this post!  
Unread 23-01-2013, 13:53
catacon catacon is offline
Registered User
FRC #1444 (Lightning Lancers)
Team Role: Mentor
 
Join Date: Jan 2009
Rookie Year: 2006
Location: St. Louis
Posts: 154
catacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to beholdcatacon is a splendid one to behold
Re: Image processing

You don't need to send the entire image back to the cRIO, only what you learned from the processing. For example, if you did your vision processing and determined the target was on the left, you would simply tell the robot to turn left. Just like any other control.
  #7   Spotlight this post!  
Unread 23-01-2013, 14:44
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,756
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: Image processing

The intent is for teams to share data between robot and dashboard or other program using SmartDashboard. I believe the 2013 white paper discusses this, but I'm not sure if the demo code uses it. I know that the LV code doesn't show how to transmit back, but it is quite easy this year.

Greg McKaskle
  #8   Spotlight this post!  
Unread 23-01-2013, 14:47
Orion.DeYoe Orion.DeYoe is offline
Registered User
FRC #5413 (Stellar Robotics)
Team Role: Mentor
 
Join Date: Feb 2012
Rookie Year: 2011
Location: North Fairfield, OH
Posts: 206
Orion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to beholdOrion.DeYoe is a splendid one to behold
Re: Image processing

Quote:
Originally Posted by matthewgkerr View Post
I have had a look through the forums on the image processing topic trying to work out if we should process images on or off the cRIO. For starters, I would be looking at processing the images on the driver station; probably on an upgraded laptop from the one that comes with the rookie kit. As a rookie team, would the veteran teams recommend one direction over the other. My current thinking is removing the image processing from the cRIO will make for simpler robot code. Any thoughts or suggestions would be appreciated.
In the past vision processing has mostly been done completely on the robot. Last year doing the tracking on the driver station laptop became really popular. Our team did our tracking on the driver station last year and this year we've made improvements and are tracking on the laptop again. It's driving the robot and working 10 times better than when we tracked on the robot.
One thing we had trouble with was getting the "target data" array to the robot. We ended up using a DCP port (port 1130) to send the array to the cRio. I have attached the two VIs we used (I downloaded them from another thread). You'll use the "DCP Send.vi" in the dashboard program, and you'll use "DCP Receive.vi" on the robot.

I hope this helps!
Attached Files
File Type: vi UDP Receive.vi (6.7 KB, 7 views)
File Type: vi UDP Send.vi (6.9 KB, 5 views)
  #9   Spotlight this post!  
Unread 23-01-2013, 15:17
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Image processing

Quote:
Originally Posted by Greg McKaskle View Post
The intent is for teams to share data between robot and dashboard or other program using SmartDashboard. I believe the 2013 white paper discusses this, but I'm not sure if the demo code uses it. I know that the LV code doesn't show how to transmit back, but it is quite easy this year.

Greg McKaskle
Ok, neat-o. I wondered what smartdashboard was, I haven't dug into this yet but I understand the concept. It sounds like it's a gateway. That should make it nice, I'll read up on smartdashboard. Thanks Greg.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #10   Spotlight this post!  
Unread 23-01-2013, 20:27
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Image processing

Quote:
Originally Posted by Orion.DeYoe View Post
We ended up using a DCP port...
I think you accidentally merged TCP and UDP there. The files you attached are fine for UDP communication, though.

The SmartDashboard (and underlying Network Tables support) communication library makes doing it that way unnecessary, but they'll still work.
  #11   Spotlight this post!  
Unread 23-01-2013, 21:04
Ginto8's Avatar
Ginto8 Ginto8 is offline
Programming Lead
AKA: Joe Doyle
FRC #2729 (Storm)
Team Role: Programmer
 
Join Date: Oct 2010
Rookie Year: 2010
Location: Marlton, NJ
Posts: 174
Ginto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of lightGinto8 is a glorious beacon of light
Re: Image processing

Team 341 (Miss Daisy) released their image processing code from last year as a paper: http://www.chiefdelphi.com/media/papers/2676

It ran as a SmartDashboard extension, used OpenCV to process the images, and sent the information back to the robot using NetworkTables.
__________________
I code stuff.
Closed Thread


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 02:24.

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