86 #ifndef DOXYGEN_OMIT_INTERNAL 87 FloatField(
const HebiInfoRef&
internal, HebiInfoFloatField field);
88 #endif // DOXYGEN_OMIT_INTERNAL 89 explicit operator bool()
const {
return has(); }
110 const HebiInfoRef& internal_;
111 HebiInfoFloatField
const field_;
121 #ifndef DOXYGEN_OMIT_INTERNAL 123 #endif // DOXYGEN_OMIT_INTERNAL 124 explicit operator bool()
const {
return has(); }
156 void get(int64_t* revolutions,
float* radian_offset)
const;
160 const HebiInfoRef& internal_;
161 HebiInfoHighResAngleField
const field_;
167 #ifndef DOXYGEN_OMIT_INTERNAL 168 BoolField(
const HebiInfoRef&
internal, HebiInfoBoolField field);
169 #endif // DOXYGEN_OMIT_INTERNAL 178 const HebiInfoRef& internal_;
179 HebiInfoBoolField
const field_;
185 #ifndef DOXYGEN_OMIT_INTERNAL 186 StringField(HebiInfoPtr
internal, HebiInfoStringField field);
187 #endif // DOXYGEN_OMIT_INTERNAL 188 explicit operator bool()
const {
return has(); }
205 std::string
get()
const;
209 HebiInfoPtr
const internal_;
210 HebiInfoStringField
const field_;
216 #ifndef DOXYGEN_OMIT_INTERNAL 217 FlagField(
const HebiInfoRef&
internal, HebiInfoFlagField field);
218 #endif // DOXYGEN_OMIT_INTERNAL 219 explicit operator bool()
const {
return has(); }
237 const HebiInfoRef& internal_;
238 HebiInfoFlagField
const field_;
245 #ifndef DOXYGEN_OMIT_INTERNAL 246 EnumField(
const HebiInfoRef&
internal, HebiInfoEnumField field) : internal_(
internal), field_(field) {}
247 #endif // DOXYGEN_OMIT_INTERNAL 248 explicit operator bool()
const {
return has(); }
263 return (
enumGetter(internal_, field_,
nullptr) == HebiStatusSuccess);
270 return static_cast<T>(ret);
275 const HebiInfoRef& internal_;
276 HebiInfoEnumField
const field_;
282 #ifndef DOXYGEN_OMIT_INTERNAL 283 LedField(
const HebiInfoRef&
internal, HebiInfoLedField field);
284 #endif // DOXYGEN_OMIT_INTERNAL 285 explicit operator bool()
const {
return hasColor(); }
305 const HebiInfoRef& internal_;
306 HebiInfoLedField
const field_;
317 #ifndef DOXYGEN_OMIT_INTERNAL 318 Actuator(
const HebiInfoRef&
internal)
319 : position_gains_(
internal, HebiInfoFloatPositionKp, HebiInfoBoolPositionDOnError),
320 velocity_gains_(
internal, HebiInfoFloatVelocityKp, HebiInfoBoolVelocityDOnError),
321 effort_gains_(
internal, HebiInfoFloatEffortKp, HebiInfoBoolEffortDOnError),
322 spring_constant_(
internal, HebiInfoFloatSpringConstant),
323 velocity_limit_min_(
internal, HebiInfoFloatVelocityLimitMin),
324 velocity_limit_max_(
internal, HebiInfoFloatVelocityLimitMax),
325 effort_limit_min_(
internal, HebiInfoFloatEffortLimitMin),
326 effort_limit_max_(
internal, HebiInfoFloatEffortLimitMax),
327 position_limit_min_(
internal, HebiInfoHighResAnglePositionLimitMin),
328 position_limit_max_(
internal, HebiInfoHighResAnglePositionLimitMax),
329 control_strategy_(
internal, HebiInfoEnumControlStrategy),
330 mstop_strategy_(
internal, HebiInfoEnumMstopStrategy),
331 min_position_limit_strategy_(
internal, HebiInfoEnumMinPositionLimitStrategy),
332 max_position_limit_strategy_(
internal, HebiInfoEnumMaxPositionLimitStrategy) {}
333 #endif // DOXYGEN_OMIT_INTERNAL 394 #ifndef DOXYGEN_OMIT_INTERNAL 395 Imu(
const HebiInfoRef&
internal)
396 : accel_includes_gravity_(
internal, HebiInfoBoolAccelIncludesGravity) {}
397 #endif // DOXYGEN_OMIT_INTERNAL 413 #ifndef DOXYGEN_OMIT_INTERNAL 414 Settings(HebiInfoPtr internal_ptr,
const HebiInfoRef&
internal)
415 : actuator_(internal),
417 name_(internal_ptr, HebiInfoStringName),
418 family_(internal_ptr, HebiInfoStringFamily),
419 save_current_settings_(internal, HebiInfoFlagSaveCurrentSettings) {}
420 #endif // DOXYGEN_OMIT_INTERNAL 454 #ifndef DOXYGEN_OMIT_INTERNAL 455 Actuator(
const HebiInfoRef&
internal) : calibration_state_(
internal, HebiInfoEnumCalibrationState) {}
456 #endif // DOXYGEN_OMIT_INTERNAL 476 HebiInfoPtr internal_;
477 HebiInfoRef internal_ref_;
480 #ifndef DOXYGEN_OMIT_INTERNAL 486 #endif // DOXYGEN_OMIT_INTERNAL const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
Definition: info.hpp:439
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
Definition: info.cpp:58
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
Definition: info.hpp:360
Module settings that are typically changed at a slower rate.
Definition: info.hpp:312
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:54
A message field for an angle measurement which does not lose precision at very high angles.
Definition: info.hpp:119
#define HEBI_DISABLE_COPY(Class)
Definition: util.hpp:16
Actuator-specific settings, such as controller gains.
Definition: info.hpp:315
const FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
Definition: info.hpp:356
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:44
const LedField & led() const
The module's LED.
Definition: info.hpp:507
const FloatField & springConstant() const
The spring constant of the module.
Definition: info.hpp:350
T get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.hpp:267
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
Definition: info.hpp:358
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM.
Definition: info.hpp:364
PositionLimitStrategy
Definition: info.hpp:71
A message field representable by a bool value.
Definition: info.hpp:165
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
Definition: info.hpp:362
Actuator-specific information.
Definition: info.hpp:452
const EnumField< CalibrationState > & calibrationState() const
The calibration state of the module.
Definition: info.hpp:464
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Definition: info.hpp:428
const InfoGains & effortGains() const
Controller gains for the effort PID loop.
Definition: info.hpp:345
Info objects have various fields representing the module state; which fields are populated depends on...
Definition: info.hpp:33
const StringField & serial() const
Gets the serial number for this module (e.g., X5-0001).
Definition: info.hpp:505
MstopStrategy
Definition: info.hpp:62
CalibrationState
Definition: info.hpp:51
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:6
const Imu & imu() const
IMU-specific settings.
Definition: info.hpp:430
const InfoGains & positionGains() const
Controller gains for the position PID loop.
Definition: info.hpp:341
const Actuator & actuator() const
Actuator-specific information.
Definition: info.hpp:500
A two-state message field (either set/true or cleared/false).
Definition: info.hpp:214
const BoolField & accelIncludesGravity() const
Whether to include acceleration due to gravity in acceleration feedback.
Definition: info.hpp:405
A message field for interfacing with an LED.
Definition: info.hpp:280
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
Definition: info.hpp:352
const InfoGains & velocityGains() const
Controller gains for the velocity PID loop.
Definition: info.hpp:343
Triggering the M-Stop results in the control strategy being set to 'off'. Remains 'off' until changed...
const Settings & settings() const
Module settings that are typically changed at a slower rate.
Definition: info.hpp:498
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
Definition: message_helpers.cpp:298
The effort (e.g., spring nonlinearity) has not been calibrated.
The motor is not given power (equivalent to a 0 PWM value)
The current has not been calibrated.
Info & operator=(Info &&other)=delete
ControlStrategy
Definition: info.hpp:35
Info(Info &&other)
Move constructor (necessary for containment in STL template classes)
Definition: info.cpp:93
double get() const
If the field has a value, returns that value as a double; otherwise, returns a default.
Definition: info.cpp:26
A message field representable by a std::string.
Definition: info.hpp:183
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:9
const StringField & family() const
Gets the family for this module.
Definition: info.hpp:437
Color getColor() const
Returns the led color.
Definition: info.cpp:82
Exceeding the position limit results in the control strategy being set to 'off'. Remains 'off' until ...
float get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.cpp:11
const FloatField & velocityLimitMax() const
The firmware safety limit for the maximum allowed velocity.
Definition: info.hpp:354
const StringField & name() const
Gets the name for this module.
Definition: info.hpp:435
The module has been calibrated; this is the normal state.
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
Definition: info.cpp:78
Triggering the M-Stop has no effect.
const EnumField< PositionLimitStrategy > & minPositionLimitStrategy() const
The position limit strategy (at the minimum position) for the actuator.
Definition: info.hpp:368
bool get() const
If the field has a value, returns that value; otherwise, returns false.
Definition: info.cpp:46
const EnumField< PositionLimitStrategy > & maxPositionLimitStrategy() const
The position limit strategy (at the maximum position) for the actuator.
Definition: info.hpp:370
Exceeding the position limit has no effect.
A message field representable by an enum of a given type.
Definition: info.hpp:243
Structure to describe an RGB color.
Definition: color.hpp:8
IMU-specific settings.
Definition: info.hpp:392
Exceeding the position limit results in the actuator holding the position. Needs to be manually set t...
Exceeding the position limit results in a virtual spring that pushes the actuator back to within the ...
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:22
const EnumField< MstopStrategy > & mstopStrategy() const
The motion stop strategy for the actuator.
Definition: info.hpp:366
bool has() const
Returns true if the flag is set, false if it is cleared.
Definition: info.cpp:74
Triggering the M-Stop results in the motor holding the motor position. Operations resume to normal on...
A message field representable by a single-precision floating point value.
Definition: info.hpp:84
The factory zero position has not been set.
bool has() const
True if (and only if) the field has a value.
Definition: info.hpp:262