loading
 
Strange findings, any suggestions what to look for.
Dave from United States  [84 posts]
16 year
  This may be a little off topic but being I found the problem using RR I thought I'd post it.

Both computers are running WindowsXP, both are running the same program, and both are connected to the very same type of cam, Logitech Orbit MP

COMPUTER 1:

CPU................... 2 Ghz. Intel
Memory.............. 512 MB
Program............. RoboRealm
CPU usage........... About 37 to 50 percent
Memory used........ 11,592K

COMPUTER 2:

CPU.................. 2 Ghz. AMD
Memory............. 1 Gig
Program............ RoboRealm
CPU usage.......... About 10%
Memory used....... 21,288K

As you can see in the above the big difference in CPU usage and memory usage between the two computers, why? I can't figure that part out. If I click on the RR button "camera" RR still is using 40% to 40% of the CPU. If I click the "camera" button to "off" and click the "RUN" button to off, RR uses "0" CPU usage and 3,392K of RAM.
   If I have the RUN button turned "ON" and the "CAMERA" button "ON " and collapse the window to the task bar, RR then the CPU usage drops to 20% and uses 5,296K of memory.

In the above comparisons on the two computers is with RR running opened and showing on the screen.  Anytone have any ideas what to look into to correct this high CPU usage without have to shrink the program to the task bar? Hate not seeing whats going on.

Thanks,
Dave
Tyberius from United States  [8 posts] 16 year
What type of intel processor is it?

If we're talking about a Pentium 4 vs a later K7 AMD processor... the AMD's are much more efficient. They run higher IPC, and have shorter pipelines... so a 2ghz say Barton Core AMD will outperform by a good amount, a 2ghz pentium 4.

Ghz is not equal across different companies and models.
Dave from United States  [84 posts] 16 year
I kind of thought that from the start that it may be the way the CPU handles things. I have another program tunning right now which also server JPG images and it only uses 2% and spiking out at 10% CPU use. The way it looks I won't be able to use RR on this computer unless you are someone else has an idea? Maybe have to switch to an AMD CPU on this computer if the motherboard will accept it? This was bought like back in 2000-2001, or at least when the 2 Gig CPU came out. Even changing the CPU probably isn't such a good idea being you can buy a refurbished computer for as low as $299.00...... bummer! LOL!

Thanks again!
Dave

    
Processor
  Model  Intel Pentium 4 (0.18 µm)
Type  Primary Processor
Vendor  Intel Corporation
Family  Intel P4 Family
Hardcoded Name  Intel(R) Pentium(R) 4 CPU 2.00GHz
Frequency  1993 MHz
Family/Model/Stepping  15/1/2
Brand ID  8
Logical CPU Count  1
CL Flush  8
    

Detailed Info
  Address Bus Width  36 Bit
Core Details  126 µOPs, 48 Loads, 24 Stores In-Flight
Core Voltage  1.75 v
Data Bus Width  64 Bit
Execution Speed  Up to 6 µOPs/Cycle
Execution Units  Double-pumped ALU, FP Move/Store/FXCH, Double-pumped ALU,
    Slow ALU, FP Execute, Load, Store
First Introduction  February 20th, 2000
Floating Point  Integrated
I/O Voltage  1.75 v
Instruction Decoder  1x IA-32/Cycle
Instruction Set  IA-32
Maximum Power  100.0 w
Multimedia  MMX, SSE, SSE2
Multiprocessing  SMP, using integrated local xAPICs
Physical Memory  2^36 Bit (64 GB)
Pipeline Depth  20 Stages
Power Management  HLT, STPCLK, SMI/SMM, Sleep, Deep Sleep,
    Automatic Clock Throttling
Processor Core  RISC, Out-of-order and Speculative Execution
Processor Modes  Real, Protected, Virtual, Paging, SMM, Probe Mode
Registers  32 Bit Integer, 80 Bit FP, 64 Bit MM, 128 Bit SSE and SSE2
Split Voltage  Yes (Automatically determined via VID Pins)
Supported External Bus Speed  100, 133 MHz Quad-Pumped, AGTL+
Supported Multiplier  13.0x, 14.0x, ..., 24.0x
Technology  6M, 0.18 µm, CMOS
Transistors  +/- 42,000,000
Typical Power  48.9-71.8 w
Virtual Memory  65,528 GB (~64 TB)
Codename  A80528, Willamette
    

