Public Member Functions | Private Attributes | List of all members
hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType > Class Template Referencefinal

#include <gains.hpp>

Public Member Functions

FloatFieldType & deadZone ()
 Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error). More...
 
const FloatFieldType & deadZone () const
 Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error). More...
 
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. More...
 
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. More...
 
FloatFieldType & feedForward ()
 Feed forward term (this term is multiplied by the target and added to the output). More...
 
const FloatFieldType & feedForward () const
 Feed forward term (this term is multiplied by the target and added to the output). More...
 
 Gains (MessageType internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
 
FloatFieldType & iClamp ()
 Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number. More...
 
const FloatFieldType & iClamp () const
 Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number. More...
 
FloatFieldType & kD ()
 Derivative PID gain. More...
 
const FloatFieldType & kD () const
 Derivative PID gain. More...
 
FloatFieldType & kI ()
 Integral PID gain. More...
 
const FloatFieldType & kI () const
 Integral PID gain. More...
 
FloatFieldType & kP ()
 Proportional PID gain. More...
 
const FloatFieldType & kP () const
 Proportional PID gain. More...
 
FloatFieldType & maxOutput ()
 Output from the PID controller is limited to a maximum of this value. More...
 
const FloatFieldType & maxOutput () const
 Output from the PID controller is limited to a maximum of this value. More...
 
FloatFieldType & maxTarget ()
 Maximum allowed value for input to the PID controller. More...
 
const FloatFieldType & maxTarget () const
 Maximum allowed value for input to the PID controller. More...
 
FloatFieldType & minOutput ()
 Output from the PID controller is limited to a minimum of this value. More...
 
const FloatFieldType & minOutput () const
 Output from the PID controller is limited to a minimum of this value. More...
 
FloatFieldType & minTarget ()
 Minimum allowed value for input to the PID controller. More...
 
const FloatFieldType & minTarget () const
 Minimum allowed value for input to the PID controller. More...
 
FloatFieldType & outputLowpass ()
 A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a). More...
 
const FloatFieldType & outputLowpass () const
 A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a). More...
 
FloatFieldType & punch ()
 Constant offset to the PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative. More...
 
const FloatFieldType & punch () const
 Constant offset to the PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative. More...
 
FloatFieldType & targetLowpass ()
 A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a). More...
 
const FloatFieldType & targetLowpass () const
 A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a). More...
 

Private Attributes

BoolFieldType d_on_error_
 
FloatFieldType dead_zone_
 
FloatFieldType feed_forward_
 
FloatFieldType i_clamp_
 
MessageType const internal_
 
FloatFieldType kd_
 
FloatFieldType ki_
 
FloatFieldType kp_
 
FloatFieldType max_output_
 
FloatFieldType max_target_
 
FloatFieldType min_output_
 
FloatFieldType min_target_
 
FloatFieldType output_lowpass_
 
FloatFieldType punch_
 
FloatFieldType target_lowpass_
 

Detailed Description

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
class hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >

Definition at line 8 of file gains.hpp.

Constructor & Destructor Documentation

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::Gains ( MessageType  internal,
FloatEnumType  kp_gain,
BoolEnumType  d_on_error_gain 
)
inline

Definition at line 12 of file gains.hpp.

Member Function Documentation

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::deadZone ( )
inline

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

Definition at line 54 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::deadZone ( ) const
inline

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

Definition at line 56 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
BoolFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::dOnError ( )
inline

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.

Definition at line 90 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const BoolFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::dOnError ( ) const
inline

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.

Definition at line 92 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::feedForward ( )
inline

Feed forward term (this term is multiplied by the target and added to the output).

Definition at line 50 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::feedForward ( ) const
inline

Feed forward term (this term is multiplied by the target and added to the output).

Definition at line 52 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::iClamp ( )
inline

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

Definition at line 58 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::iClamp ( ) const
inline

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

Definition at line 60 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kD ( )
inline

Derivative PID gain.

Definition at line 46 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kD ( ) const
inline

Derivative PID gain.

Definition at line 48 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kI ( )
inline

Integral PID gain.

Definition at line 42 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kI ( ) const
inline

Integral PID gain.

Definition at line 44 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kP ( )
inline

Proportional PID gain.

Definition at line 38 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kP ( ) const
inline

Proportional PID gain.

Definition at line 40 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::maxOutput ( )
inline

Output from the PID controller is limited to a maximum of this value.

Definition at line 82 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::maxOutput ( ) const
inline

Output from the PID controller is limited to a maximum of this value.

Definition at line 84 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::maxTarget ( )
inline

Maximum allowed value for input to the PID controller.

Definition at line 70 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::maxTarget ( ) const
inline

Maximum allowed value for input to the PID controller.

Definition at line 72 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::minOutput ( )
inline

Output from the PID controller is limited to a minimum of this value.

Definition at line 78 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::minOutput ( ) const
inline

Output from the PID controller is limited to a minimum of this value.

Definition at line 80 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::minTarget ( )
inline

Minimum allowed value for input to the PID controller.

Definition at line 66 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::minTarget ( ) const
inline

Minimum allowed value for input to the PID controller.

Definition at line 68 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::outputLowpass ( )
inline

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

Definition at line 86 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::outputLowpass ( ) const
inline

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

Definition at line 88 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::punch ( )
inline

Constant offset to the PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

Definition at line 62 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::punch ( ) const
inline

Constant offset to the PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

Definition at line 64 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::targetLowpass ( )
inline

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

Definition at line 74 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
const FloatFieldType& hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::targetLowpass ( ) const
inline

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

Definition at line 76 of file gains.hpp.

Member Data Documentation

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
BoolFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::d_on_error_
private

Definition at line 110 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::dead_zone_
private

Definition at line 101 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::feed_forward_
private

Definition at line 100 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::i_clamp_
private

Definition at line 102 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
MessageType const hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::internal_
private

Definition at line 95 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kd_
private

Definition at line 99 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::ki_
private

Definition at line 98 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::kp_
private

Definition at line 97 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::max_output_
private

Definition at line 108 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::max_target_
private

Definition at line 105 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::min_output_
private

Definition at line 107 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::min_target_
private

Definition at line 104 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::output_lowpass_
private

Definition at line 109 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::punch_
private

Definition at line 103 of file gains.hpp.

template<typename MessageType, typename FloatFieldType, typename BoolFieldType, typename FloatEnumType, typename BoolEnumType>
FloatFieldType hebi::Gains< MessageType, FloatFieldType, BoolFieldType, FloatEnumType, BoolEnumType >::target_lowpass_
private

Definition at line 106 of file gains.hpp.


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


hebiros
Author(s): Xavier Artache , Matthew Tesch
autogenerated on Thu Sep 3 2020 04:10:59