Skip to content

Commit d2cd65b

Browse files
committed
Straight works better for smaller distances
1 parent 593b236 commit d2cd65b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

XRPLib/differential_drive.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ def straight(self, distance: float, max_effort: float = 0.5, timeout: float = No
153153
main_controller = PID(
154154
kp = 0.1,
155155
ki = 0.04,
156-
kd = 0.06,
157-
min_output = 0.25,
156+
kd = 0.04,
157+
min_output = 0.3,
158158
max_output = max_effort,
159159
max_integral = 10,
160160
tolerance = 0.25,
@@ -164,7 +164,7 @@ def straight(self, distance: float, max_effort: float = 0.5, timeout: float = No
164164
# Secondary controller to keep encoder values in sync
165165
if secondary_controller is None:
166166
secondary_controller = PID(
167-
kp = 0.075, kd=0.005,
167+
kp = 0.075, kd=0.001,
168168
)
169169

170170
if self.imu is not None:

0 commit comments

Comments
 (0)