Cache Configuration
  L1 Code TLB  4 KB pages, 4-way set associative, 32 entries
    4 KB/4 MB/2 MB pages, fully associative, 64 entries
L1 Data Cache  8 KB size, 4-way set associative, 64 byte lines, sectored
L1 Data TLB  4 KB/4 MB pages, fully associative, 64 entries
L2 Cache  None
Trace L1 Cache  12 KµOPs, 8-way set associative
Unified L2 Cache  256 KB size, 8-way set associative, 64 byte lines, sectored
    

Processor Features
  Floating-point Unit on chip (FPU)  Yes
MMX Instructions (MMX)  Yes
MMX Instruction Extensions (MMX+)  No
3DNow! Instructions  No
3DNow! Instruction Extensions (3DNow!+)  No
Streaming SIMD Extensions (SSE)  Yes
Streaming SIMD Extensions 2 (SSE2)  Yes
Multiprocessor Capable  No
x86-64 Long Mode (LM)  No
Virtual Mode Extension (VME)  Yes
Debugging Extension (DE)  Yes
Page Size Extension (PSE)  Yes
Time Stamp Counter (TSC)  Yes
Model Specific Registers (MSR)  Yes
Physical Address Extension (PAE)  Yes
Machine Check Exception (MCE)  Yes
CMPXCHG8 Instruction (CX8)  Yes
On-chip APIC Hardware (APIC)  Yes
Fast System Call (SEP)  Yes
Memory Type Range Registers (MTRR)  Yes
Page Global Enable (PGE)  Yes
Machine Check Architecture (MCA)  Yes
Conditional Move Instruction (CMOV)  Yes
Page Attribute Table (PAT)  Yes
36-bit Page Size Extension (PSE36)  Yes
96-bit Processor Number (PSN)  No
CLFLUSH Instruction (CLFSH)  Yes
Debug Trace Store (DTS)  Yes
ACPI Supported (ACPI)  Yes
Fast Save and Restore (FXSR)  Yes
Self Snoop (SS)  Yes
Thermal Monitor Supported (TM)  Yes
IA-64 Processor Capable (IA-64)  No

Tyberius from United States  [8 posts] 16 year
An AMD processor will not work in an intel motherboard and vice versa, they use different chipsets and socket types entirely.

A long time ago, they were interchangeable, however we're talking 15 years ago :p
Anonymous 16 year
It will run fine!!!  Remember that RR has run on robots running 386 processors.  I have a bot that has a P1 233 that runs RR just fine for a wide variety of tasks.    If you get used to working a resource restricted environment, it will force you to think more carefully about your code, and encourage you to not use brute force solutions.

have fun!
Dave from United States  [84 posts] 16 year
Yes, it does run fine..... almost.  I not only have RR running on this computer but its also running Windows Media Encoder, a chat box server, a lot of times Windows media player, and I also use this computer a lot for checking email and on the web at time as I am now. The email and on the web is only now and then, not a constant thing as on one of the other computers.

   Although RR runs ok even using a lot of CPU, what happens after about a half hour or someone starts moving the camera around in about that same time, my fps drop from a set rate of 10 fps to 5 fps and the video becoms "choppy" or "jerky" at that point. The onkly way to get the fps back to 10 fps is to stop the program and start it again, so I have to do this every half hour at least. If it wasn't for the frame rate drop I wouldn't be that concerned about it. Of course when I first start RR and do other things on the computer the fps drops but comes back up, but once I hat that half hour mark things go down hill.
    The only reason I looked into this was because I was using another program I downloaded for this purpose (to control the cam) and I noticed the same thing going on with it, RR and the other program were the only two programs I have noticed that gave me that trouble, both are to control the pan/tilt of the cam. I had another program but I didn't use it long enough to see what it was doing... just didn't like it.
   I had RR and Windows Media Encoder going and decided to shut down Media Encoder and when I did RR jumped up to using 50% of the CPU and stay there or a little higher for as long as I was watching it, which wasn't very long at all. I just checked on my other computer where RR has been running for over 24 hours and at this moment I'm using VirtualDub to encode a video which VD is taking up about 98% of the CPU (which is to be expected) and RR is using 0 to 2% of the CPU. So at this pont I'm not sure what I'm going to do as of yet.

