HEBI C++ API  3.15.0
feedback.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 
5 #include "color.hpp"
6 #include "quaternion_f.hpp"
7 #include "message_helpers.hpp"
8 #include "util.hpp"
9 #include "vector_3_f.hpp"
10 
11 namespace hebi {
12 
32 class Feedback final {
33 public:
34  enum class TemperatureState {
36  Normal,
38  Critical,
43  };
44 
45  enum class MstopState {
47  Triggered,
50  };
51 
52  enum class PositionLimitState {
55  Below,
57  AtLower,
59  Inside,
61  AtUpper,
64  Above,
67  };
68 
69  enum class VelocityLimitState {
72  Below,
74  AtLower,
76  Inside,
78  AtUpper,
81  Above,
84  };
85 
86  enum class EffortLimitState {
89  Below,
91  AtLower,
93  Inside,
95  AtUpper,
98  Above,
101  };
102 
103  enum class CommandLifetimeState {
105  Unlocked,
110  };
111 
112  enum class ArQuality {
128  };
129 
130  enum class MotorHallState {
131  State0,
132  State1,
133  State2,
134  State3,
135  State4,
136  State5,
137  Error,
138  };
139 
140  enum class DrivetrainState {
141  Normal,
145  SafetyFault,
146  };
147 
148 protected:
150  class FloatField final {
151  public:
152 #ifndef DOXYGEN_OMIT_INTERNAL
153  FloatField(const HebiFeedbackRef& internal, HebiFeedbackFloatField field);
154 #endif // DOXYGEN_OMIT_INTERNAL
155  explicit operator bool() const { return has(); }
169  bool has() const;
172  float get() const;
173 
175  private:
176  const HebiFeedbackRef& internal_;
177  HebiFeedbackFloatField const field_;
178  };
179 
185  class HighResAngleField final {
186  public:
187 #ifndef DOXYGEN_OMIT_INTERNAL
188  HighResAngleField(const HebiFeedbackRef& internal, HebiFeedbackHighResAngleField field);
189 #endif // DOXYGEN_OMIT_INTERNAL
190  explicit operator bool() const { return has(); }
204  bool has() const;
210  double get() const;
222  void get(int64_t* revolutions, float* radian_offset) const;
223 
225  private:
226  const HebiFeedbackRef& internal_;
227  HebiFeedbackHighResAngleField const field_;
228  };
229 
232  class NumberedFloatField final {
233  public:
234 #ifndef DOXYGEN_OMIT_INTERNAL
235  NumberedFloatField(const HebiFeedbackRef& internal, HebiFeedbackNumberedFloatField field);
236 #endif // DOXYGEN_OMIT_INTERNAL
237  bool has(size_t fieldNumber) const;
248  float get(size_t fieldNumber) const;
249 
251  private:
252  const HebiFeedbackRef& internal_;
253  HebiFeedbackNumberedFloatField const field_;
254  };
255 
257  class UInt64Field final {
258  public:
259 #ifndef DOXYGEN_OMIT_INTERNAL
260  UInt64Field(const HebiFeedbackRef& internal, HebiFeedbackUInt64Field field);
261 #endif // DOXYGEN_OMIT_INTERNAL
262  explicit operator bool() const { return has(); }
276  bool has() const;
279  uint64_t get() const;
280 
282  private:
283  const HebiFeedbackRef& internal_;
284  HebiFeedbackUInt64Field const field_;
285  };
286 
289  class Vector3fField final {
290  public:
291 #ifndef DOXYGEN_OMIT_INTERNAL
292  Vector3fField(const HebiFeedbackRef& internal, HebiFeedbackVector3fField field);
293 #endif // DOXYGEN_OMIT_INTERNAL
294  explicit operator bool() const { return has(); }
308  bool has() const;
311  Vector3f get() const;
312 
314  private:
315  const HebiFeedbackRef& internal_;
316  HebiFeedbackVector3fField const field_;
317  };
318 
321  class QuaternionfField final {
322  public:
323 #ifndef DOXYGEN_OMIT_INTERNAL
324  QuaternionfField(const HebiFeedbackRef& internal, HebiFeedbackQuaternionfField field);
325 #endif // DOXYGEN_OMIT_INTERNAL
326  explicit operator bool() const { return has(); }
340  bool has() const;
343  Quaternionf get() const;
344 
346  private:
347  const HebiFeedbackRef& internal_;
348  HebiFeedbackQuaternionfField const field_;
349  };
350 
352  template<typename T>
353  class EnumField final {
354  public:
355 #ifndef DOXYGEN_OMIT_INTERNAL
356  EnumField(const HebiFeedbackRef& internal, HebiFeedbackEnumField field) : internal_(internal), field_(field) {}
357 #endif // DOXYGEN_OMIT_INTERNAL
358  explicit operator bool() const { return has(); }
372  bool has() const {
373  return (enumGetter(internal_, field_, nullptr) == HebiStatusSuccess);
374  }
377  T get() const {
378  int32_t ret{};
379  enumGetter(internal_, field_, &ret);
380  return static_cast<T>(ret);
381  }
382 
384  private:
385  const HebiFeedbackRef& internal_;
386  HebiFeedbackEnumField const field_;
387  };
388 
390  class IoBank final {
391  public:
392 #ifndef DOXYGEN_OMIT_INTERNAL
393  IoBank(const HebiFeedbackRef& internal, HebiFeedbackIoPinBank bank);
394 #endif // DOXYGEN_OMIT_INTERNAL
395  bool hasInt(size_t pinNumber) const;
406  bool hasFloat(size_t pinNumber) const;
412  int64_t getInt(size_t pinNumber) const;
419  float getFloat(size_t pinNumber) const;
420 
422  private:
423  const HebiFeedbackRef& internal_;
424  HebiFeedbackIoPinBank const bank_;
425  };
426 
428  class LedField final {
429  public:
430 #ifndef DOXYGEN_OMIT_INTERNAL
431  LedField(const HebiFeedbackRef& internal, HebiFeedbackLedField field);
432 #endif // DOXYGEN_OMIT_INTERNAL
433  explicit operator bool() const { return hasColor(); }
447  bool hasColor() const;
449  Color getColor() const;
450 
452  private:
453  const HebiFeedbackRef& internal_;
454  HebiFeedbackLedField const field_;
455  };
456 
458  class Io final {
459  public:
460 #ifndef DOXYGEN_OMIT_INTERNAL
461  Io(const HebiFeedbackRef& internal)
462  : a_(internal, HebiFeedbackIoBankA),
463  b_(internal, HebiFeedbackIoBankB),
464  c_(internal, HebiFeedbackIoBankC),
465  d_(internal, HebiFeedbackIoBankD),
466  e_(internal, HebiFeedbackIoBankE),
467  f_(internal, HebiFeedbackIoBankF) {}
468 #endif // DOXYGEN_OMIT_INTERNAL
469 
470  // With all submessage and field getters: Note that the returned reference
471  // should not be used after the lifetime of this parent.
472 
473  // Subfields ----------------
474 
476  const IoBank& a() const { return a_; }
478  const IoBank& b() const { return b_; }
480  const IoBank& c() const { return c_; }
482  const IoBank& d() const { return d_; }
484  const IoBank& e() const { return e_; }
486  const IoBank& f() const { return f_; }
487 
489  private:
490  IoBank a_;
491  IoBank b_;
492  IoBank c_;
493  IoBank d_;
494  IoBank e_;
495  IoBank f_;
496  };
497 
499  class Actuator final {
500  public:
501 #ifndef DOXYGEN_OMIT_INTERNAL
502  Actuator(const HebiFeedbackRef& internal)
503  : velocity_(internal, HebiFeedbackFloatVelocity),
504  effort_(internal, HebiFeedbackFloatEffort),
505  velocity_command_(internal, HebiFeedbackFloatVelocityCommand),
506  effort_command_(internal, HebiFeedbackFloatEffortCommand),
507  deflection_(internal, HebiFeedbackFloatDeflection),
508  deflection_velocity_(internal, HebiFeedbackFloatDeflectionVelocity),
509  motor_velocity_(internal, HebiFeedbackFloatMotorVelocity),
510  motor_current_(internal, HebiFeedbackFloatMotorCurrent),
511  motor_sensor_temperature_(internal, HebiFeedbackFloatMotorSensorTemperature),
512  motor_winding_current_(internal, HebiFeedbackFloatMotorWindingCurrent),
513  motor_winding_temperature_(internal, HebiFeedbackFloatMotorWindingTemperature),
514  motor_housing_temperature_(internal, HebiFeedbackFloatMotorHousingTemperature),
515  pwm_command_(internal, HebiFeedbackFloatPwmCommand),
516  inner_effort_command_(internal, HebiFeedbackFloatInnerEffortCommand),
517  position_(internal, HebiFeedbackHighResAnglePosition),
518  position_command_(internal, HebiFeedbackHighResAnglePositionCommand),
519  motor_position_(internal, HebiFeedbackHighResAngleMotorPosition),
520  temperature_state_(internal, HebiFeedbackEnumTemperatureState),
521  mstop_state_(internal, HebiFeedbackEnumMstopState),
522  position_limit_state_(internal, HebiFeedbackEnumPositionLimitState),
523  velocity_limit_state_(internal, HebiFeedbackEnumVelocityLimitState),
524  effort_limit_state_(internal, HebiFeedbackEnumEffortLimitState),
525  command_lifetime_state_(internal, HebiFeedbackEnumCommandLifetimeState),
526  motor_hall_state_(internal, HebiFeedbackEnumMotorHallState),
527  drivetrain_state_(internal, HebiFeedbackEnumDrivetrainState) {}
528 #endif // DOXYGEN_OMIT_INTERNAL
529 
530  // With all submessage and field getters: Note that the returned reference
531  // should not be used after the lifetime of this parent.
532 
533  // Subfields ----------------
534 
536  const FloatField& velocity() const { return velocity_; }
538  const FloatField& effort() const { return effort_; }
540  const FloatField& velocityCommand() const { return velocity_command_; }
542  const FloatField& effortCommand() const { return effort_command_; }
544  const FloatField& deflection() const { return deflection_; }
546  const FloatField& deflectionVelocity() const { return deflection_velocity_; }
548  const FloatField& motorVelocity() const { return motor_velocity_; }
550  const FloatField& motorCurrent() const { return motor_current_; }
552  const FloatField& motorSensorTemperature() const { return motor_sensor_temperature_; }
554  const FloatField& motorWindingCurrent() const { return motor_winding_current_; }
556  const FloatField& motorWindingTemperature() const { return motor_winding_temperature_; }
558  const FloatField& motorHousingTemperature() const { return motor_housing_temperature_; }
560  const FloatField& pwmCommand() const { return pwm_command_; }
562  const FloatField& innerEffortCommand() const { return inner_effort_command_; }
564  const HighResAngleField& position() const { return position_; }
566  const HighResAngleField& positionCommand() const { return position_command_; }
568  const HighResAngleField& motorPosition() const { return motor_position_; }
570  const EnumField<TemperatureState>& temperatureState() const { return temperature_state_; }
572  const EnumField<MstopState>& mstopState() const { return mstop_state_; }
574  const EnumField<PositionLimitState>& positionLimitState() const { return position_limit_state_; }
576  const EnumField<VelocityLimitState>& velocityLimitState() const { return velocity_limit_state_; }
578  const EnumField<EffortLimitState>& effortLimitState() const { return effort_limit_state_; }
580  const EnumField<CommandLifetimeState>& commandLifetimeState() const { return command_lifetime_state_; }
582  const EnumField<MotorHallState>& motorHallState() const { return motor_hall_state_; }
584  const EnumField<DrivetrainState>& drivetrainState() const { return drivetrain_state_; }
586  private:
587  FloatField velocity_;
588  FloatField effort_;
589  FloatField velocity_command_;
590  FloatField effort_command_;
591  FloatField deflection_;
592  FloatField deflection_velocity_;
593  FloatField motor_velocity_;
594  FloatField motor_current_;
595  FloatField motor_sensor_temperature_;
596  FloatField motor_winding_current_;
597  FloatField motor_winding_temperature_;
598  FloatField motor_housing_temperature_;
599  FloatField pwm_command_;
600  FloatField inner_effort_command_;
601  HighResAngleField position_;
602  HighResAngleField position_command_;
603  HighResAngleField motor_position_;
604  EnumField<TemperatureState> temperature_state_;
605  EnumField<MstopState> mstop_state_;
606  EnumField<PositionLimitState> position_limit_state_;
607  EnumField<VelocityLimitState> velocity_limit_state_;
608  EnumField<EffortLimitState> effort_limit_state_;
609  EnumField<CommandLifetimeState> command_lifetime_state_;
610  EnumField<MotorHallState> motor_hall_state_;
611  EnumField<DrivetrainState> drivetrain_state_;
612  };
613 
615  class Mobile final {
616  public:
617 #ifndef DOXYGEN_OMIT_INTERNAL
618  Mobile(const HebiFeedbackRef& internal)
619  : battery_level_(internal, HebiFeedbackFloatBatteryLevel),
620  ar_position_(internal, HebiFeedbackVector3fArPosition),
621  ar_orientation_(internal, HebiFeedbackQuaternionfArOrientation),
622  ar_quality_(internal, HebiFeedbackEnumArQuality) {}
623 #endif // DOXYGEN_OMIT_INTERNAL
624 
625  // With all submessage and field getters: Note that the returned reference
626  // should not be used after the lifetime of this parent.
627 
628  // Subfields ----------------
629 
631  const FloatField& batteryLevel() const { return battery_level_; }
633  const Vector3fField& arPosition() const { return ar_position_; }
635  const QuaternionfField& arOrientation() const { return ar_orientation_; }
637  const EnumField<ArQuality>& arQuality() const { return ar_quality_; }
638 
640  private:
641  FloatField battery_level_;
642  Vector3fField ar_position_;
643  QuaternionfField ar_orientation_;
644  EnumField<ArQuality> ar_quality_;
645  };
646 
648  class Imu final {
649  public:
650 #ifndef DOXYGEN_OMIT_INTERNAL
651  Imu(const HebiFeedbackRef& internal)
652  : accelerometer_(internal, HebiFeedbackVector3fAccelerometer),
653  gyro_(internal, HebiFeedbackVector3fGyro),
654  orientation_(internal, HebiFeedbackQuaternionfOrientation) {}
655 #endif // DOXYGEN_OMIT_INTERNAL
656 
657  // With all submessage and field getters: Note that the returned reference
658  // should not be used after the lifetime of this parent.
659 
660  // Subfields ----------------
661 
663  const Vector3fField& accelerometer() const { return accelerometer_; }
665  const Vector3fField& gyro() const { return gyro_; }
667  const QuaternionfField& orientation() const { return orientation_; }
668 
670  private:
671  Vector3fField accelerometer_;
672  Vector3fField gyro_;
673  QuaternionfField orientation_;
674  };
675 
676 private:
681  HebiFeedbackPtr internal_;
682  HebiFeedbackRef internal_ref_;
683 
684 public:
685 #ifndef DOXYGEN_OMIT_INTERNAL
686 
690  Feedback(HebiFeedbackPtr);
691 #endif // DOXYGEN_OMIT_INTERNAL
692 
695  Feedback(Feedback&& other);
696 
697  // With all submessage and field getters: Note that the returned reference
698  // should not be used after the lifetime of this parent.
699 
700  // Submessages -------------------------------------------------------------
701 
703  const Io& io() const { return io_; }
705  const Actuator& actuator() const { return actuator_; }
707  const Mobile& mobile() const { return mobile_; }
709  const Imu& imu() const { return imu_; }
710 
711  // Subfields -------------------------------------------------------------
712 
714  const FloatField& boardTemperature() const { return board_temperature_; }
716  const FloatField& processorTemperature() const { return processor_temperature_; }
718  const FloatField& voltage() const { return voltage_; }
719 #ifndef DOXYGEN_OMIT_INTERNAL
720  const NumberedFloatField& debug() const { return debug_; }
722 #endif // DOXYGEN_OMIT_INTERNAL
723  const UInt64Field& sequenceNumber() const { return sequence_number_; }
726  const UInt64Field& receiveTimeUs() const { return receive_time_us_; }
728  const UInt64Field& transmitTimeUs() const { return transmit_time_us_; }
730  const UInt64Field& hardwareReceiveTimeUs() const { return hardware_receive_time_us_; }
732  const UInt64Field& hardwareTransmitTimeUs() const { return hardware_transmit_time_us_; }
734  const UInt64Field& senderId() const { return sender_id_; }
736  const UInt64Field& rxSequenceNumber() const { return rx_sequence_number_; }
738  const LedField& led() const { return led_; }
740  const Vector3fField& force() const { return force_; }
742  const Vector3fField& torque() const { return torque_; }
743 
748 
749  /* Disable move assigment operator. */
750  Feedback& operator=(Feedback&& other) = delete;
751 
752 private:
753  Io io_;
754  Actuator actuator_;
755  Mobile mobile_;
756  Imu imu_;
757 
758  FloatField board_temperature_;
759  FloatField processor_temperature_;
760  FloatField voltage_;
761  NumberedFloatField debug_;
762  UInt64Field sequence_number_;
763  UInt64Field receive_time_us_;
764  UInt64Field transmit_time_us_;
765  UInt64Field hardware_receive_time_us_;
766  UInt64Field hardware_transmit_time_us_;
767  UInt64Field sender_id_;
768  UInt64Field rx_sequence_number_;
769  LedField led_;
770  Vector3fField force_;
771  Vector3fField torque_;
772 };
773 
774 } // namespace hebi
bool has() const
True if (and only if) the field has a value.
Definition: feedback.cpp:14
The AR session is attempting to resume after an interruption.
The module has not been inside the safety limits since it was booted or the safety limits were set.
VelocityLimitState
Definition: feedback.hpp:69
const FloatField & voltage() const
Bus voltage that the module is running at (in Volts).
Definition: feedback.hpp:718
bool has(size_t fieldNumber) const
True if (and only if) the particular numbered subvalue of this field has a value.
Definition: feedback.cpp:52
const FloatField & deflection() const
Difference (in radians) between the pre-spring and post-spring output position.
Definition: feedback.hpp:544
bool has() const
True if (and only if) the field has a value.
Definition: feedback.hpp:372
const FloatField & motorVelocity() const
The velocity (in radians/second) of the motor shaft.
Definition: feedback.hpp:548
Camera position tracking is not available.
const IoBank & e() const
I/O pin bank e (pins 1-8 available)
Definition: feedback.hpp:484
Structure to hold a 3-D floating point vector (i.e., x/y/z components)
Definition: vector_3_f.hpp:8
#define HEBI_DISABLE_COPY(Class)
Definition: util.hpp:16
bool has() const
True if (and only if) the field has a value.
Definition: feedback.cpp:29
PositionLimitState
Definition: feedback.hpp:52
DrivetrainState
Definition: feedback.hpp:140
Commands are locked out due to control from other users.
Tracking is available albeit suboptimal for an unknown reason.
The device is moving too fast for accurate image-based position tracking.
const UInt64Field & hardwareTransmitTimeUs() const
Timestamp of when message was transmitted from module (remote; microseconds)
Definition: feedback.hpp:732
int64_t getInt(size_t pinNumber) const
If this numbered pin in this bank has an integer (e.g., digital) value, returns that value; otherwise...
Definition: feedback.cpp:124
Definition: arm.cpp:10
float getFloat(size_t pinNumber) const
If this numbered pin in this bank has an floating point (e.g., analog or PWM) value,...
Definition: feedback.cpp:130
Structure to hold a floating point quaternion (i.e., w/x/y/z components)
Definition: quaternion_f.hpp:8
double get() const
If the field has a value, returns that value as a double; otherwise, returns a default.
Definition: feedback.cpp:33
const Mobile & mobile() const
Feedback generally from a mobile device such as a phone or tablet.
Definition: feedback.hpp:707
const EnumField< MstopState > & mstopState() const
Current status of the MStop.
Definition: feedback.hpp:572
const HighResAngleField & positionCommand() const
Commanded position of the module output (post-spring), in radians.
Definition: feedback.hpp:566
const FloatField & effort() const
Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages).
Definition: feedback.hpp:538
CommandLifetimeState
Definition: feedback.hpp:103
const FloatField & innerEffortCommand() const
In control strategies 2 and 4, this is the torque of force command going to the inner torque PID loop...
Definition: feedback.hpp:562
const EnumField< EffortLimitState > & effortLimitState() const
Software-controlled bounds on the allowable effort of the module.
Definition: feedback.hpp:578
#define HEBI_DISABLE_COPY_MOVE(Class)
Definition: util.hpp:6
const Vector3fField & arPosition() const
A device's position in the world as calculated from an augmented reality framework,...
Definition: feedback.hpp:633
const UInt64Field & rxSequenceNumber() const
Sequence number of incoming packet per module (local)
Definition: feedback.hpp:736
A message field representable by a single-precision floating point value.
Definition: feedback.hpp:150
Inertial measurement unit feedback (accelerometers and gyros).
Definition: feedback.hpp:648
Feedback objects have various fields representing feedback from modules; which fields are populated d...
Definition: feedback.hpp:32
A message field for interfacing with a bank of I/O pins.
Definition: feedback.hpp:390
bool hasInt(size_t pinNumber) const
True if (and only if) the particular numbered pin in this bank has an integer (e.g....
Definition: feedback.cpp:116
The effort of the module was near the upper safety limit, and the motor output is being limited or re...
const IoBank & d() const
I/O pin bank d (pins 1-8 available)
Definition: feedback.hpp:482
The AR session has not yet gathered enough camera or motion data to provide tracking information.
A message field representable by a 3-D vector of single-precision floating point values.
Definition: feedback.hpp:321
bool hasColor() const
Returns true if the LED color is set, and false otherwise.
Definition: feedback.cpp:139
The velocity of the module was near the upper safety limit, and the motor output is being limited or ...
const FloatField & velocity() const
Velocity of the module output (post-spring), in radians/second.
Definition: feedback.hpp:536
bool has() const
True if (and only if) the field has a value.
Definition: feedback.cpp:82
The effort of the module was within the safety limits.
const Vector3fField & torque() const
Cartesian torque data, such as from a force/torque sensor.
Definition: feedback.hpp:742
const EnumField< VelocityLimitState > & velocityLimitState() const
Software-controlled bounds on the allowable velocity of the module.
Definition: feedback.hpp:576
const EnumField< DrivetrainState > & drivetrainState() const
Current status of the motor drivetrain.
Definition: feedback.hpp:584
const UInt64Field & senderId() const
Unique ID of the module transmitting this feedback.
Definition: feedback.hpp:734
A message field for an angle measurement which does not lose precision at very high angles.
Definition: feedback.hpp:185
const FloatField & effortCommand() const
Commanded effort at the module output; units vary (e.g., N * m for rotational joints and N for linear...
Definition: feedback.hpp:542
const IoBank & f() const
I/O pin bank f (pins 1-8 available)
Definition: feedback.hpp:486
The module has not been inside the safety limits since it was booted or the safety limits were set.
const EnumField< ArQuality > & arQuality() const
The status of the augmented reality tracking, if using an AR enabled device.
Definition: feedback.hpp:637
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
Definition: message_helpers.cpp:300
TemperatureState
Definition: feedback.hpp:34
const HighResAngleField & position() const
Position of the module output (post-spring), in radians.
Definition: feedback.hpp:564
The position of the module was near the upper safety limit, and the motor output is being limited or ...
A message field representable by an enum of a given type.
Definition: feedback.hpp:353
const FloatField & motorWindingTemperature() const
The estimated temperature of the motor windings.
Definition: feedback.hpp:556
const FloatField & boardTemperature() const
Ambient temperature inside the module (measured at the IMU chip), in degrees Celsius.
Definition: feedback.hpp:714
T get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: feedback.hpp:377
Commands from others are locked out due to control from this group.
Temperature within normal range.
const Vector3fField & gyro() const
Gyro data, in radians/second.
Definition: feedback.hpp:665
const EnumField< TemperatureState > & temperatureState() const
Describes how the temperature inside the module is limiting the output of the motor.
Definition: feedback.hpp:570
const FloatField & processorTemperature() const
Temperature of the processor chip, in degrees Celsius.
Definition: feedback.hpp:716
const LedField & led() const
The module's LED.
Definition: feedback.hpp:738
A message field for interfacing with an LED.
Definition: feedback.hpp:428
const UInt64Field & sequenceNumber() const
Sequence number going to module (local)
Definition: feedback.hpp:724
const Imu & imu() const
Inertial measurement unit feedback (accelerometers and gyros).
Definition: feedback.hpp:709
const FloatField & motorWindingCurrent() const
The estimated current in the motor windings.
Definition: feedback.hpp:554
const FloatField & batteryLevel() const
Charge level of the device’s battery (in percent).
Definition: feedback.hpp:631
const FloatField & velocityCommand() const
Commanded velocity of the module output (post-spring), in radians/second.
Definition: feedback.hpp:540
const QuaternionfField & orientation() const
A filtered estimate of the orientation of the module.
Definition: feedback.hpp:667
const EnumField< CommandLifetimeState > & commandLifetimeState() const
The state of the command lifetime safety controller, with respect to the current group.
Definition: feedback.hpp:580
Feedback generally from a mobile device such as a phone or tablet.
Definition: feedback.hpp:615
const FloatField & motorHousingTemperature() const
The estimated temperature of the motor housing.
Definition: feedback.hpp:558
float get(size_t fieldNumber) const
If the particular numbered subvalue of this field has a value, returns that value; otherwise returns ...
Definition: feedback.cpp:56
float get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: feedback.cpp:18
Motor output beginning to be limited due to high temperature.
Feedback from any available I/O pins on the device.
Definition: feedback.hpp:458
There is not command lifetime active on this module.
const FloatField & deflectionVelocity() const
Velocity (in radians/second) of the difference between the pre-spring and post-spring output position...
Definition: feedback.hpp:546
A message field representable by an unsigned 64 bit integer value.
Definition: feedback.hpp:257
Feedback & operator=(Feedback &&other)=delete
Vector3f get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: feedback.cpp:86
Temperature exceeds max allowable for electronics; motor output disabled.
The effort of the module was near the lower safety limit, and the motor output is being limited or re...
ArQuality
Definition: feedback.hpp:112
The velocity of the module was near the lower safety limit, and the motor output is being limited or ...
const IoBank & a() const
I/O pin bank a (pins 1-8 available)
Definition: feedback.hpp:476
const Vector3fField & force() const
Cartesian force data, such as from a force/torque sensor.
Definition: feedback.hpp:740
Temperature exceeds max allowable for motor; motor output disabled.
const UInt64Field & receiveTimeUs() const
Timestamp of when message was received from module (local; microseconds)
Definition: feedback.hpp:726
const FloatField & motorSensorTemperature() const
The temperature from a sensor near the motor housing.
Definition: feedback.hpp:552
The position of the module was within the safety limits.
const UInt64Field & transmitTimeUs() const
Timestamp of when message was transmitted to module (local; microseconds)
Definition: feedback.hpp:728
uint64_t get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: feedback.cpp:71
const EnumField< PositionLimitState > & positionLimitState() const
Software-controlled bounds on the allowable position of the module; user settable.
Definition: feedback.hpp:574
Actuator-specific feedback.
Definition: feedback.hpp:499
bool has() const
True if (and only if) the field has a value.
Definition: feedback.cpp:99
MstopState
Definition: feedback.hpp:45
const EnumField< MotorHallState > & motorHallState() const
The current hall state of the motor.
Definition: feedback.hpp:582
const Vector3fField & accelerometer() const
Accelerometer data, in m/s^2.
Definition: feedback.hpp:663
const FloatField & pwmCommand() const
Commanded PWM signal sent to the motor; final output of PID controllers.
Definition: feedback.hpp:560
bool has() const
True if (and only if) the field has a value.
Definition: feedback.cpp:67
const UInt64Field & hardwareReceiveTimeUs() const
Timestamp of when message was received by module (remote; microseconds)
Definition: feedback.hpp:730
Feedback(Feedback &&other)
Move constructor (necessary for containment in STL template classes)
Definition: feedback.cpp:154
The module has not been inside the safety limits since it was booted or the safety limits were set.
EffortLimitState
Definition: feedback.hpp:86
Camera position tracking is providing optimal results.
const Actuator & actuator() const
Actuator-specific feedback.
Definition: feedback.hpp:705
const Io & io() const
Feedback from any available I/O pins on the device.
Definition: feedback.hpp:703
const QuaternionfField & arOrientation() const
A device's orientation in the world as calculated from an augmented reality framework.
Definition: feedback.hpp:635
Structure to describe an RGB color.
Definition: color.hpp:8
The velocity of the module was within the safety limits.
MotorHallState
Definition: feedback.hpp:130
const HighResAngleField & motorPosition() const
The position of an actuator’s internal motor before the gear reduction, in radians.
Definition: feedback.hpp:568
A message field containing a numbered set of single-precision floating point values.
Definition: feedback.hpp:232
bool hasFloat(size_t pinNumber) const
True if (and only if) the particular numbered pin in this bank has an floating point (e....
Definition: feedback.cpp:120
Quaternionf get() const
If the field has a value, returns that value; otherwise, returns a default.
Definition: feedback.cpp:103
A message field representable by a 3-D vector of single-precision floating point values.
Definition: feedback.hpp:289
const IoBank & b() const
I/O pin bank b (pins 1-8 available)
Definition: feedback.hpp:478
Color getColor() const
Returns the led color.
Definition: feedback.cpp:143
The position of the module was near the lower safety limit, and the motor output is being limited or ...
const IoBank & c() const
I/O pin bank c (pins 1-8 available)
Definition: feedback.hpp:480
const FloatField & motorCurrent() const
Current supplied to the motor.
Definition: feedback.hpp:550