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!
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.
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.
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?
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
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