Thanks,
Dave
Anonymous 16 year
Dave,

in your analysis above are you just running RR without any processing (as in just using it for preview)? If not can you include the robofile that you are using? If you are using one try seeing if running the robofile is causing the slowdown. If not and RR is causing that high of a load without really doing any processing then you appear to have a DirectX issue. You may want to verify that you have the most recent copy.

Another thing to try is to hide RR's window by overlapping another window (say a browser) ontop of it. What happens to the CPU then? If it increases you have a video display issue. If not then something else may be going on.

STeven.
Dave from United States  [84 posts] 16 year
Hi STeven!

   Well I was pretty glad just to get things running without using a lot of the CPU. Yesterday I had RR running on the other computer for over 24 hours and the CPU usage stayed fairly low with the settings I had which were set at 5 fps and preview at 1 fps. I stopped by your website this morning and seen this post (I think my email server was down for awhile). After reading your post I thoght I'd try someting different
  I increased the frame rate to 10 fps which seems to be working ok thus far and RR is only using 4% to 9% of the CPU. What I see going on is when I change the "preview" from 1 fps back to "0" RR then jump from about 27+% up to as high as 40% CPU usage. I again just now switched to 1 fps and the CPU usage went back down to 4% to 9%. So for today and tonight I'm going to let it run and see if the CPU usage stays low.

   I also increased the frame rate right now to 30 fps.  I'm showing anywhere from 28 fps to 30 fps in the RR window. My CPU usage went up to anywhere from 10% to as high as 30% but mostly staying in the around 17% At this setting and turning the "preview" from 1 fps to "0" again my CPU usage went up to 40% as high as 55%. Again setting the fps to 10 and the "preview" to 1 fps the CPU usage again dropped to 4% to 7%.

  This being the case, I can deal without any problems of 10 fps and a preview of 1 fps, and a CPU load of 4 to 7 percent. So I'll let it run the rst of the day and tonight and check things tomorrow morning to see if the CPU usage is still low.
I also tried covering the preview window which had no effect on the CPU usage. Below is the Robofile that is being used on both computers.

<head><version>1.8.6.0</version></head>
<Display_DateTime>
  <custom_format>MM/DD/YYYY HH:MI:SS PM</custom_format>
  <position>8</position>
  <format>2</format>
  <border_color>6</border_color>
  <font_size>2</font_size>
</Display_DateTime>
<Logitech_Orbit>
  <move_map>move</move_map>
</Logitech_Orbit>
<VBScript_Program>
  <script>move = GetVariable("move")

if move then

   if GetVariable("LAST_CHECK") = "0" then

     SetVariable "LAST_CHECK", Timer()

  else

    if Timer() - GetVariable("LAST_CHECK") > .5 then

      SetVariable "move", 0

      SetVariable "LAST_CHECK", 0

    end if

  end if



end if

</script>
  <source_mode>gui</source_mode>
</VBScript_Program>

I see the ">" in the file which I don't know what that is. What I do know is I get kind of the same thing on my webpage on one of the buttons and if I remove it, the one button won't work. On this script I don't know what would happen if I removed it. I just took a look at the script on RR using the edit button and my guess that ">" is the ">" sign?

Just took another look quick before leaving... still running at 0% to 9% CPU usage, at 10 fps and 1 fps on the "preview" setting.

Thanks,
Dave
Dave from United States  [84 posts] 16 year
Hahaha..... the ">" must have been the code for it being the code on my post is showing the ">" sign and not the code.
Anonymous 16 year
Dave,

Thanks for the analysis. Seems that something is an issue with the video display system on your computer. We get a similar effect if we run RR over Remote Desktop due to network lag, etc. But I guess you'll have to sit tight with the current configuration as that appears to be the best that your system can do.

