![]() |
Robot turning Erratically in auton...
During auton mode, when given a turn command in the commands.h, all it does is spin around in circles...please help! We ship out tonight!
|
Re: Robot turning Erratically in auton...
Quote:
Did you get it running with the original scripting code? I haven't been able to do that.... Jon |
Re: Robot turning Erratically in auton...
Your motors are either turning in the wrong direction or your gyro isn't calculating the bias properly. For us we had to give the gyro a second to get bias or else it would spit out an angle like 20 000 milliradians to turn (it spins in circles). Try adding in some extra wait time before calculating bias. If it works then decrease it as much as you can. Hope that helps
|
Re: Robot turning Erratically in auton...
the PWM's are mixed up. swap them and it will solve your problems.
|
Re: Robot turning Erratically in auton...
Incorrect.
|
Re: Robot turning Erratically in auton...
Quote:
What I would do is go into pid.c and and find the function called pid(). Down at the bottom of that function, find these lines: Code:
switch (motor)Code:
switch (motor)You're probably going so fast that your encoders are missing clicks. If you're not using interrupts, you have a fairly limited ability to see state changes... |
Re: Robot turning Erratically in auton...
I would assume that your encoders are working, since you didn't mention any problems with going straight. Is your gyro working is the first question.
Even with a working gyro, we had trouble with the turning code, I think it was because our encoders didn't give enough resolution to give good velocity control. With a few modifications we were able to get the code to turn with encoders working well enough. We're still working on turning with the gyro. |
| All times are GMT -5. The time now is 04:43. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi