|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#6
|
|||
|
|||
|
Re: KOP Gyro Lag
3Here's an example of what my terminal windows looks like after I get after telling the robot to turn, then go straight. This isn't actually code - it's what prints out into the terminal window. First, it does the turn, and the gyro value reflects that:
Code:
Autonomous State = Turn Loop Number = 1 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Autonomous State = Turn Loop Number = 2 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Autonomous State = Turn Loop Number = 3 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Autonomous State = Turn Loop Number = 4 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Code:
Autonomous State = Turn Loop Number = 32 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Autonomous State = Turn Loop Number = 33 Gyro Value = 75 Left Motor = 127, Right Motor = 230 Autonomous State = Turn Loop Number = 34 Gyro Value = 75 Left Motor = 127, Right Motor = 230 TURN DONE Code:
Autonomous State = Straight Loop Number = 35 Gyro Value = 75 Left Motor = 230, Right Motor = 230 Autonomous State = Straight Loop Number = 36 Gyro Value = 75 Left Motor = 230, Right Motor = 190 Autonomous State = Straight Loop Number = 37 Gyro Value = 75 Left Motor = 230, Right Motor = 160 Autonomous State = Straight Loop Number = 38 Gyro Value = 75 Left Motor = 230, Right Motor = 140 Autonomous State = Straight Loop Number = 39 Gyro Value = 75 Left Motor = 230, Right Motor = 127 Autonomous State = Straight Loop Number = 40 Gyro Value = 75 Left Motor = 230, Right Motor = 127 Autonomous State = Straight Loop Number = 41 Gyro Value = 75 Left Motor = 230, Right Motor = 127 Code:
Autonomous State = Straight Loop Number = 75 Gyro Value = 80 Left Motor = 230, Right Motor = 127 Autonomous State = Straight Loop Number = 76 Gyro Value = 95 Left Motor = 230, Right Motor = 150 Autonomous State = Straight Loop Number = 77 Gyro Value = 115 Left Motor = 230, Right Motor = 180 Autonomous State = Straight Loop Number = 78 Gyro Value = 127 Left Motor = 230, Right Motor = 230 Note that I was putting that into my own words since I didn't save the terminal printouts and can't get new ones right now. The gyro value actually varied between 72 and 78 during the turn. I can slow down the printouts, but I don't see how that would help. Yes, all of the printouts are delayed. In fact, we get a red light of death if we run autonomous mode for too long with those printouts on (serial buffer overflows). But all of the prinouts should be affected by the same delay. The fact remains that, for forty tics after the turn stops, the gyro reports that we are still turning. The only way the printouts could be the problem is if they were somehow slowing down the ADC but not the rest of the code. I'll try slowing down the printouts to once every ten loops tomorrow (we're taking today off), but I doubt it will help. I think the problem is related to us exceeding the gyro's 80 dps range during the turn, but like I said, we don't want to buy the 300 dps version only to find out that it has the same lag. What exactly happens when you exceed the gyro's range? Will it simply report its maximum range and then go back down when you stop turning? Or will it get "stuck" at its maximum range for about a second? And no, we aren't using any other loops in our code except the master 26.2ms loop. We used to use a while loop to do atuonomous, but we fixed that. There are a few floating point operations, but nothing too complicated. Last edited by FRC4ME : 14-02-2008 at 13:40. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Lag Issue | bizarospooky | Programming | 7 | 08-02-2008 17:31 |
| Some 2007 KOP Gyro Performance Data | yoyodyne | Control System | 3 | 02-04-2007 20:07 |
| KOP Gyro seems to run-on after turn stops | PhilBot | Control System | 8 | 05-03-2007 12:43 |
| KOP Gyro | John Gutmann | Programming | 12 | 12-12-2005 21:59 |
| Lead-Lag Compensator | eSouL | Control System | 0 | 13-08-2004 03:21 |