Yes, the less than sign needs to be escaped in the robofile as XML requires that certain symbols like less than or greater than need to be escaped when included in an XML tag ... but when posting them on the web page directly they get unescaped and appear as you would expect. That's why we have the post ability below the message box to allow users to upload robofiles correctly. :-)

STeven.
Dave from United States  [84 posts] 16 year
Another thing to try is to hide RR's window by overlapping another window (say a browser) ontop of it. What happens to the CPU then? If it increases you have a video display issue. If not then something else may be going on.

STeven.

*****************
Hi STeven,

   I'm not really sure what you are saying in the above statement? I made some more changes and I do notice now that if I set the "Preview" to "0" now and cover the preview window with another window (task manager), the CPU load drops from on average 20% down to about 6% average. What's this telling you, being I don't know what covering the RR preview window and the CPU load goes down means?
   In other words when covering RR window and the CPU usage drops it must mean something right? But I don't know what. I also notice that covering Windows Media Encoder window has no effect on the CPU usage.

Thanks,
Dave

  
Anonymous 16 year
Dave,

When you cover the window that tells the OS not to update any part of that window and thus it does not need to draw the image on the screen. This is a test that will indicate that your CPU is spending a lot of time dealing with just drawing the image as apposed to processing it. In this case you may want to check that you have the most recent version of DirectX installed and if that is the case you may want to consider upgrading your graphics card (or increase its memory) or try decreasing your screen resolution (which gives slower graphics cards less to do).

Note that you should test your machine with another graphics card before you actually purchase one just to see if that is really the reason. Hopefully it is just a DirectX (software) only issue.

STeven.
Dave from United States  [84 posts] 16 year
Hi STeven!

   Thanks again for all the help and info! What I'm using for my video display is an ATI All-In-Wonder. This controls the monitor display as well as the display for Windows Media Encoder. The ATI has 32 MB of RAM on it and decreasing the resolution did help the CPU usage some. My display is set at 1152x864 and the more I droped it the less CPU was used but everything got so big on the screen.

Ok, the good news. Right now RR is running at 10 fps and the "preview" is set to "0" and the screen set to 1152x864 and the CPU usage is down to on average 10% or less most of the time, though it does go up when I connect to the cam from another computer to aroud the high 20+ percent.

I still question why on one computer, the one with more memory RR uses 29,200k, and the computer with less memory it uses12,526K What I thinking, though I could be wrong.... is that most of the RR program and what it does is being done up in the memory with the computer with the most memory, thus more memory is used.
   In the computer with less memory (half as much as the other computer) everthing that RR does as well as Windows Media Encoder doing its processing, there just isn't enough memory to handle everything in memory so its swapping it to and reading it from the harddrive. After looking around in the BIOS I noticed that the harddrive was set the DMA and I changed it to Ultra DMA and the CPU usage came down which kind of makes sence to me being the CPU would be working trying to control everything and do the swapping with a slower harddrive. Once the harddrive was changed to Ultra DMA it could swap to the harddrive a lot faster, thus using less CPU. Again, thats just my guess but since I made this change the preview is set to "0" and the fps is set to 10 and I'm still below the 10% CPU usage. So I think my next step will be increasing the memory before to long.

Thanks again!
Dave
Anonymous 16 year
Dave,

Yes, that does seem to make sense. Swapping to hard drive will really slow down a machine. Most people think that to make one's machine go quicker you need a faster CPU, sometimes however, simply adding more memory will really improve things.

At 32Meg it sounds like your video card should have enough memory, but based on your findings it sounds like your main memory is what is lacking.

Not sure why RR would use more memory in one machine that the other ... we do agree with your reasoning in that the OS will try to swap out part of the program if it does not have enough space in main memory but are not 100% sure that this is the reasoning. OS optimization is a little out of our domain. Nevertheless, testing with additional main memory added might be worthwhile.

