|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
camera / vision system too laggy
DISCLAIMER: I am a mechanical engineer, and a mechanical mentor for the team. If I say something stupid about programming / computers, chalk it up to that.
Since we got the control system early, we decided to play around with programming. We mounted the system on a practice chassis and tried many different things. Using Labview turned out to be very easy once you get the hang of it. What we did find though, was that the vision system (at least through Labview) was very laggy. It was at least 1/2 to 1 second behind reality at all times. As is, this would be useless for controlling a launcher. Has anyone found a way around this limitation? |
|
#2
|
|||
|
|||
|
Re: camera / vision system too laggy
Try using the dashboard to watch the video stream, rather than a VI's front panel or a probe.
|
|
#3
|
|||||
|
|||||
|
Re: camera / vision system too laggy
What you're seeing is delayed between getting from the robot to the laptop you're programming from. The actual robot controller "sees" what you see before it bothers sending the picture over to the laptop.
|
|
#4
|
||||
|
||||
|
Re: camera / vision system too laggy
Quote:
One thing I'm not sure about is the burn vs. debug mode. We started with the basic robot project for learning purposes, and there is a known bug that will not allow you to build this project to the cRIO, but only run it in "debug" mode. I was under the impression that the only difference is persistence through a power cycle, but I am not certain. Can this affect the speed at which it runs? |
|
#5
|
|||
|
|||
|
Re: camera / vision system too laggy
Quote:
My theory is that this is entirely a problem with the camera's data rate, which is dependent on how much it can compress the frame. If the camera is watching a mostly stationary scene (like most webcams and security cameras are designed to do), it will perform ok. If the camera moves much at all, expect a painfully low frame rate. |
|
#6
|
|||
|
|||
|
Re: camera / vision system too laggy
Quote:
One option is to build & deploy the code as an application, alternatively you can close unneeded front panels. |
|
#7
|
||||||
|
||||||
|
Re: camera / vision system too laggy
Quote:
You can further optimize it by decreasing the resolution of the camera and/or decimating the camera image prior to processing. Running in debug mode does slow down the processor, and if you have many front panels open it can do so significantly. |
|
#8
|
|||
|
|||
|
Re: camera / vision system too laggy
Camera lag will always be there, but you can make it much much smaller than what you are describing. If you open and run the vision demos, you will see lag when you are viewing the entire image via the debugging tools, but it isn't 1/2 sec. If you switch it to show the mask the lag will be far smaller.
A better measure of the lag and aiming ability is to open the servo camera example. Since it is already controlling something, you can turn off most or all of the UI displays and get a better feel for the ability for it to respond. Again, the lag is still there, it always will be, but it is pretty small at that point. You don't mention much about the setup that was producing lots of lag. Just a guess, but 640x480 images, especially if decoded and displayed on the cRIO will have pretty substantial lag. Greg McKaskle |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| stereo vision system with OV7620 | steveg | Programming | 3 | 04-05-2006 12:40 |
| vision camera | Adama | Programming | 3 | 19-01-2006 17:12 |
| Camera Vision Range | Muhnki | Programming | 7 | 05-02-2005 23:26 |
| Camera Vision Range | Muhnki | Programming | 7 | 05-02-2005 23:26 |
| Vision System Guide? | Bridgette | Electrical | 1 | 08-01-2005 19:03 |