View Single Post
  #5   Spotlight this post!  
Unread 27-02-2012, 13:12
j.cole j.cole is offline
Registered User
FRC #0379
 
Join Date: Jan 2010
Location: Girard
Posts: 159
j.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud ofj.cole has much to be proud of
Re: Autonomous Mode Issues

Quote:
Originally Posted by Alan Anderson View Post
Are you trying to drive the robot to a specified location? Your P gain might be too high in the "1" case, making it oscillate around the setpoint. This will happen if your wheels are off the ground without any significant load.

Your shooter encoder is obviously configured with 4x decoding. If you change it to 1x (and change the associated constant 1440 to 360), you can get slightly better results, though since you're computing the rate yourself from the position it isn't a big deal. You should definitely see an improvement in shooter speed stability if you change its simple delay-throttled while loop to a timed loop, or if you do a similar delta computation on the actual system millisecond timer instead of just assuming the loop runs at a fixed rate. I think the constant 20 is involved there -- are you commanding the shooter speed in revolutions per second?

In your While loops, I see a consistent pattern of testing for (i+1) being greater than or equal to a constant. Why not just test for i being greater?
The testing was done on the ground.
The shooter is configured to 2x. and the code for the shooter (conversions and stuff) is from teleop, where it works perfect. I'm commanding the shooter to an arbitrary value not a RPS


Quote:
Originally Posted by Greg McKaskle View Post
Did you really mean to set the PID coefficients for driving to 0, 0, and 0?

Did you really mean to se the Left and Right Drive values to 0 and 0?

I didn't look as closely at the shooter, but it looks like globals that describe the set points of the control loops aren't telling the robot to do much. If 16 isn't the auto you wanted comments on, post another picture.

Greg McKaskle
The default values are set to 0 UNTIL the case structures come in and tell it otherwise, via a local variable.


Now here's what I think the problem is. When I found those setpoints and PID gains it was in TeleOp mode not autonomous. does TeleOp run at a different speed than the while loop with a 50 ms timer in it?



Could I just take the timers out of all of em and put the whole thing in a 50ms While loop?
__________________

It's not normally a good idea to give a programmer a drill but rules are made to be broken.

Last edited by j.cole : 27-02-2012 at 13:22.
Reply With Quote