STeven.
Dave from United States  [84 posts] 16 year
Hi STeven!

   And let me say thanks!  I got up this morning and thought about my last post and thought you or others probably think I'm nuts. But still, after making that change from DMA to Ultra DMA, RR this morning is still using less then 10% of the CPU and the frame rate is churning out 10 fps and not dropping to 5 fps over time and the "priview" is still set to "0".
   The only reason I even mention this is the fact someone else may be having troubles and they might want to look into this. I first noticed this on a computer when a program was was doing some processing by reading from a file, processing it, then writing it to the harddrive. It was always prettt fast and at this same time I was messing with other programs (installing and removing) and the next time I used the one program it seemed to be really slow???
   After doing some looking around I seen the harddrive transfer mode was set at PIO, which I changed back to Ultra DMA and things were back to normal. Why would a program change this I don't know.
   Sometimes I post my findings and afterwords I wonder if I sound or made a complete idiot out of myself, and this is what I thought when I posted my last post this morning. Did changing DMA to Ultra DMA really make that much of a difference? Well it must have being that was the only change I made and its still running smoothly with low CPU usage.
   Sometime hopefully not to long from now I will increase the memory from 512 MB to 1 Gig, which anyone know is probably one of the biggest improvements to get better performance out of a computer. When I do this I'll be back around to let you know what the results are.

There is no need to reply to this, it more or less just a comment and to let others know if they are have troubles this could be another thing to look into.

Thanks again!
Dave
from United States  [214 posts] 16 year
Hello,

I have followed this thread with interest because I'd like to have a better understanding of the CPU load I should expect from different .robo files.

I have a 1 GHz AMD HP Pavillion with 3 Gb RAM and an ATI Radeon Express video card--not sure how much RAM but the ad said "128 Mb shared video memory (UMA)".

I have attached a .robo file that I am using to track a big red medicine ball.  I have two webcams for comparison.  The first is a Creative Labs Live! Cam (the one with the wide FOV--about 80 degrees).  I have all the automatic settings turned off and the exposure turned all the way down to "1" so I can better control the frame rate within RoboRealm.  The other camera is a Logitech Quickcam 5000, also with all the automatic settings turned off.

Within RoboRealm, my settings are no preview (box unchecked), max processing FPS set to 15 and a resolution of 320x240.   When running my .robo file,  RoboRealm uses 60% CPU with the Creative Labs webcam and gets about 12.5 fps according to the RR status bar.  When using the Logitech Quickcam,  CPU usage drops to 50% and FPS drops to about 8.5.

At this point I am just asking, are these the kind of numbers I should expect?  I'm eventually going to run RR on a mini-ITX (1.2 GHz, 1 Gb RAM) onboard my robot so I'm trying to get a sense of the CPU demands under various visual tasks.

Thanks!
patrick

program.robo
from United States  [214 posts] 16 year
Correction--my machine is rated at 2.2 GHz.

--patrick

Dave from United States  [84 posts] 16 year
Hi Patrick!

   I'm sure STeven can tell you a lot more then I can about this, but I'm thinking it's not RR itself that decides what you can expect in fps and CPU load. There seems to be so many variables that if you are getting low fps or high CPU usage they system or devices have to be "tweeked" to get the best possible performance. What you have to tweek is hard to tell being each system is different, meaning different computers, CPU's what programs you are running, whats being loade up into memory when your computer starts, etc.
   In my case I probably reached the limit of what RR can do on the one computer being it has an old Pentium 4  2 Ghz CPU (8 years old). But as of now things seem to be running pretty good with RR now running at 10% CPU usage or less. Probably my only other option is to increase my memory from 512 MB to 1 gig. I think even this will have a limit to what increase I'll have being the old Pentium 4 only supports a BUS speed of 133 Mhz, far below the speed of the new BUS speeds and memory chips of today.
   Yeasterday I tried RR on my notbook with a Phlips SPC 900 webcam. the fps was 50 fps and the CPU usage was 2%, but the notbook has a AMD Turion 64x2 CPU running at 1.9 Mhz, and it has 2 Gigs of RAM.
   In my opinion, I'd suggest different settings on your camera, etc. For instance on this computer I on right now which is also running RR, I just took a look and it using 2% CPU usage at 10 fps. This is using the Logitech Orbit MP webcam. This camera has a setting called "Low Light Boost", if I turn that on, my CPU usage stays the same but my fps drop from 10 fps down to 5 fps, thats half as much with the low light boost turned off. This is why I say probably the best thing to do is try and expirement with different settings to see which setting works best for you.
  It just seems to me that it doesn't matter what computer you install RR on, people are going to find that because of all the variables involved, RR will use less or more percentage of the CPU as well as memory. I also think this holds true for the camera, etc., that RR is controling. Different setting on the camera will effect the way RR can process the images in fps.

  I could be way off base here..... but thats my two cents worth! :-)

