85 #ifndef DOXYGEN_OMIT_INTERNAL 86 FloatField(HebiInfoPtr
internal, HebiInfoFloatField field);
87 #endif // DOXYGEN_OMIT_INTERNAL 88 explicit operator bool()
const {
return has(); }
109 HebiInfoPtr
const internal_;
110 HebiInfoFloatField
const field_;
120 #ifndef DOXYGEN_OMIT_INTERNAL 122 #endif // DOXYGEN_OMIT_INTERNAL 123 explicit operator bool()
const {
return has(); }
155 void get(int64_t* revolutions,
float* radian_offset)
const;
159 HebiInfoPtr
const internal_;
160 HebiInfoHighResAngleField
const field_;
166 #ifndef DOXYGEN_OMIT_INTERNAL 167 BoolField(HebiInfoPtr
internal, HebiInfoBoolField field);
168 #endif // DOXYGEN_OMIT_INTERNAL 177 HebiInfoPtr
const internal_;
178 HebiInfoBoolField
const field_;
184 #ifndef DOXYGEN_OMIT_INTERNAL 185 StringField(HebiInfoPtr
internal, HebiInfoStringField field);
186 #endif // DOXYGEN_OMIT_INTERNAL 187 explicit operator bool()
const {
return has(); }
204 std::string
get()
const;
208 HebiInfoPtr
const internal_;
209 HebiInfoStringField
const field_;
215 #ifndef DOXYGEN_OMIT_INTERNAL 216 FlagField(HebiInfoPtr
internal, HebiInfoFlagField field);
217 #endif // DOXYGEN_OMIT_INTERNAL 218 explicit operator bool()
const {
return has(); }
236 HebiInfoPtr
const internal_;
237 HebiInfoFlagField
const field_;
244 #ifndef DOXYGEN_OMIT_INTERNAL 245 EnumField(HebiInfoPtr
internal, HebiInfoEnumField field) : internal_(
internal), field_(field) {}
246 #endif // DOXYGEN_OMIT_INTERNAL 247 explicit operator bool()
const {
return has(); }
261 bool has()
const {
return (hebiInfoGetEnum(internal_, field_,
nullptr) == HebiStatusSuccess); }
266 hebiInfoGetEnum(internal_, field_, &ret);
267 return static_cast<T>(ret);
272 HebiInfoPtr
const internal_;
273 HebiInfoEnumField
const field_;
279 #ifndef DOXYGEN_OMIT_INTERNAL 280 LedField(HebiInfoPtr
internal, HebiInfoLedField field);
281 #endif // DOXYGEN_OMIT_INTERNAL 282 explicit operator bool()
const {
return hasColor(); }
302 HebiInfoPtr
const internal_;
303 HebiInfoLedField
const field_;
314 #ifndef DOXYGEN_OMIT_INTERNAL 316 : internal_(
internal),
317 position_gains_(
internal, HebiInfoFloatPositionKp, HebiInfoBoolPositionDOnError),
318 velocity_gains_(
internal, HebiInfoFloatVelocityKp, HebiInfoBoolVelocityDOnError),
319 effort_gains_(
internal, HebiInfoFloatEffortKp, HebiInfoBoolEffortDOnError),
320 spring_constant_(
internal, HebiInfoFloatSpringConstant),
321 velocity_limit_min_(
internal, HebiInfoFloatVelocityLimitMin),
322 velocity_limit_max_(
internal, HebiInfoFloatVelocityLimitMax),
323 effort_limit_min_(
internal, HebiInfoFloatEffortLimitMin),
324 effort_limit_max_(
internal, HebiInfoFloatEffortLimitMax),
325 position_limit_min_(
internal, HebiInfoHighResAnglePositionLimitMin),
326 position_limit_max_(
internal, HebiInfoHighResAnglePositionLimitMax),
327 control_strategy_(
internal, HebiInfoEnumControlStrategy),
328 mstop_strategy_(
internal, HebiInfoEnumMstopStrategy),
329 min_position_limit_strategy_(
internal, HebiInfoEnumMinPositionLimitStrategy),
330 max_position_limit_strategy_(
internal, HebiInfoEnumMaxPositionLimitStrategy) {}
331 #endif // DOXYGEN_OMIT_INTERNAL 372 HebiInfoPtr
const internal_;
394 #ifndef DOXYGEN_OMIT_INTERNAL 395 Imu(HebiInfoPtr
internal)
396 : internal_(
internal), accel_includes_gravity_(
internal, HebiInfoBoolAccelIncludesGravity) {}
397 #endif // DOXYGEN_OMIT_INTERNAL 409 HebiInfoPtr
const internal_;
415 #ifndef DOXYGEN_OMIT_INTERNAL 417 : internal_(internal),
420 name_(internal, HebiInfoStringName),
421 family_(internal, HebiInfoStringFamily),
422 save_current_settings_(internal, HebiInfoFlagSaveCurrentSettings) {}
423 #endif // DOXYGEN_OMIT_INTERNAL 446 HebiInfoPtr
const internal_;
459 #ifndef DOXYGEN_OMIT_INTERNAL 460 Actuator(HebiInfoPtr
internal) : internal_(
internal), calibration_state_(
internal, HebiInfoEnumCalibrationState) {}
461 #endif // DOXYGEN_OMIT_INTERNAL 473 HebiInfoPtr
const internal_;
483 HebiInfoPtr internal_;
486 #ifndef DOXYGEN_OMIT_INTERNAL 492 #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:442
std::string get() const
If the field has a value, returns a copy of that value; otherwise, returns a default.
Definition: info.cpp:60
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
Definition: info.hpp:358
Module settings that are typically changed at a slower rate.
Definition: info.hpp:309
bool has() const
True if (and only if) the field has a value.
Definition: info.cpp:56
A message field for an angle measurement which does not lose precision at very high angles.
Definition: info.hpp:118
#define HEBI_DISABLE_COPY(Class)
Definition: util.hpp:16
Actuator-specific settings, such as controller gains.
Definition: info.hpp:312
const FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
Definition: info.hpp:354
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:513
const FloatField & springConstant() const
The spring constant of the module.
Definition: info.hpp:348
T get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: info.hpp:264
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
Definition: info.hpp:356
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM.
Definition: info.hpp:362
PositionLimitStrategy
Definition: info.hpp:70
A message field representable by a bool value.
Definition: info.hpp:164
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
Definition: info.hpp:360
Actuator-specific information.
Definition: info.hpp:457
const EnumField< CalibrationState > & calibrationState() const
The calibration state of the module.
Definition: info.hpp:469
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Definition: info.hpp:431
const InfoGains & effortGains() const
Controller gains for the effort PID loop.
Definition: info.hpp:343
Info objects have various fields representing the module state; which fields are populated depends on...
Definition: info.hpp:32
const StringField & serial() const
Gets the serial number for this module (e.g., X5-0001).
Definition: info.hpp:511
MstopStrategy
Definition: info.hpp:61
CalibrationState
Definition: info.hpp:50
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:6
const Imu & imu() const
IMU-specific settings.
Definition: info.hpp:433
const InfoGains & positionGains() const
Controller gains for the position PID loop.
Definition: info.hpp:339
const Actuator & actuator() const
Actuator-specific information.
Definition: info.hpp:506
A two-state message field (either set/true or cleared/false).
Definition: info.hpp:213
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:277
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
Definition: info.hpp:350
const InfoGains & velocityGains() const
Controller gains for the velocity PID loop.
Definition: info.hpp:341
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:504
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
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:34
Info(Info &&other)
Move constructor (necessary for containment in STL template classes)
Definition: info.cpp:94
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:182
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:440
Color getColor() const
Returns the led color.
Definition: info.cpp:84
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:352
const StringField & name() const
Gets the name for this module.
Definition: info.hpp:438
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:80
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:366
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:368
Exceeding the position limit has no effect.
A message field representable by an enum of a given type.
Definition: info.hpp:242
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:364
bool has() const
Returns true if the flag is set, false if it is cleared.
Definition: info.cpp:76
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:83
The factory zero position has not been set.
bool has() const
True if (and only if) the field has a value.
Definition: info.hpp:261