Anpassung fahre_gerade_aus für negative Strecken #14
1 changed files with 2 additions and 2 deletions
|
@ -128,8 +128,8 @@ class IQRobot:
|
|||
versatz = self.bewegungsSensor.get_yaw_angle()
|
||||
sum_versatz = sum_versatz + versatz
|
||||
abweichung = (kp * versatz + ki * sum_versatz) / 100
|
||||
linker_speed = speed * (1 - abweichung)
|
||||
rechter_speed = speed * (1 + abweichung)
|
||||
linker_speed = speed * richtung * (1 - abweichung)
|
||||
rechter_speed = speed * richtung * (1 + abweichung)
|
||||
self.antrieb.start_tank_at_power(int(linker_speed), int(rechter_speed))
|
||||
#print("Versatz: " + str(versatz) + " , linker Speed: " + str(linker_speed) + ", rechter Speed: " + str(rechter_speed) + ", strecke: " + str(sum_cm))
|
||||
|
||||
|
|
Loading…
Reference in a new issue