Skip to content

Default drivetrain turn PID values create large oscillations #88

@sfe-SparkFro

Description

@sfe-SparkFro

It works okay on a soft surface like carpet, but hard surfaces result in large oscillations that take an excessively long time to settle.

Also, not sure why there are commented values in here, and why kd has an undocumented (max(max_effort, 0.5) - 0.5) * 2 term:

main_controller = PID(
# kp = 0.2,
# ki = 0.004,
# kd = 0.0036,
kd = 0.0036 + 0.0034 * (max(max_effort, 0.5) - 0.5) * 2,
kp = 0.2,
ki = 0.004,
#kd = 0.007,
min_output = 0.1,
max_output = max_effort,
max_integral = 30,
tolerance = 1,
tolerance_count = 3
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions