Go to Post You Texas boys and your fancy swerve drive. Why don't ya'll come up here to New England? I'm about to saddle me up a skid steer and herd ya'll fellers into a corner. - Tom Bottiglieri [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
  #16   Spotlight this post!  
Unread 12-01-2012, 08:07
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: How to run vison processing code on classmate during matches?

Not knowing much about this situation, I can't say for sure what their framerate was on and off the field, but if they used the default dashboard and the M1011, then the framerate would have been single digits to start with.

The default dashboard, along with the cRIO camera communications moved from SW timed requests of individual JPEGs to HW camera timed MJPG stream this year once it was discovered that the M1011 had poor performance with the JPEG route. Both options are still in the LV palette, but the default is now MJPG. The initial decision was somewhat arbitrary, and C and therefore Java, were already using MJPGs. Depending on the setup, other factors could have played a part. It is easy to chalk it up to the "field", but I have never witnessed this and it doesn't feel like the actual culprit.

As mentioned, it is somewhat difficult to simulate a match in your shop, but on the network you have, you can look at utilization and latency. You can look at how/if it changes when a second robot is added. You can also do some back-of-envelope calculations to see how much of the N speed network you are using.

My final advice is to look at the elements being measured and use those requirements to determine the rates and resolutions needed, as well as the appropriate sensor to use.

Due to slow speeds (30 Hz) max, somewhat high latency (>60ms, often 150ms), and variable jitter, cameras are not necessarily a good sensor to close a loop with. It is far better to calculate where the target is and use an encoder or pot to turn the turret. If the robot is to be turned, use a gyro. More CPU does little to improve the numbers. Higher speed cameras exist, but they are not in the kit, their cost is pretty high, and it may be difficult to integrate them.

I think the camera is a very valuable sensor, but it all depends on how it is used.

To the original topic, the laptop allows you to bring more CPU to the table, to process images more thoroughly, at a higher resolution, and perhaps at a faster rate. Once you have an algorithm that demands more CPU, this seems like a good step. Until then, ...

Greg McKaskle
  #17   Spotlight this post!  
Unread 12-01-2012, 12:36
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

All right, so, I have gotten a ton of really helpful information, now what I would like is some help figuring out how I should put it all together.
Here is what I am hoping to do, in its entirety:

Use the camera on the robot to find the vision target,

Export images from the camera to either our driverstation computer or a laptop mounted on the robot,

Use the NI-Vision software to find where the rectangles are,

Take the rectangles found by the NI-Vision software and calculate the distance from and angle off of perpendicular with the backboards,

Using these distances and angles, which will be updated throughout the course of the robots movement, calculate how our joystick would need to be moved in order to move our robot with a short range shooter up to the backboards,

And finally, send these theoretical joystick controls back to the cRIO and use them to move the robot to where it needs to go.

I am starting to get how to get the images from the camera, I can theoretically do the calculations on the angles and movement required, but what I still need to figure out is how to create the virtual joystick and then how to send the virtual joystick controls to the robot, as well as how to make the program I write run on whatever computer I decide it needs to run on.
  #18   Spotlight this post!  
Unread 12-01-2012, 13:22
PaulDavis1968's Avatar
PaulDavis1968 PaulDavis1968 is offline
Embedded Software/Systems Engineer
AKA: Master of Complexity
FRC #2053 (TigerTronics)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Endicot NY
Posts: 91
PaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nicePaulDavis1968 is just really nice
Re: How to run vison processing code on classmate during matches?

So can you do processing on the robot with a laptop as long as you don't control the robot or can't you?
  #19   Spotlight this post!  
Unread 12-01-2012, 13:46
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

Quote:
Originally Posted by PaulDavis1968 View Post
So can you do processing on the robot with a laptop as long as you don't control the robot or can't you?
Currently the rules make it look like you can do the processing on a laptop that is mounted on the robot as long as it doesn't directly control the robot, however, we are not fully sure on this as of right now. Q+A qestion perhaps?
  #20   Spotlight this post!  
Unread 12-01-2012, 21:06
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vision processing code on classmate during matches?

Quote:
Originally Posted by ganchara View Post
All right, so, I have gotten a ton of really helpful information, now what I would like is some help figuring out how I should put it all together.
Here is what I am hoping to do, in its entirety:

Use the camera on the robot to find the vision target,

Export images from the camera to either our driverstation computer or a laptop mounted on the robot,

Use the NI-Vision software to find where the rectangles are,

Take the rectangles found by the NI-Vision software and calculate the distance from and angle off of perpendicular with the backboards,

Using these distances and angles, which will be updated throughout the course of the robots movement, calculate how our joystick would need to be moved in order to move our robot with a short range shooter up to the backboards,

And finally, send these theoretical joystick controls back to the cRIO and use them to move the robot to where it needs to go.

I am starting to get how to get the images from the camera, I can theoretically do the calculations on the angles and movement required, but what I still need to figure out is how to create the virtual joystick and then how to send the virtual joystick controls to the robot, as well as how to make the program I write run on whatever computer I decide it needs to run on.
During the course of the rest of today, I got a fair amount of work done on figuring out how do deal with the positioning calculations, but I am still having a bunch of trouble figuring out how to both actually run the code that gets written, as well as how I will want to send the processed data back to the robot.
  #21   Spotlight this post!  
Unread 12-01-2012, 22:53
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 71
dvanvoorst is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

I'm looking for the exact same information. We are using Java on our robot, and are trying to decide which is best - using the cRio to do the image processing, or the drivers station laptop. We had been assuming the laptop, but I'm having a hard time finding the info regarding how exactly you communicate information from Labview back to the Java code running on the robot. Do you customize the driver station software to do the image processing and send it through the packets there? Or do you do a completely standalone Labview application and communicate via TCPIP somehow?
I'm starting to lean back towards doing it all on the cRIO to avoid that whole issue, but then I'm not sure if I can take advantage of the NI Vision Assistant modeling information.....
So many questions....thanks in advance for any additional guidance!
  #22   Spotlight this post!  
Unread 13-01-2012, 17:24
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

So, I was running the vision assistant software, and when I told it to acquire an image, it asked me for the NI-IMAQdx driver which I should download from the NI image acquisition software, just something to keep an eye out for when any other teams are working on setting something like this up.
  #23   Spotlight this post!  
Unread 13-01-2012, 20:53
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: How to run vison processing code on classmate during matches?

I believe IMAQdx is used for some of the other camera types, but the bottom Axis camera plugin should be independent of it. They are somewhat comparable, but the bottom one has more config options.

Greg McKaskle
  #24   Spotlight this post!  
Unread 13-01-2012, 21:02
dvanvoorst dvanvoorst is offline
Registered User
FRC #2771 (Code Red)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2012
Location: Grand Rapids, MI
Posts: 71
dvanvoorst is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

Greg, you mentioned "the bottom Axis camera plugin". Is that some plugin that I should be seeing in Vision Assistant to be able to access the Axis camera directly? If so, I'm not seeing it. Any help would be appreciated.
Dale
  #25   Spotlight this post!  
Unread 13-01-2012, 22:26
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

Quote:
Originally Posted by dvanvoorst View Post
Greg, you mentioned "the bottom Axis camera plugin". Is that some plugin that I should be seeing in Vision Assistant to be able to access the Axis camera directly? If so, I'm not seeing it. Any help would be appreciated.
Dale
I am not seeing a acquire from axis camera button either, my options are acquire image:
standard camera
from IEEE 1394, Gigabit ethernet, USB, or IP camera
smart camera
or RT camera.
all of these options required the IMAQdx driver, which i downloaded along with the NI vision acquisition software
  #26   Spotlight this post!  
Unread 14-01-2012, 07:45
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: How to run vison processing code on classmate during matches?

After the cameras you list, there should be a Simulate Acquisition, and then an Axis IP item. You may need to use the scrollbar. Mine looks like the image I attached, and thin only ones that aren't grayed out are the simulate and Axis.

Greg McKaskle
Attached Thumbnails
Click image for larger version

Name:	Screen Shot 2012-01-14 at 6.43.06 AM.png
Views:	69
Size:	26.3 KB
ID:	11363  
  #27   Spotlight this post!  
Unread 14-01-2012, 19:14
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

Mine also has the simulate acquisition button, however, there is no acquire axis IP button for some reason. Part of it may have been that when I installed everything from the NI software USB drive for some reason it didn't install the driver station software, which I thought I had told it to install. This issue also happened on one of my teammate's laptop as well.
  #28   Spotlight this post!  
Unread 14-01-2012, 20:03
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: How to run vison processing code on classmate during matches?

That may be. The Axis is a plug-in. Do other people have it?

Greg McKaskle
  #29   Spotlight this post!  
Unread 15-01-2012, 10:53
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: How to run vison processing code on classmate during matches?

Quote:
Originally Posted by ganchara View Post
Part of it may have been that when I installed everything from the NI software USB drive for some reason it didn't install the driver station software, which I thought I had told it to install.
I noticed this (DS missing) as well. but the update took care of that. Perhaps some of the NI Vision stuff also requires the update?

Last edited by omalleyj : 15-01-2012 at 10:53. Reason: spelling challenged
  #30   Spotlight this post!  
Unread 16-01-2012, 12:49
ganchara ganchara is offline
Registered User
FRC #2523 (Hilltoppers)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2009
Location: vermont
Posts: 28
ganchara is an unknown quantity at this point
Re: How to run vison processing code on classmate during matches?

Quote:
Originally Posted by omalleyj View Post
I noticed this (DS missing) as well. but the update took care of that. Perhaps some of the NI Vision stuff also requires the update?
Which update is this? My software doesn't attempt to update when I run it, and currently, we can't find our team NI software installer USB.
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 01:04.

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