View Single Post
  #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.