from United States  [214 posts] 16 year
Hi Dave,

Many thanks for your reply.  What you say makes sense.  I tried RoboRealm on two other machines at work, both in the 2 GHz P4 range, and processing was flying at 30 fps using a Logitech Quickcam fusion.  Now I have to go home and figure out what's wrong with my own machine (which is what I'm actually using for my project).  I'm lucky to get 8-12 fps on that machine even though it's even more powerful than one of these machines that just tested fine.

BTW, I assume that the graphics card really shouldn't affect performance right?  I mean, assuming you have preview turned off, isn't RR processing the video stream directly from the webcam, which doesn't depend on the machine's video card?  (Let's assume you have all other applications closed so that RR is the only program running, and let's even minimize it to the taskbar.)

Thanks,
patrick
Anonymous 16 year
pirobot,

From what we are aware of the graphics card should not inhibit the performance when the preview mode is turned off. One thing to always verify that with no modules running you get about 30 fps. I.e. untoggle the run button. If the FPS is not around 30 fps then check that you have the most recent version of directX and that RR is selected to use the directX version of  the camera. If the camera is listed twice in the camera dropdown in the Options dialog be sure to select the first ... sometimes it shows twice, once for DirectX and the other for VFW. VFW is quite a bit slower than DirectX.

STeven.
from United States  [214 posts] 16 year
Hi STeven,

Thanks for your followup.  I think I now have things working more or less OK.  However, I have a couple of remaining questions about CPU load and video interfaces (directX versus VFW).

On my test setup (2.2 GHz single-core HP AMD with 3 Gb RAM running WinXP) I have a Creative Labs Live! Cam Voice with the latest driver installed I also reinstalled the latest version of directX just to be sure.  Then I rebooted four or five times just for good luck. :)  

Using the native Creative Labs control panel for the webcam, I turned off all the auto adjustment and move the exposure slider all the way down (lowest value is 1) so as to get a barely visible image--this gives me the highest frame rate in RR.  (I then use the intensity equalizer checkbox in the Color Balance module to brighten the image and restore color).

Now I fire up RR.  As you mentioned, there are two video choices for the Creative Labs webcam, the second one says (VFW) after it.  There is one choice for a Logitech Quickcam I also have attached, and there is also an option for "Microsoft WDM Image Capture Win32".  In the RR options I have preview off, video format 320x160 and no restriction on processing frame rate (set to 0).

Here is what I get for FPS, RR CPU, and System CPU for the two Creative webcam video choices and my "track orance ball" robo file (attached).

Creative Labs directX:

run off, camera off: FPS N/A, RR 0%, System 1%
run off, camera on: FPS 26, RR 4%, System 35%
run on, camera on: FPS 19, RR 80%, System 20%

Create Labs VFW:

run off, camera off: FPS N/A, RR 0%, System 1%
run off, camera on: FPS 98(???), RR 10%, System 40%
run on, camera on: FPS 17, RR 80%, System 15%

My main question at this point is: should RR be using this much CPU for the .robo file I am using and on such a relatively powerful machine?  Also, should there be such a little difference between the directX and VFW video choices?  I'm guessing this depends on the Creative Labs drivers.

Thanks again!
patrick

program.robo
Dave from United States  [84 posts] 16 year
Hi Patrick!

