Go to Post We are making this up as we go along - please don't confuse us by telling us the way that it really should be done. - dlavery [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 19-03-2013, 19:52
sarangmittal's Avatar
sarangmittal sarangmittal is offline
Registered User
FRC #1683 (Techno Titans)
Team Role: Programmer
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Atlanta GA
Posts: 20
sarangmittal is an unknown quantity at this point
Problems with updating speed on the actual field

At Peachtree Regional, we had some problems concerning the camera and a PID loop for the shooter. If we ran the camera during a match, the PID feedback would stop working and we would have no control over RPM. However, the second we disabled the camera in the FRC PC Dashboard, the PID loop would resume function.

I personally thought that it was a problem with bandwidth for the FMS. Any suggestions on how to fix this from a code standpoint? Our camera is running at 320x240 , 30 fps, and 30% compression although we did mess with the Exposure, Brightness, and Contrast in order to see the reflective targets.

Also, my assessment may be completely wrong. I'd like to hear other ideas related to the cause of this issue.

Also, just ask if anymore clarification is needed or you want me to post code.

Thanks.
  #2   Spotlight this post!  
Unread 19-03-2013, 20:26
engunneer's Avatar
engunneer engunneer is offline
Alumni turned Mentor
AKA: Branden Gunn
FRC #4761
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1996
Location: Reading, MA
Posts: 844
engunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond reputeengunneer has a reputation beyond repute
Re: Problems with updating speed on the actual field

Try 15fps.

Is your vision system doing any math? or looping? is other control laggy?
__________________
Student FRC23 (1996-1999), Mentor FRC246 (2000), Mentor FRC1318 (2007-2009), Mentor FRC93 (2011), Mentor FRC2151 (2012), Mentor FRC23 (2013), Mentor FRC4761 (2014-2017)
1998 - National Chairman's Award and Woodie Flowers Award (FRC23, Mike Bastoni ) | 2007 - PNW SF (488, 1595) | 2008 - Oregon RCA - Seattle #2 Seed, SF (488, 1696) | 2009 - Oregon #1 Seed, Winners (1983, 2635) - Seattle SF (945, 2865) - Galileo #2 Seed, SF (973, 25) | 2012 Midwest F (111, 71) | 2014 RIDE Winners (78, 125), Inspector - NEU #24, QF (3479, 3958) - NECMP #35 | 2015 Reading #11, SF (1058, 190), Inspector - RIDE #17, QF(4055, 5494), Inspector - NECMP #57 | 2016 Reading #4, SF (133, 4474), DCA, Inspector - Ride #22, SF (1735, 2067), Creativity, Inspector - NECMP #48, RCA - Archimedes
  #3   Spotlight this post!  
Unread 19-03-2013, 21:50
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Problems with updating speed on the actual field

I can't think of anything involving the FMS or network bandwidth that would prevent a PID control loop from functioning. I'd need to look at your code before I could make a good guess about what might be going on.
  #4   Spotlight this post!  
Unread 20-03-2013, 10:04
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Problems with updating speed on the actual field

Could be a CPU issue - if the image-analysis task is taking too many CPU cycles, it could starve the PID or at least make the PID unpredictable.

Could be a starvation issue: We had a bug once where we had a tight sensor-checking loop on one thread that never yielded, which caused the robot to be undriveable. But when we put a printf in, things worked - this is because internally, the printf call yields execution to other threads. The correct solution was to put a short wait() statement in so that other threads could get a turn on the CPU. Your camera code could be similar - if there's never a wait() call in it, then it could completely monopolize the CPU.
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


All times are GMT -5. The time now is 12:41.

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