51 #ifndef DOXYGEN_OMIT_INTERNAL 52 FloatField(HebiInfoPtr
internal, HebiInfoFloatField field);
53 #endif // DOXYGEN_OMIT_INTERNAL 54 explicit operator bool()
const;
74 HebiInfoPtr
const internal_;
75 HebiInfoFloatField
const field_;
83 #ifndef DOXYGEN_OMIT_INTERNAL 84 BoolField(HebiInfoPtr
internal, HebiInfoBoolField field);
85 #endif // DOXYGEN_OMIT_INTERNAL 93 HebiInfoPtr
const internal_;
94 HebiInfoBoolField
const field_;
103 #ifndef DOXYGEN_OMIT_INTERNAL 104 StringField(HebiInfoPtr
internal, HebiInfoStringField field);
105 #endif // DOXYGEN_OMIT_INTERNAL 106 explicit operator bool()
const;
123 std::string
get()
const;
126 HebiInfoPtr
const internal_;
127 HebiInfoStringField
const field_;
136 #ifndef DOXYGEN_OMIT_INTERNAL 137 FlagField(HebiInfoPtr
internal, HebiInfoFlagField field);
138 #endif // DOXYGEN_OMIT_INTERNAL 139 explicit operator bool()
const;
156 HebiInfoPtr
const internal_;
157 HebiInfoFlagField
const field_;
167 #ifndef DOXYGEN_OMIT_INTERNAL 168 EnumField(HebiInfoPtr
internal, HebiInfoEnumField field)
169 : internal_(
internal), field_(field) {}
170 #endif // DOXYGEN_OMIT_INTERNAL 171 explicit operator bool()
const {
return has(); }
185 bool has()
const {
return (hebiInfoGetEnum(internal_, field_,
nullptr) == HebiStatusSuccess); }
188 T
get()
const { T ret; hebiInfoGetEnum(internal_, field_, reinterpret_cast<int*>(&ret));
return ret; }
191 HebiInfoPtr
const internal_;
192 HebiInfoEnumField
const field_;
201 #ifndef DOXYGEN_OMIT_INTERNAL 202 LedField(HebiInfoPtr
internal, HebiInfoLedField field);
203 #endif // DOXYGEN_OMIT_INTERNAL 204 explicit operator bool()
const {
return hasColor(); }
218 bool hasColor()
const;
220 Color getColor()
const;
223 HebiInfoPtr
const internal_;
224 HebiInfoLedField
const field_;
243 #ifndef DOXYGEN_OMIT_INTERNAL 245 : internal_(
internal),
246 position_kp_(
internal, HebiInfoFloatPositionKp),
247 position_ki_(
internal, HebiInfoFloatPositionKi),
248 position_kd_(
internal, HebiInfoFloatPositionKd),
249 position_feed_forward_(
internal, HebiInfoFloatPositionFeedForward),
250 position_dead_zone_(
internal, HebiInfoFloatPositionDeadZone),
251 position_i_clamp_(
internal, HebiInfoFloatPositionIClamp),
252 position_punch_(
internal, HebiInfoFloatPositionPunch),
253 position_min_target_(
internal, HebiInfoFloatPositionMinTarget),
254 position_max_target_(
internal, HebiInfoFloatPositionMaxTarget),
255 position_target_lowpass_(
internal, HebiInfoFloatPositionTargetLowpass),
256 position_min_output_(
internal, HebiInfoFloatPositionMinOutput),
257 position_max_output_(
internal, HebiInfoFloatPositionMaxOutput),
258 position_output_lowpass_(
internal, HebiInfoFloatPositionOutputLowpass),
259 position_d_on_error_(
internal, HebiInfoBoolPositionDOnError)
262 #endif // DOXYGEN_OMIT_INTERNAL 299 HebiInfoPtr
const internal_;
323 #ifndef DOXYGEN_OMIT_INTERNAL 325 : internal_(
internal),
326 velocity_kp_(
internal, HebiInfoFloatVelocityKp),
327 velocity_ki_(
internal, HebiInfoFloatVelocityKi),
328 velocity_kd_(
internal, HebiInfoFloatVelocityKd),
329 velocity_feed_forward_(
internal, HebiInfoFloatVelocityFeedForward),
330 velocity_dead_zone_(
internal, HebiInfoFloatVelocityDeadZone),
331 velocity_i_clamp_(
internal, HebiInfoFloatVelocityIClamp),
332 velocity_punch_(
internal, HebiInfoFloatVelocityPunch),
333 velocity_min_target_(
internal, HebiInfoFloatVelocityMinTarget),
334 velocity_max_target_(
internal, HebiInfoFloatVelocityMaxTarget),
335 velocity_target_lowpass_(
internal, HebiInfoFloatVelocityTargetLowpass),
336 velocity_min_output_(
internal, HebiInfoFloatVelocityMinOutput),
337 velocity_max_output_(
internal, HebiInfoFloatVelocityMaxOutput),
338 velocity_output_lowpass_(
internal, HebiInfoFloatVelocityOutputLowpass),
339 velocity_d_on_error_(
internal, HebiInfoBoolVelocityDOnError)
342 #endif // DOXYGEN_OMIT_INTERNAL 379 HebiInfoPtr
const internal_;
403 #ifndef DOXYGEN_OMIT_INTERNAL 405 : internal_(
internal),
406 effort_kp_(
internal, HebiInfoFloatEffortKp),
407 effort_ki_(
internal, HebiInfoFloatEffortKi),
408 effort_kd_(
internal, HebiInfoFloatEffortKd),
409 effort_feed_forward_(
internal, HebiInfoFloatEffortFeedForward),
410 effort_dead_zone_(
internal, HebiInfoFloatEffortDeadZone),
411 effort_i_clamp_(
internal, HebiInfoFloatEffortIClamp),
412 effort_punch_(
internal, HebiInfoFloatEffortPunch),
413 effort_min_target_(
internal, HebiInfoFloatEffortMinTarget),
414 effort_max_target_(
internal, HebiInfoFloatEffortMaxTarget),
415 effort_target_lowpass_(
internal, HebiInfoFloatEffortTargetLowpass),
416 effort_min_output_(
internal, HebiInfoFloatEffortMinOutput),
417 effort_max_output_(
internal, HebiInfoFloatEffortMaxOutput),
418 effort_output_lowpass_(
internal, HebiInfoFloatEffortOutputLowpass),
419 effort_d_on_error_(
internal, HebiInfoBoolEffortDOnError)
422 #endif // DOXYGEN_OMIT_INTERNAL 459 HebiInfoPtr
const internal_;
480 #ifndef DOXYGEN_OMIT_INTERNAL 482 : internal_(
internal),
483 position_gains_(
internal),
484 velocity_gains_(
internal),
485 effort_gains_(
internal),
486 spring_constant_(
internal, HebiInfoFloatSpringConstant),
487 control_strategy_(
internal, HebiInfoEnumControlStrategy)
490 #endif // DOXYGEN_OMIT_INTERNAL 512 HebiInfoPtr
const internal_;
525 #ifndef DOXYGEN_OMIT_INTERNAL 527 : internal_(
internal),
529 name_(
internal, HebiInfoStringName),
530 family_(
internal, HebiInfoStringFamily),
531 save_current_settings_(
internal, HebiInfoFlagSaveCurrentSettings)
534 #endif // DOXYGEN_OMIT_INTERNAL 554 HebiInfoPtr
const internal_;
570 HebiInfoPtr internal_;
573 #ifndef DOXYGEN_OMIT_INTERNAL 579 #endif // DOXYGEN_OMIT_INTERNAL 587 virtual ~Info() noexcept;
613 Info& operator= (
const Info&& other) =
delete;
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
Definition: info.hpp:36
Controller gains for the effort PID loop.
Definition: info.hpp:400
const BoolField & positionDOnError() 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.
Definition: info.hpp:296
const FloatField & positionMaxOutput() const
Output from the PID controller is limited to a maximum of this value.
Definition: info.hpp:292
const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
Definition: info.hpp:551
Module settings that are typically changed at a slower rate.
Definition: info.hpp:230
#define HEBI_DISABLE_COPY(Class)
Definition: util.hpp:17
Actuator-specific settings, such as controller gains.
Definition: info.hpp:235
const BoolField & effortDOnError() 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.
Definition: info.hpp:456
const FloatField & positionTargetLowpass() const
A simple lowpass filter applied to the target set point; needs to be between 0 and 1...
Definition: info.hpp:288
const FloatField & positionOutputLowpass() const
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
Definition: info.hpp:294
The motor is not given power (equivalent to a 0 PWM value)
Definition: info.hpp:34
const FloatField & velocityMaxOutput() const
Output from the PID controller is limited to a maximum of this value.
Definition: info.hpp:372
A message field representable by a bool value.
Definition: info.hpp:80
const FloatField & effortMaxTarget() const
Maximum allowed value for input to the PID controller.
Definition: info.hpp:446
const Settings & settings() const
Module settings that are typically changed at a slower rate.
Definition: info.hpp:595
const FloatField & effortTargetLowpass() const
A simple lowpass filter applied to the target set point; needs to be between 0 and 1...
Definition: info.hpp:448
A combination of the position, velocity, and effort loops with P, V, and T feeding to PWM; documented...
Definition: info.hpp:40
const FloatField & positionPunch() const
Constant offset to the position PID output outside of the deadzone; it is added when the error is pos...
Definition: info.hpp:282
const StringField & name() const
Sets the name for this module. Name must be null-terminated character string for the name; must be <=...
Definition: info.hpp:547
const FloatField & velocityDeadZone() const
Error values within +/- this value from zero are treated as zero (in terms of computed proportional o...
Definition: info.hpp:358
virtual ~Info() noexcept
Cleans up info object as necessary.
Definition: info.cpp:116
const FloatField & positionMinOutput() const
Output from the PID controller is limited to a minimum of this value.
Definition: info.hpp:290
const BoolField & velocityDOnError() 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.
Definition: info.hpp:376
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Definition: info.hpp:542
Info objects have various fields representing the module state; which fields are populated depends on...
Definition: info.hpp:29
const FloatField & velocityMaxTarget() const
Maximum allowed value for input to the PID controller.
Definition: info.hpp:366
const FloatField & effortKd() const
Derivative PID gain for effort.
Definition: info.hpp:434
const FloatField & velocityIClamp() const
Maximum allowed value for the output of the integral component of the PID loop; the integrated error ...
Definition: info.hpp:360
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:7
const FloatField & effortKi() const
Integral PID gain for effort.
Definition: info.hpp:432
A two-state message field (either set/true or cleared/false).
Definition: info.hpp:133
const FloatField & springConstant() const
The spring constant of the module.
Definition: info.hpp:507
const FloatField & effortOutputLowpass() const
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
Definition: info.hpp:454
const FloatField & velocityTargetLowpass() const
A simple lowpass filter applied to the target set point; needs to be between 0 and 1...
Definition: info.hpp:368
A message field for interfacing with an LED.
Definition: info.hpp:198
const FloatField & positionKd() const
Derivative PID gain for position.
Definition: info.hpp:274
const VelocityGains & velocityGains() const
Controller gains for the velocity PID loop.
Definition: info.hpp:500
const FloatField & velocityMinTarget() const
Minimum allowed value for input to the PID controller.
Definition: info.hpp:364
const FloatField & velocityPunch() const
Constant offset to the velocity PID output outside of the deadzone; it is added when the error is pos...
Definition: info.hpp:362
const LedField & led() const
The module's LED.
Definition: info.cpp:129
bool has() const
True if (and only if) the field has a value.
Definition: info.hpp:185
const FloatField & effortMinTarget() const
Minimum allowed value for input to the PID controller.
Definition: info.hpp:444
const StringField & family() const
Sets the family for this module. Name must be null-terminated character string for the family; must b...
Definition: info.hpp:549
const FloatField & positionKp() const
Proportional PID gain for position.
Definition: info.hpp:270
const FloatField & velocityKp() const
Proportional PID gain for velocity.
Definition: info.hpp:350
const FloatField & effortMinOutput() const
Output from the PID controller is limited to a minimum of this value.
Definition: info.hpp:450
ControlStrategy
Definition: info.hpp:32
const FloatField & positionMinTarget() const
Minimum allowed value for input to the PID controller.
Definition: info.hpp:284
Info(Info &&other)
Move constructor (necessary for containment in STL template classes)
Definition: info.cpp:110
const PositionGains & positionGains() const
Controller gains for the position PID loop.
Definition: info.hpp:498
const FloatField & positionDeadZone() const
Error values within +/- this value from zero are treated as zero (in terms of computed proportional o...
Definition: info.hpp:278
A message field representable by a std::string.
Definition: info.hpp:100
const FloatField & effortMaxOutput() const
Output from the PID controller is limited to a maximum of this value.
Definition: info.hpp:452
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
Definition: info.hpp:509
const FloatField & effortIClamp() const
Maximum allowed value for the output of the integral component of the PID loop; the integrated error ...
Definition: info.hpp:440
const FloatField & positionKi() const
Integral PID gain for position.
Definition: info.hpp:272
const FloatField & positionIClamp() const
Maximum allowed value for the output of the integral component of the PID loop; the integrated error ...
Definition: info.hpp:280
Controller gains for the position PID loop.
Definition: info.hpp:240
const FloatField & velocityKi() const
Integral PID gain for velocity.
Definition: info.hpp:352
const FloatField & effortKp() const
Proportional PID gain for effort.
Definition: info.hpp:430
A combination of the position, velocity, and effort loops with P feeding to T and V feeding to PWM; d...
Definition: info.hpp:42
const FloatField & effortFeedForward() const
Feed forward term for effort (this term is multiplied by the target and added to the output)...
Definition: info.hpp:436
const FloatField & positionMaxTarget() const
Maximum allowed value for input to the PID controller.
Definition: info.hpp:286
const FloatField & velocityFeedForward() const
Feed forward term for velocity (this term is multiplied by the target and added to the output)...
Definition: info.hpp:356
const FloatField & positionFeedForward() const
Feed forward term for position (this term is multiplied by the target and added to the output)...
Definition: info.hpp:276
const FloatField & effortPunch() const
Constant offset to the effort PID output outside of the deadzone; it is added when the error is posit...
Definition: info.hpp:442
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:16
A combination of the position, velocity, and effort loops with P and V feeding to T; documented on do...
Definition: info.hpp:38
A message field representable by an enum of a given type.
Definition: info.hpp:164
const EffortGains & effortGains() const
Controller gains for the effort PID loop.
Definition: info.hpp:502
Structure to describe an RGB color.
Definition: color.hpp:8
const FloatField & velocityMinOutput() const
Output from the PID controller is limited to a minimum of this value.
Definition: info.hpp:370
const FloatField & effortDeadZone() const
Error values within +/- this value from zero are treated as zero (in terms of computed proportional o...
Definition: info.hpp:438
A message field representable by a single-precision floating point value.
Definition: info.hpp:48
const FloatField & velocityKd() const
Derivative PID gain for velocity.
Definition: info.hpp:354
Controller gains for the velocity PID loop.
Definition: info.hpp:320
A message field representable by an enum of a given type.
Definition: command.hpp:286
const FloatField & velocityOutputLowpass() const
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
Definition: info.hpp:374