Skip to content
Snippets Groups Projects
Commit 5720dcc6 authored by Samuel Tardieu's avatar Samuel Tardieu
Browse files

Adapt PID coefficients to updated speed ranges

parent b459a3b0
No related branches found
No related tags found
No related merge requests found
......@@ -5,15 +5,15 @@
from controller import Controller
import time
k_p = 0.3
k_i = 0.005
k_p = 0.25
k_i = 0.004
k_d = 0
min_speed = 0
precision = 10
# distance and max_speed are in ticks
# distance and max_speed are in ticks, max_motor_speed
def advance(c, distance, max_speed):
# Configure motor speed
c.set_max_percentage(100)
......@@ -93,7 +93,7 @@ def command(err, acc, der):
c = Controller()
assert c.who_am_i() == 0x57
try:
advance(c, 20000, 50)
advance(c, 20000, 40)
# advance(c, -10000, 50)
except KeyboardInterrupt:
print("Stopping engine")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment