Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Vision runs only once! (http://www.chiefdelphi.com/forums/showthread.php?t=102992)

gaurav.agashe 16-02-2012 12:46

Vision runs only once!
 
When I click on "Enable Vision" in Robot Main.vi, the cRIO processes the camera image and outputs a 2D array in VisionProcessing.vi that gives me the co-ordinates (in pixels) of the rectangle. I then shut off the "Enable Vision" button.

When I move the robot closer to the net and click on "Enable Vision" again, nothing changes! The image viewer block I have wired to the Img Out does not change, and the values in the measurements-array to not change either!

It's as if our vision runs only once, and thats it. Please view attached screenshot of VI. Any help is much appreciated!! Thanks!

http://www.chiefdelphi.com/forums/at...4&d=1329243121

Greg McKaskle 16-02-2012 20:56

Re: Vision runs only once!
 
How often are you leaving the camera off? I filed a bug tracker awhile back that may relate to this. When the camera is disabled, it stops reading from the stream. At some point, perhaps ten or fifteen seconds later, the camera seems to close the connection, and the MJPEG code doesn't handle this error 66.

Please let me know if there seems to be another way to provoke this.

Greg McKaskle

Peter Randall 16-02-2012 23:26

Re: Vision runs only once!
 
I ran into this as well tonight. I wanted to turn off vision processing when I didn't need it. If I turn it back on immediately, it picks up fine. But if I leave it off for a while, 15+ seconds, it won't restart. Seems buggy to me.

:confused:

gaurav.agashe 17-02-2012 09:46

Re: Vision runs only once!
 
2 Attachment(s)
Quote:

Originally Posted by Peter Randall (Post 1128512)
I ran into this as well tonight. I wanted to turn off vision processing when I didn't need it. If I turn it back on immediately, it picks up fine. But if I leave it off for a while, 15+ seconds, it won't restart. Seems buggy to me.

:confused:

This is exactly what is happening to us! Our current logic is in the attached screenshot: Vision_noArea.JPG


Also, the area-particle-filter block makes the cRIO crash as soon as i Enable Vision. I have removed the filtering block for the time being. The VI I was using that was causing this is in the attachment Vision_withArea.JPG. Is my syntax/layout of the IMAQ particle filter horribly wrong to cause this crash?

Greg McKaskle 17-02-2012 15:03

Re: Vision runs only once!
 
1 Attachment(s)
What controller are you running the vision code on? 8 or 4?

For the bug fix, I'm not in a situation where I can fully test the attached VI, but it should deal with the error when the camera shuts down the stream. Rename the file shown below and put the attached file one in its place.

Program Files\National Instruments\LabVIEW 2011\vi.lib\Rock Robotics\WPI\Camera\WPI_CameraRead MJPGString.vi

Please let me know if this corrects the issue and we will get this on the NI site.
Greg McKaskle

TheSochenOne 18-02-2012 21:46

Re: Vision runs only once!
 
the exact same thing happened to me yesterday. we are using an almost identical vision processing algorithm.
I tried the fix you suggested and it doesn't seem to fix the problem

Greg McKaskle 18-02-2012 22:10

Re: Vision runs only once!
 
Can you describe exactly what you are doing, the symptoms, and what you've tried to fix it.

Greg McKaskle


All times are GMT -5. The time now is 17:49.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi