loading
 
Reduce CPU Usage.
Billy from United States  [26 posts]
15 year
Is there a way to reduce CPU usage, or slow the pipeline down?  I'm not using the video features all the time, but, wish to keep RoboRealm loaded..  I have a large IF THEN statement to turn on and off the things I'm going to use, but, If I turn the Camera off to reduce load, (Kernel load), RoboRealm just ends up using what that saved on CPU.

Thanks, Billy
Anonymous 15 year
Ok, so try using (C++ API)

rr.setCamera("off");
rr.run("off");

to stop the load and

rr.setCamera("on");
rr.run("on");

to switch it back on.

Or you can telnet directly to port 6060 and issue the following XML commands:

<request><run>off</run></request><request><set_camera>off</set_camera></request>

<request><run>on</run></request><request><set_camera>on</set_camera></request>

to stop and start the system again.

That seemed to zero out the processor load for us. Let us know if that works for you.

STeven.

Billy from United States  [26 posts] 15 year
OKay, here is the strange thing.. I have it working on turning the camera on / off..  However.. If I start RoboRealm up, and leave the camera on, then turn it off / on via the software.. CPU is still high, and the light on the logitech orbit is still lit (however the image processing DOES stop).  However, if I start roborealm up, then toggle the camera off.. and then toggle it on / off via the API, the light will go on and off, and the cpu load reacts accordingly. It's almost as if I have to turn the Camera off first via the GUI, otherwise, the SetCamera option only turns on processing, and doesn't turn the camera off completely, thus, it's still sending data to the USB port, and eating up system resources.  I even tried using the SetCamera with the name of the Camera first, but that didn't work either.

Thanks, Billy
Anonymous 15 year
Billy,

We've tried every which way to replicate this but have not been able to. Can you post here what API calls you are using? We just were using telnet and the above XML sequence to turn things off and the orbit camera's light does go off when issuing that sequence. So something else must be keeping it alive.

Note that the API call simulates a button press on the Camera button so the code is very much the same as when you actually press it. Perhaps something strange is going on within the API itself that we have not noticed.

Thanks,
STeven.
Billy from United States  [26 posts] 15 year
OKay, I just tried this via telnet.. and crashed RR after running this twice..

<request><set_camera>off</set_camera></request>
<request><set_camera>on</set_camera></request>
<request><set_camera>on</set_camera></request>
<request><set_camera>off</set_camera></request>

Notice I try to turn the camera on twice..  Now, this isn't the same bug I don't think, but.. it's strange.  

This is a test python program I'm running.. with strange results..

import RoboRealm.api
camera = "QuickCam Orbit/Sphere AF"
rr = RoboRealm.api.RR_API()    # initialize the API class
rr.Connect("localhost")        #connect to RoboRealm
rr.SetCamera(camera)
rr.SetCamera("off")
rr.Run("on")
rr.Run("off")

Thanks, Billy
Anonymous 15 year
Billy,

Thanks for the py script. That helped to debug. Can you download the most recent version of RR and see if you still get this crashing behavior?

Thanks,
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