Classes | Public Member Functions | Private Attributes | List of all members
grpc_core::PidController Class Reference

#include <pid_controller.h>

Classes

class  Args
 

Public Member Functions

double error_integral () const
 Returns the current error integral (mostly for testing) More...
 
double last_control_value () const
 Returns the last control value calculated. More...
 
 PidController (const Args &args)
 
void Reset ()
 
double Update (double error, double dt)
 

Private Attributes

const Args args_
 
double error_integral_ = 0.0
 
double last_control_value_
 
double last_dc_dt_ = 0.0
 
double last_error_ = 0.0
 

Detailed Description

Definition at line 35 of file pid_controller.h.

Constructor & Destructor Documentation

◆ PidController()

grpc_core::PidController::PidController ( const Args args)
explicit

Definition at line 27 of file pid_controller.cc.

Member Function Documentation

◆ error_integral()

double grpc_core::PidController::error_integral ( ) const
inline

Returns the current error integral (mostly for testing)

Definition at line 104 of file pid_controller.h.

◆ last_control_value()

double grpc_core::PidController::last_control_value ( ) const
inline

Returns the last control value calculated.

Definition at line 101 of file pid_controller.h.

◆ Reset()

void grpc_core::PidController::Reset ( )
inline

Reset the controller internal state: useful when the environment has changed significantly

Definition at line 90 of file pid_controller.h.

◆ Update()

double grpc_core::PidController::Update ( double  error,
double  dt 
)

Update the controller: given a current error estimate, and the time since the last update, returns a new control value

Definition at line 30 of file pid_controller.cc.

Member Data Documentation

◆ args_

const Args grpc_core::PidController::args_
private

Definition at line 111 of file pid_controller.h.

◆ error_integral_

double grpc_core::PidController::error_integral_ = 0.0
private

Definition at line 108 of file pid_controller.h.

◆ last_control_value_

double grpc_core::PidController::last_control_value_
private

Definition at line 109 of file pid_controller.h.

◆ last_dc_dt_

double grpc_core::PidController::last_dc_dt_ = 0.0
private

Definition at line 110 of file pid_controller.h.

◆ last_error_

double grpc_core::PidController::last_error_ = 0.0
private

Definition at line 107 of file pid_controller.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:36