|
Re: Porportional rotation using gyro
The right way to do this is to fix the robot itself.
I would start by just trying proportional control. You don't actually need to use the PID controller class.
If you're using java/c++ with arcade drive, I'd do something like this to travel in a straight line.
drive.arcadeDrive(stick.getY(), kP*gyro.get()).
Make sure to have your code zero the gyro so that when the robot is on target, gyro.get() returns 0.
|