Go to Post We can help make those dreams, maybe. ;) - Adare180 [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 28-02-2010, 20:10
SuperBK's Avatar
SuperBK SuperBK is offline
Registered User
AKA: BrianK
FRC #1225 (Amperage Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2006
Location: Henersonville, NC
Posts: 357
SuperBK is just really niceSuperBK is just really niceSuperBK is just really niceSuperBK is just really nice
Name of camera task

Hi. Got the camera to the dashboard to work this weekend. Woohoo!

It has around a 2.5 second lag, is this normal, good or bad. I set it to 160 x 120 and tried setting max frames per second to 15. Setting FPS didn't seem to change the lag.

I noticed that if you kill the robot code, the camera still appears on the dashboard because there is a separte camera task for it. What is this task called? It seems that when a new program is run (in memory for fast debugging) and the camera task is already running, then it won't reinitialize the camera, plus it sometimes dies with a kernal exemption. Is there a way to stop the camera task from code?

Thanks,
Brian
__________________
Brian K
Team 1225 Robotics Mentor
Reply With Quote
  #2   Spotlight this post!  
Unread 01-03-2010, 06:35
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Name of camera task

At the moment, no. You will need to modify WPIlib: (From AxisCamera.cpp)
Code:
// TODO: Keep track of this so it can be shut down!
new PCVideoServer();
But to answer your question, FRC_cameraTask and FRC_PCVideoServer

2.5 seconds is bad, did you update the driverstation to 1.1, cRIO to v20 and WPILib to 4.3?
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #3   Spotlight this post!  
Unread 01-03-2010, 08:30
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Name of camera task

I believe there is something to the effect of a DeleteInstance() function in wpi lib i'm not completely sure of its effects though. I do know that stoping cameras with it didn't seem to work out too well, and without source infront of me i can't say much else on it.

as for lag, try decreasing color depth or setting a moderate amount of compression (we use 50).

are you running any image processing? it can slow things down quite a bit.

let us know how it goes
Reply With Quote
  #4   Spotlight this post!  
Unread 01-03-2010, 14:51
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: Name of camera task

Quote:
Originally Posted by Zme View Post
I believe there is something to the effect of a DeleteInstance() function in wpi lib i'm not completely sure of its effects though. I do know that stoping cameras with it didn't seem to work out too well, and without source infront of me i can't say much else on it.

as for lag, try decreasing color depth or setting a moderate amount of compression (we use 50).

are you running any image processing? it can slow things down quite a bit.

let us know how it goes
DeleteInstance is for Java, and won't delete the images to the dashboard, as my previous post says
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #5   Spotlight this post!  
Unread 02-03-2010, 08:35
Zme Zme is offline
Registered User
FRC #2619
 
Join Date: Jan 2009
Location: Michigan
Posts: 83
Zme is on a distinguished road
Re: Name of camera task

Quote:
Originally Posted by byteit101 View Post
DeleteInstance is for Java, and won't delete the images to the dashboard, as my previous post says
ah, that explains a lot. Thanks for the clarification.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Task Creation and Semaphore Tutorial slavik262 C/C++ 2 11-02-2010 16:27
printf not working and UserProgram_StartupLibraryInit task deleted John Young C/C++ 4 08-02-2010 21:36
Run Kernel Task w/o reboot byteit101 Programming 4 12-01-2009 12:08


All times are GMT -5. The time now is 02:49.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi