Go to Post Different approaches to the same problem. Isn't it better to focus on understanding both than to be dogmatic about it? - Greg McKaskle [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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 14-02-2012, 13:12
gaurav.agashe gaurav.agashe is offline
Registered User
FRC #0886
 
Join Date: Jan 2012
Location: Toronto, ON
Posts: 5
gaurav.agashe is an unknown quantity at this point
Vision: IMAQ Area Filter crashes cRIO

Hello,

I have developed a successful vision script in Vision Assistant and I am trying to now get the cRIO to do the image processing. I generated the VI from vision assistant and pasted it into the Vision Processing VI in the project file.
I have pasted the IMAQ blocks one by one, wired the Img Out to an Image viewer, RAN the Robot Main.vi, and observed the resulting image of the block on the front panel. It has worked in this way until I pasted in the Area Particle Filter block.

When I run the Robot Main.vi with this block in place, as soon as I click on 'Enable Vision', the DS looses connection with the cRIO and the Robot Code and Comminication lights on the dashboard turn red (program on the cRIO crashes I'm guessing).

Looking at my attached Vision VI screenshot, can you spot any glaring errors? Your comments are greatly appreciated!!
Attached Thumbnails
Click image for larger version

Name:	visionCode.JPG
Views:	75
Size:	90.9 KB
ID:	11894  
Reply With Quote
  #2   Spotlight this post!  
Unread 21-01-2013, 14:07
tilky's Avatar
tilky tilky is offline
Registered User
AKA: Ryan Thielke
FRC #3137
Team Role: Programmer
 
Join Date: Nov 2011
Rookie Year: 2011
Location: Connetquot
Posts: 188
tilky is an unknown quantity at this point
Re: Vision: IMAQ Area Filter crashes cRIO

never ever do camera tracking on cRio, it is way to resource intensive. Instead, do it on driver station.
Reply With Quote
  #3   Spotlight this post!  
Unread 21-01-2013, 18:31
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,752
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: Vision: IMAQ Area Filter crashes cRIO

Quote:
never ever ...
All CPUs are limited. If you get a bigger camera or a faster camera, you will overwhelm even a XEON monster with the data that it can produce. The cRIO is perfectly capable of processing images for this year's challenge, provided you use it appropriately.

A cRIO shouldn't crash doing image processing, and I'll hook mine up to see if I can reproduce it. You may want to verify that you have this year's cRIO image installed, and if you don't mind a few more experiments, can you change the two Boolean true's to false to see if one of those is responsible for it?

Greg McKaskle
Reply With Quote
  #4   Spotlight this post!  
Unread 21-01-2013, 20:17
team3039 team3039 is offline
Registered User
FRC #3039
 
Join Date: Jan 2013
Location: Destrehan, LA
Posts: 34
team3039 is an unknown quantity at this point
Re: Vision: IMAQ Area Filter crashes cRIO

We experienced tons of lag with cRio Vision Processing. I've successfully implemented the vision tracking code on the dashboard, and we get much cleaner readings and smoother tracking.
Reply With Quote
  #5   Spotlight this post!  
Unread 21-01-2013, 20:52
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,752
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: Vision: IMAQ Area Filter crashes cRIO

My point is not that cRIO is right and dashboard PC is wrong or vice-versa. The two are actually quite similar in how they work.

The key is to identify the strong and weak aspects of an approach. If you combine this with the ability to list alternate approaches, and you have powerful tools that will allow you to innovate and discover new and novel designs that are effective at solving a problem.

So, to play this game a bit. What would "ton of lag" mean? Do you have an idea what is causing the lag?

Greg McKaskle
Reply With Quote
  #6   Spotlight this post!  
Unread 18-02-2013, 22:05
nickcvet89 nickcvet89 is offline
Registered User
FRC #1228 (RoboTribe)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2003
Location: Rahway,NJ
Posts: 99
nickcvet89 will become famous soon enough
Send a message via AIM to nickcvet89
Re: Vision: IMAQ Area Filter crashes cRIO

Quote:
Originally Posted by tilky View Post
never ever do camera tracking on cRio, it is way to resource intensive. Instead, do it on driver station.
I'm was wondering, how would you camera track on the DS? Any info will help our team, because it is currently giving our team a lot of frustration with the CPU being overloaded.
__________________
Reply With Quote
  #7   Spotlight this post!  
Unread 19-02-2013, 04:27
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,752
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: Vision: IMAQ Area Filter crashes cRIO

The CPU usage is related to the pixels processed. If the image size goes down, the pixels drops by 4x. If the frame rate drops, the pixels drops linearly. So, if you want to process it on the cRIO, process fewer pixels in a given period of time.

If you want to process it on the DS, the initial LV example project has VIs for both the cRIO and the host computer. The example has a loop for getting the camera image, processing, and displaying it. Locate the similar code in the dashboard that just gets the image and displays, and merge in the processing code or the portion of it that you need.

To communicate results back to the robot, I'd suggest using SmartDashboard. Write the values in the dashboard vision loop and read them on the robot where you need them.

Greg McKaskle
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 22:09.

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