Go to Post Let's see some love for these fine people. Let's give it up for the refs. - Andy Baker [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 02-02-2009, 19:03
Maxpower57's Avatar
Maxpower57 Maxpower57 is offline
Fabuloso
AKA: Maxwell V.
FRC #2574 (RoboHuskie)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: St. Anthony, MN
Posts: 53
Maxpower57 will become famous soon enoughMaxpower57 will become famous soon enough
Send a message via AIM to Maxpower57
Camera Slowing code down?

So, i have the camera running the following code:
Code:
if(FindColor(GREEN, &par)){
printf("Particle Found");
}
Fairly simple, and works. however running this causes the code to slow down to around 1 execution every 3 seconds. (obviously Incredibly slow)

Im Using the IterativeRobot class to run the robot
yes, i have started the camera task.
the robot is running v11 of the CRIO image, and WPI is 3.0

I've tried:
Running the camera in a seperate task
- this causes the camera tasks to run at full speed, but the rest of the robot code runs at the incredibly slow speed.

let me know any ideas of whats going wrong
__________________
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2009, 19:09
EricWilliams EricWilliams is offline
Registered User
FRC #2039 (Rockford Robotics)
Team Role: Mentor
 
Join Date: Mar 2005
Rookie Year: 2001
Location: Rockford, IL
Posts: 102
EricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of lightEricWilliams is a glorious beacon of light
Re: Camera Slowing code down?

We are having similar issues. http://www.chiefdelphi.com/forums/sh...ad.php?t=73447

The first thing you should try is dropping the camera image to 160x120 pixels. That should speed it up a bit, but its still dreadfully slow.
Reply With Quote
  #3   Spotlight this post!  
Unread 02-02-2009, 19:11
Maxpower57's Avatar
Maxpower57 Maxpower57 is offline
Fabuloso
AKA: Maxwell V.
FRC #2574 (RoboHuskie)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: St. Anthony, MN
Posts: 53
Maxpower57 will become famous soon enoughMaxpower57 will become famous soon enough
Send a message via AIM to Maxpower57
Re: Camera Slowing code down?

Quote:
Originally Posted by Ewilliams2006 View Post
We are having similar issues. http://www.chiefdelphi.com/forums/sh...ad.php?t=73447

The first thing you should try is dropping the camera image to 160x120 pixels. That should speed it up a bit, but its still dreadfully slow.
Thats already the resolution.
i fear i may have to create a new task for the rest of the robot code as well,
but then it may be faster to just use the SimpleRobot class.

anybody have any other ideas?
__________________
Reply With Quote
  #4   Spotlight this post!  
Unread 02-02-2009, 20:00
Maxpower57's Avatar
Maxpower57 Maxpower57 is offline
Fabuloso
AKA: Maxwell V.
FRC #2574 (RoboHuskie)
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2008
Location: St. Anthony, MN
Posts: 53
Maxpower57 will become famous soon enoughMaxpower57 will become famous soon enough
Send a message via AIM to Maxpower57
Re: Camera Slowing code down?

Ok I got it.
When the documentation says the Wait(5); function waits for 5 milliseconds, it means seconds. (this happens with the timer->Get() too btw) take out this line.

ah, thank you wpilib.
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2009, 20:57
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,557
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Camera Slowing code down?

Quote:
Originally Posted by Maxpower57 View Post
Ok I got it.
When the documentation says the Wait(5); function waits for 5 milliseconds, it means seconds. (this happens with the timer->Get() too btw) take out this line.
Update 2 changed the default to seconds (and was noted in the release notes). Looking at the documentation from C++ update 3, I don't see any references to milliseconds. If you are looking at the latest documentation and see something that is wrong, you should post on the FIRST forums so that it can be corrected.
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
problems using gyro/adc code with camera default code tanstaafl Programming 7 22-01-2006 23:09
Slowing down Camera drive turning Zalumaskov Programming 1 27-02-2005 10:11
Team THRUST - Kevin's Code and Camera Code Combine Chris_Elston Programming 3 31-01-2005 22:28
Slowing Down Drive Motors Arc736UV Programming 5 24-01-2005 22:35
Is FIRST slowing down with it's updates! mtaman02 Regional Competitions 8 15-03-2004 23:25


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

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