Tuning Controllers
Optimize controller performance for your environment.
Pure Pursuit Tuning
Key Parameters
K_dd: Lookahead distance gain
min_lookahead: Minimum lookahead distance
max_lookahead: Maximum lookahead distance
Symptoms and Solutions
Oscillation / Weaving
Increase
min_lookaheadDecrease
K_dd
Cutting Corners
Decrease
min_lookaheadIncrease
K_dd
Slow Response
Decrease
min_lookahead
DWA Tuning
Cost Weight Adjustment
Start with default values and adjust one at a time:
goal_cost_gain: Adjust first for path following
obstacle_cost_gain: Tune for safety margins
speed_cost_gain: Final adjustment for smoothness
Logging for Analysis
Enable detailed logging:
from control_logger import ControlLogger
logger = ControlLogger('tuning_log.csv')
while running:
# ... control loop ...
logger.log(state, steering, throttle)
Analyze with:
python scripts/plot_control_log.py tuning_log.csv