pid steering
This commit is contained in:
parent
64702e6bac
commit
c8797cb5bc
|
|
@ -107,6 +107,7 @@ for chunk in stream.iter_content(chunk_size=1024):
|
|||
|
||||
speedL = max(-99, -v * min(100 + k, 99))
|
||||
speedR = max(-99, v * min(100 - k, 99))
|
||||
print(p, d, i, speedL, speedR)
|
||||
motorL.start(int(speedL))
|
||||
motorR.start(int(speedR))
|
||||
xp = x
|
||||
|
|
@ -116,7 +117,6 @@ for chunk in stream.iter_content(chunk_size=1024):
|
|||
cv2.putText(frame, f"P:{int(p)} D:{int(d)} I:{int(i)}", (10, 30),
|
||||
cv2.FONT_HERSHEY_SIMPLEX, 0.6, (0, 255, 0), 2)
|
||||
#print("PDI: ", p, d, dtms, i)
|
||||
print(p, d, i, speedL, speedR)
|
||||
else:
|
||||
ip = 0
|
||||
# ============================
|
||||
|
|
|
|||
Loading…
Reference in a new issue