|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
Re: Is the crio powerful enough?
Quote:
|
|
#17
|
|||
|
|||
|
Re: Is the crio powerful enough?
The cRIO is powerful enough so that a few trig functions make absolutely no difference. We used a couple dozen of them for our drive routine with no noticeable slow-down at all. Using them in the vision routine should be no different. The main thing that will be slow is image processing, which is mostly affected by the camera resolution.
In addition, I imagine that the existing trig functions are already highly optimized for real-time applications, as that's what the cRIO is for. The cRIO has a floating point processor, so that should work pretty well. Also, in my experience, one camera is good enough for range finding, provided you know the physical dimensions of the target, which has been the case in the last few games. |
|
#18
|
|||
|
|||
|
Re: Is the crio powerful enough?
This conversation is focusing way too much on the cost of the trig functions, compared to the cost of the vision functions. Trig is a lot more expensive than addition and subtraction, but trivial compared to vision.
|
|
#19
|
||||
|
||||
|
Re: Is the crio powerful enough?
In summary:
Yes, the cRIO is powerful enough for trig functions. No, the cRIO is not powerful enough for stereo image processing at 60hz, without reprogramming the FPGA. |
|
#20
|
||||
|
||||
|
Re: Is the crio powerful enough?
On a 3.4GHz Pentium D, the sin() function is about 3 times slower than a 3rd degree polynomial approximation.
But since we're only talking 0.3 microseconds for the sin() function, it's not to worry. Anybody have numbers for the cRIO, just curious? |
|
#21
|
|
Re: Is the crio powerful enough?
Which vision target are you designing for?
Green light (2005 - 2007) / Pink and green (2009) Concentric ellipses If it is the first one then the cRio might be able to process it. The thresholding operations take much less processing power. Are you trying to use stereoscopic vision techniques, or just triangulation? |
|
#22
|
|||
|
|||
|
Re: Is the crio powerful enough?
Quote:
How did you measure 0.3 microseconds? I recently wrote a sin function that runs in ~0.7 microseconds on an 80MHz Arm Cortex-M3, with comparable accuracy. |
|
#23
|
|||
|
|||
|
Re: Is the crio powerful enough?
Quote:
|
|
#24
|
||||
|
||||
|
Re: Is the crio powerful enough?
you don't, you just perform the same operation a few million times and divide.
![]() |
|
#25
|
||||
|
||||
|
Re: Is the crio powerful enough?
Quote:
Just in case, I used a random-number generator. (This prevents LabVIEW from compiling the results as constants in the program) ![]() It took about 0.000492ms per iteration of the sine function, measured over a million iterations. To put it on the same scale as Ether's measurement, that's 0.5 microseconds. Last edited by kamocat : 05-08-2010 at 01:52. |
|
#26
|
|
Re: Is the crio powerful enough?
Like what was said previously, the trig is not going to be a problem instead its the vision proc.
The triangulation tracking won't take much more processing then 2 *(current load for 1 camera + pointing). However, a 3d disparity map for stereo optics will take the load of the previous as well as the load of the calculations to make the map and then find a target and distance. Here is a whitepaper on stereo optics http://www.cse.unr.edu/~bebis/CS791E...ereoCamera.pdf |
|
#27
|
|||
|
|||
|
Re: Is the crio powerful enough?
Quote:
32 bits x 32 bits = 32 bits is always one cycle 32b x 32b = 64b takes 3 cycles if the result is small 32b x 32b = 64b takes 5 cycles if the result is big Also, it is relatively common for functions to bail early for special values, such as 0. For example, my sine function bails in less than half of the usual execution time if the input is a multiple of 45 degrees. Quote:
|
|
#28
|
|||
|
|||
|
Re: Is the crio powerful enough?
I was not very aware of FPGAs, so I read up on them; essentially FPGAs are processors that are highly customizable to fit specific functions? So do FPGAs need to be configured hardwarely before it can be programmed? Is the cRio a type of FPGA? If not, which FPGA is a suitable FPGA for the purpose of image processing? Also would the FPGAs be used primarily to capture the images or process the images? Regarding cameras, would they need to be directly communicating with the FPGA, like the middle man, or would the cameras be communicating with the cRio? If the cameras were to be communicating with the cRio, would a Ethernet network cable splitter suffice? Would the cameras show up as two separate cameras or would the set up just fail?
|
|
#29
|
||||
|
||||
|
Re: Is the crio powerful enough?
An FPGA is not a processor. It does not have to work with only four bytes at a time. It doesn't have to grab data from a register, manipulate it, and then put it somewhere else in memory; it can just process the data continuously. It runs in parallel, like analog hardware. Think of it as a million operational amplifiers you can connect in whatever pattern you like, but instead of having to remanufacture it each time, you can reconfigure it electronically. In truth, it actually loads its configuration from non-volatile memory each time it is turned on, as opposed to it being burned in like a CD.
On the cRIO, there is a processor and an FPGA. I'm not sure about the ethernet or RS232, but I know that every one of the eight modules goes through the FPGA to get to the processor. For example, a small part of our FPGA is programmed as an accumulator for the gyro, to integrate degrees/second into absolute degrees. The FPGA is also used to improve the performance of the processor by acquiring data so that interrupts are rarely necessary; when the processor requests an input, the data is right there. Now, as to how to get access to the FPGA: We aren't given the LabVIEW FPGA module in FRC. That's because
When you'd like to use the cRIO for FIRST again, you will have to re-image. Last edited by kamocat : 05-08-2010 at 20:02. Reason: spellcheck |
|
#30
|
||||
|
||||
|
Re: Is the crio powerful enough?
First thing I did was to make a FreeDOS boot disk and boot that so I could access the hardware directly. Then I programmed the 8254 PIT to time 100 calcs of each (plus an empty loop so I could subtract out overhead).
~ |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reimaging the cRio Issues there are no cRio devices on the subnet | Stuart | FRC Control System | 2 | 25-02-2009 23:41 |
| 617 IN THE LIMELIGHT (Close Enough) | bsmmoney | Chit-Chat | 0 | 08-03-2008 00:01 |
| pic: The gearbox that makes us so powerful | keenanmolner | Robot Showcase | 6 | 20-02-2007 02:11 |
| The end of mindstorms - no smiley face sad enough | Eric Reed | FIRST Lego League | 20 | 15-01-2004 16:00 |
| Enough with the bumpers! | archiver | 2000 | 2 | 23-06-2002 22:32 |