They kind of look like my old numbers! The highest I seen was 55% but not constant, just "peaks".  Right now RR on the old computer with the old Intel 2 Gig CPU and 512 mb of RAM, its using about 10% of the CPU, sometimes a little more, and other times a little less. This is running at 10 fps. I was wondering if whatever you are doing do you need such a high frame rate?
  I just changed my frame rate to 30 fps and the results I got is this:

Set fps 30,  Actual fps about 22 fps.

CPU usage aprox. 25% (more or less).

Of course I don't need that fast of fps so 10 fps is more then enough for me. Being someone with a slow (dial up) connection will never see 10 fps.

The other question is what is your harddrive set to? It might seem like a dumb question but I have expirenced at lest one program I ran caused this to change, why, I don't know, but it might be worth looking into.

If you open the "control panel", click on the "system" icon, then on the "hardware" tab, the "device manager",  you will see a list of devices on your computer.  If you look in the "IDE ATA/ATAPI controllers" it will probably expand and you will see some "IDE Channels". If you highlight these and "right click" on it the select "properties", it will tell you a little about it. "click" on the "Advance Settings" tab and you will see a line that say's "transfer mode". Be sure in the box this is set to "DMA" or Ultra DMA, or maybe "DMA if available".   If its set to PIO, change it and recheck you findings.

   This was the change I made that "cured" my problem.  Although it might not seem like much, but when the computer is on, the harddrive is still running doing things. I'm sure you sat at the computer really doing nothing when you seen the harddrive light blinking away telling you the harddrive is doing something... but what?

My whole point here is thatwvewr the harddrive is doing, be it just moving stuff around on the drive, writing or reading from the drive into or out of memory, its taking up time. If the above setting is set to PIO this will slow everything down and things become "bottle necked" waiting to be written or read from the harddrive.

If nothing else it won't hurt to take a peek at these settings. Of course you probably knew this and have already checked it, but maybe someone else might find it useful to check this setting.

Dave
from United States  [214 posts] 16 year
Hi Dave,

Many thanks for your suggestion.  I checked my IDE settings and they are already set to "DMA if available".  Furthermore, I see no disk activity when I run my program.  With 3 Gb RAM, the program appears to run entirely in RAM.

I'm more concerned with getting high FPS rates than I am with the CPU loads.  The reason I need high FPS is that I am using RoboRealm to process the video on my mobile robot.  In particular, I am using the RR API to have my robot track a moving object.  To keep the moving object in the center of the robot's field of view, I need the highest frame rate I can get--otherwise the object moves out the field of view before the next frame and the robot loses sight of the object.

In the meantime, I lowered the video resolution to 160x120 which is perfectly adequate for my tracking task (the object is a big orange medicine ball), and this allows me to get nominal frame rates of 50 FPS (at least that is what is reported in the RR status line).  More importantly, the robot can now track moderately fast motion of the target ball--not as high as I'd like, but not bad for a start.

--patrick
Anonymous 16 year
patrick,

To possibly further increase the rate in which you track the ball would be to do a little averaging on the last known positions of the ball. Even humans have a limit on how fast they can actually see something (that's the reason TV's even work) and from there will extrapolate the position based on last know positions. A simple equation may allow you to predict approximately where the ball should be and can move the robot's attention to that place to do further checking. We've not searched the web for this technique but I imagine it should be readily available.

STeven.
from United States  [214 posts] 16 year
Hi STeven,

Thanks for the idea--great minds think alike! :)  Some time ago I started looking at Kalman filters for exactly this purpose.  Then it occurred to me that this might be overkill and all I really need is an estimate of the target's velocity from the last two or three frames.  I already have this coded in my program but I haven't tried it out yet with RR and the robot.  I wanted first to see how far I could get by tracking the COG using a simple "bang bang" algorithm.  By setting the servo update frequency to the same as the video frame rate (about 30 fps), I've got some really nice tracking for moderate target speeds.  Next I'll try throwing in velocity estimation and see how it goes.

Thanks!
patrick
Anonymous 16 year
pirobot,

Sounds like you're on the right track. Let us know how it goes and what filter you end up using. The Kalman stuff is the industry standard (somewhat) for this kind of thing but other simpler filters should work out too.

STeven.

This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index