Quote:
Originally Posted by virtuald
In particular, #29 is probably the one that is biting you (it bit me for a similar reason). If you keep calling setSetpoint (like that example does), each time it is called it will reset things such that onTarget is false, which means the robot will never stop oscillating.
|
So if I did a state machine for that setSetpoint like this:
Code:
if state == 1:
setSetpoint(90)
state = 2
elif state ==2:
if onTarget():
state=3
Would that solve the issue?