Go to Post We don't want "The Flame Heard 'Round the World"... - Andrew Blair [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-02-2006, 00:14
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
CMUCam 3 second startup Delay?

I think I read somewhere that it takes 3 seconds for the CMUcam to either initialize or send packets. Does anyone know for sure which one is taking the 3 seconds?

We noticed today that from the time you power up the robot until about 3 seconds later, we would finally get some sort of life out of the robot, like responding to the joysticks.....

It seems very evident that during this 3 second camera power up the CPU is still holding up the scan (program pointer) and nothing else will work.

Is there any work around for this? I see this a problem in autonomous mode mostly, unless the camera is initialize on power up, we walk off the field, and it's ready before the master computer throws the big switch to go fully auto...

So we need to Start the camera as well, BEFORE autonomous mode?

I guess it would help to know where the 3 second delay is happening. In the initialize function? In the start function? In the capture data function?

Maybe we are too paranoid... ;-)
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #2   Spotlight this post!  
Unread 17-02-2006, 10:00
intelitek_Chris intelitek_Chris is offline
Registered User
no team
 
Join Date: Dec 2005
Location: Manchester
Posts: 19
intelitek_Chris will become famous soon enoughintelitek_Chris will become famous soon enough
Re: CMUCam 3 second startup Delay?

It does take time (less than) 3 seconds for the camera to initialize. There isn't really any way around this, but it isn't really a problem either. You can initialize your robot while it is on the field, long before any autonomous period begins. In easyC, the delay should only happen when you call an initialize camera block. Just call that in the initialize section, give the robot a few seconds before autonomous, and you should be all set.
  #3   Spotlight this post!  
Unread 17-02-2006, 11:38
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: CMUCam 3 second startup Delay?

Quote:
Originally Posted by chakorules
I think I read somewhere that it takes 3 seconds for the CMUcam to either initialize or send packets. Does anyone know for sure which one is taking the 3 seconds?

I guess it would help to know where the 3 second delay is happening. In the initialize function? In the start function? In the capture data function?

Maybe we are too paranoid... ;-)
You are not paranoid to want to know what's happening inside your robot!

When the robot starts (power on -when you first turn it on) a clock starts running. The camera won't start initializing until after 2 seconds and the gyros won't initialize until after 1 second. The reason is to make sure that the robot has settled down and the camera has completed its initialization. In competition this should not be a problem since you put the robot on the field, turn it on, and usually several minutes pass before the match starts.

So the thing to do is initialize the camera and gyros in the Initialize() function, then start them either in Initialize() or Autonomous() or OperatorControl(). Our robot has both, and they are started during the Initialize() function just to be sure they're running. That way if the robot is restarted for some reason in the middle of the operator control period, the devices are guaranteed to be initialized - since autonomous will be skipped in this case.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #4   Spotlight this post!  
Unread 18-02-2006, 19:04
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: CMUCam 3 second startup Delay?

Quote:
Originally Posted by chakorules
It seems very evident that during this 3 second camera power up the CPU is still holding up the scan (program pointer) and nothing else will work.

Is there any work around for this? I see this a problem in autonomous mode mostly, unless the camera is initialize on power up, we walk off the field, and it's ready before the master computer throws the big switch to go fully auto...
OK, you guys - try this and let us know what happens.

There is a new version of WPILib that has better error handling for the CMUCam. It will now fail more quickly if the camera is not detected and there is a function to get the status from the camera after initialization.

You can get it at the usual place.

Please post something with your results. I have tested it on a 2006 controller with the camera disconnected from the serial adapter and also with the serial adapter disconnected from the robot and both seem to work.

Be sure to save the old version this close to shipping in case you don't like the results.
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
  #5   Spotlight this post!  
Unread 19-02-2006, 09:33
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 751
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: CMUCam 3 second startup Delay?

Quote:
Originally Posted by BradAMiller
Be sure to save the old version this close to shipping in case you don't like the results.

Good point, I think we will leave it as is, it's working ok for us right now. We might try a the new library off season sometime. Thank for all you have done.




-
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
Closed Thread


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
Big Problem w/new CMUcam! Darkelement Programming 4 30-01-2006 14:03
CmuCam Questions? Mr.D LabView and Data Acquisition 1 26-01-2006 11:32
Major CMUcam issues - LabView app won't work, very low-quality picture scottmso Programming 5 19-01-2006 17:51
CMUcam setup Ryan Collings Programming 26 13-01-2006 01:00
CMUCam not working. Matt Krass Programming 4 18-01-2005 14:08


All times are GMT -5. The time now is 21:18.

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