7 template<
typename MessageRefType,
typename FloatFieldType,
typename BoolFieldType,
typename FloatEnumType,
11 #ifndef DOXYGEN_OMIT_INTERNAL 12 Gains(MessageRefType&
internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
13 :
kp_(internal, kp_gain),
14 ki_(internal, static_cast<FloatEnumType>(kp_gain + 1)),
15 kd_(internal, static_cast<FloatEnumType>(kp_gain + 2)),
16 feed_forward_(internal, static_cast<FloatEnumType>(kp_gain + 3)),
17 dead_zone_(internal, static_cast<FloatEnumType>(kp_gain + 4)),
18 i_clamp_(internal, static_cast<FloatEnumType>(kp_gain + 5)),
19 punch_(internal, static_cast<FloatEnumType>(kp_gain + 6)),
20 min_target_(internal, static_cast<FloatEnumType>(kp_gain + 7)),
21 max_target_(internal, static_cast<FloatEnumType>(kp_gain + 8)),
23 min_output_(internal, static_cast<FloatEnumType>(kp_gain + 10)),
24 max_output_(internal, static_cast<FloatEnumType>(kp_gain + 11)),
27 Gains(
const MessageRefType&
internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
28 :
kp_(internal, kp_gain),
29 ki_(internal, static_cast<FloatEnumType>(kp_gain + 1)),
30 kd_(internal, static_cast<FloatEnumType>(kp_gain + 2)),
31 feed_forward_(internal, static_cast<FloatEnumType>(kp_gain + 3)),
32 dead_zone_(internal, static_cast<FloatEnumType>(kp_gain + 4)),
33 i_clamp_(internal, static_cast<FloatEnumType>(kp_gain + 5)),
34 punch_(internal, static_cast<FloatEnumType>(kp_gain + 6)),
35 min_target_(internal, static_cast<FloatEnumType>(kp_gain + 7)),
36 max_target_(internal, static_cast<FloatEnumType>(kp_gain + 8)),
38 min_output_(internal, static_cast<FloatEnumType>(kp_gain + 10)),
39 max_output_(internal, static_cast<FloatEnumType>(kp_gain + 11)),
42 #endif // DOXYGEN_OMIT_INTERNAL 50 FloatFieldType&
kP() {
return kp_; }
52 const FloatFieldType&
kP()
const {
return kp_; }
54 FloatFieldType&
kI() {
return ki_; }
56 const FloatFieldType&
kI()
const {
return ki_; }
58 FloatFieldType&
kD() {
return kd_; }
60 const FloatFieldType&
kD()
const {
return kd_; }
FloatFieldType & outputLowpass()
const FloatFieldType & kP() const
Proportional PID gain.
FloatFieldType & minOutput()
Output from the PID controller is limited to a minimum of this value.
FloatFieldType & targetLowpass()
FloatFieldType & kP()
Proportional PID gain.
const FloatFieldType & kI() const
Integral PID gain.
const FloatFieldType & minTarget() const
Minimum allowed value for input to the PID controller.
const FloatFieldType & minOutput() const
Output from the PID controller is limited to a minimum of this value.
FloatFieldType & deadZone()
const FloatFieldType & targetLowpass() const
const FloatFieldType & maxOutput() const
Output from the PID controller is limited to a maximum of this value.
#define HEBI_DISABLE_COPY_MOVE(Class)
BoolFieldType & dOnError()
const FloatFieldType & punch() const
const FloatFieldType & maxTarget() const
Maximum allowed value for input to the PID controller.
FloatFieldType feed_forward_
FloatFieldType & kD()
Derivative PID gain.
FloatFieldType min_output_
FloatFieldType & minTarget()
Minimum allowed value for input to the PID controller.
FloatFieldType min_target_
FloatFieldType & iClamp()
FloatFieldType max_output_
FloatFieldType & maxTarget()
Maximum allowed value for input to the PID controller.
FloatFieldType target_lowpass_
FloatFieldType dead_zone_
FloatFieldType & feedForward()
Feed forward term (this term is multiplied by the target and added to the output).
FloatFieldType & kI()
Integral PID gain.
const FloatFieldType & kD() const
Derivative PID gain.
const BoolFieldType & dOnError() const
const FloatFieldType & feedForward() const
Feed forward term (this term is multiplied by the target and added to the output).
FloatFieldType output_lowpass_
Gains(const MessageRefType &internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
const FloatFieldType & outputLowpass() const
BoolFieldType d_on_error_
FloatFieldType max_target_
Gains(MessageRefType &internal, FloatEnumType kp_gain, BoolEnumType d_on_error_gain)
FloatFieldType & maxOutput()
Output from the PID controller is limited to a maximum of this value.
const FloatFieldType & iClamp() const
const FloatFieldType & deadZone() const