-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
Add PID controller implementation #12643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 1 commit
745bd2b
588538e
7708d3c
64aaaa3
dfb637b
8b6dc3d
1a90c8e
12d7359
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,8 @@ | |
""" | ||
|
||
|
||
<<<<<<< HEAD | ||
class PID: | ||
|
||
def __init__(self, kp: float, ki: float, kd: float, setpoint: float = 0): | ||
======= | ||
class pid: | ||
def __init__(self, Kp: float, Ki: float, Kd: float, setpoint: float = 0): | ||
Check failure on line 15 in control_algorithms/pid.py
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide return type hint for the function: Variable and function names should follow the Variable and function names should follow the Variable and function names should follow the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please provide return type hint for the function: Variable and function names should follow the Variable and function names should follow the Variable and function names should follow the |
||
>>>>>>> 588538eaddcee6fa4733a1775487123c0ed09a43 | ||
""" | ||
Initialize the PID controller. | ||
|
||
|
@@ -27,9 +21,9 @@ | |
:param Kd: Derivative gain | ||
:param setpoint: Desired target value | ||
""" | ||
self.kp = kp | ||
self.ki = ki | ||
self.kd = kd | ||
self.setpoint = setpoint | ||
|
||
self.integral = 0 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class names should follow the
CamelCase
naming convention. Please update the following name accordingly:pid