Quote:
Originally Posted by Ether
If you had to make this work, how would you go about fixing this problem?
|
Well, for the thread-starter's situation, I would initialize the setpoint as current heading + desired change. Then it wouldn't matter if the variable was continuous or not. (Assuming I'm remembering correctly that the gyro heading does not reset to 0 when it makes a full rotation.)
On the other hand, if I wanted to turn the robot to an absolute heading, I would probably...you know what, I'm not sure. All my ideas thus far would eliminate the problem of whirling in circles when going from, say, 2520 degrees to 45. But all my ideas would not fix the problem of going from 359 to 0.