Class package_template::PID¶
-
class
package_template
::
PID
¶ Simple 1D pid controller.
Public Functions
-
PID
()¶ Construct a default PID object using the DefaultConfiguration.
-
PID
(const Gains_configuration &configuration)¶ Construct a new PID object using a user provided configuration.
- Parameters
configuration
:
-
~PID
()¶
-
double
compute
(const double position, const double velocity, const double position_target, const double delta_time)¶ compute the force related to the pid controller.
- Warning
this function is not stateless, as it performs integration. Call reset_pid() to reset the integral part.
- Return
computed force
- Parameters
position
: current positionvelocity
: current velocityposition_target
: target positiondelta_time
: time passed since last measurement. Used for integral computation
Private Members
-
const Gains_configuration *
configuration_
¶
-
bool
private_configuration_
¶
-
double
integral_
¶
-