5 template<
typename MessageType,
6 typename FloatFieldType,
typename BoolFieldType,
7 typename FloatEnumType,
typename BoolEnumType>
11 #ifndef DOXYGEN_OMIT_INTERNAL 12 Gains(MessageType
internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
15 ki_(
internal, static_cast<FloatEnumType>(kp_gain + 1)),
16 kd_(
internal, static_cast<FloatEnumType>(kp_gain + 2)),
30 #endif // DOXYGEN_OMIT_INTERNAL 38 FloatFieldType&
kP() {
return kp_; }
40 const FloatFieldType&
kP()
const {
return kp_; }
42 FloatFieldType&
kI() {
return ki_; }
44 const FloatFieldType&
kI()
const {
return ki_; }
46 FloatFieldType&
kD() {
return kd_; }
48 const FloatFieldType&
kD()
const {
return kd_; }
FloatFieldType & minTarget()
Minimum allowed value for input to the PID controller.
const FloatFieldType & targetLowpass() const
A simple lowpass filter applied to the target set point; needs to be between 0 and 1...
FloatFieldType output_lowpass_
const FloatFieldType & maxOutput() const
Output from the PID controller is limited to a maximum of this value.
FloatFieldType min_target_
const FloatFieldType & kP() const
Proportional PID gain.
BoolFieldType d_on_error_
const FloatFieldType & outputLowpass() const
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
const FloatFieldType & minTarget() const
Minimum allowed value for input to the PID controller.
FloatFieldType feed_forward_
const FloatFieldType & kD() const
Derivative PID gain.
#define HEBI_DISABLE_COPY_MOVE(Class)
const FloatFieldType & punch() const
Constant offset to the PID output outside of the deadzone; it is added when the error is positive and...
FloatFieldType & outputLowpass()
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
const FloatFieldType & maxTarget() const
Maximum allowed value for input to the PID controller.
FloatFieldType & maxTarget()
Maximum allowed value for input to the PID controller.
const FloatFieldType & deadZone() const
Error values within +/- this value from zero are treated as zero (in terms of computed proportional o...
FloatFieldType & feedForward()
Feed forward term (this term is multiplied by the target and added to the output).
FloatFieldType & deadZone()
Error values within +/- this value from zero are treated as zero (in terms of computed proportional o...
FloatFieldType & kP()
Proportional PID gain.
FloatFieldType max_target_
MessageType const internal_
FloatFieldType target_lowpass_
FloatFieldType & iClamp()
Maximum allowed value for the output of the integral component of the PID loop; the integrated error ...
const FloatFieldType & feedForward() const
Feed forward term (this term is multiplied by the target and added to the output).
FloatFieldType & kD()
Derivative PID gain.
const FloatFieldType & minOutput() const
Output from the PID controller is limited to a minimum of this value.
FloatFieldType min_output_
FloatFieldType max_output_
BoolFieldType & dOnError()
Controls whether the Kd term uses the "derivative of error" or "derivative of measurement." When the setpoints have step inputs or are noisy, setting this to false can eliminate corresponding spikes or noise in the output.
FloatFieldType & minOutput()
Output from the PID controller is limited to a minimum of this value.
Gains(MessageType internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
const BoolFieldType & dOnError() const
Controls whether the Kd term uses the "derivative of error" or "derivative of measurement." When the setpoints have step inputs or are noisy, setting this to false can eliminate corresponding spikes or noise in the output.
const FloatFieldType & iClamp() const
Maximum allowed value for the output of the integral component of the PID loop; the integrated error ...
FloatFieldType & targetLowpass()
A simple lowpass filter applied to the target set point; needs to be between 0 and 1...
FloatFieldType & kI()
Integral PID gain.
FloatFieldType & maxOutput()
Output from the PID controller is limited to a maximum of this value.
FloatFieldType dead_zone_
FloatFieldType & punch()
Constant offset to the PID output outside of the deadzone; it is added when the error is positive and...
const FloatFieldType & kI() const
Integral PID gain.