75 #ifndef DOXYGEN_OMIT_INTERNAL 77 #endif // DOXYGEN_OMIT_INTERNAL 78 explicit operator bool()
const {
return has(); }
97 void set(
float value);
114 #ifndef DOXYGEN_OMIT_INTERNAL 116 #endif // DOXYGEN_OMIT_INTERNAL 117 explicit operator bool()
const {
return has(); }
149 void get(int64_t* revolutions,
float* radian_offset)
const;
154 void set(
double radians);
161 void set(int64_t revolutions,
float radian_offset);
175 #ifndef DOXYGEN_OMIT_INTERNAL 177 #endif // DOXYGEN_OMIT_INTERNAL 178 bool has(
size_t fieldNumber)
const;
189 float get(
size_t fieldNumber)
const;
195 void set(
size_t fieldNumber,
float value);
201 void clear(
size_t fieldNumber);
212 #ifndef DOXYGEN_OMIT_INTERNAL 214 #endif // DOXYGEN_OMIT_INTERNAL 221 void set(
bool value);
234 #ifndef DOXYGEN_OMIT_INTERNAL 236 #endif // DOXYGEN_OMIT_INTERNAL 237 explicit operator bool()
const {
return has(); }
254 std::string
get()
const;
256 void set(
const std::string& value);
269 #ifndef DOXYGEN_OMIT_INTERNAL 271 #endif // DOXYGEN_OMIT_INTERNAL 272 explicit operator bool()
const {
return has(); }
302 #ifndef DOXYGEN_OMIT_INTERNAL 304 #endif // DOXYGEN_OMIT_INTERNAL 305 explicit operator bool()
const {
return has(); }
327 return static_cast<T
>(ret);
331 int32_t value =
static_cast<int32_t
>(_value);
348 #ifndef DOXYGEN_OMIT_INTERNAL 350 #endif // DOXYGEN_OMIT_INTERNAL 351 bool hasInt(
size_t pinNumber)
const;
362 bool hasFloat(
size_t pinNumber)
const;
368 int64_t getInt(
size_t pinNumber)
const;
375 float getFloat(
size_t pinNumber)
const;
381 void setInt(
size_t pinNumber, int64_t value);
387 void setFloat(
size_t pinNumber,
float value);
392 void clear(
size_t pinNumber);
402 #ifndef DOXYGEN_OMIT_INTERNAL 404 #endif // DOXYGEN_OMIT_INTERNAL 426 void set(
const Color& color);
442 #ifndef DOXYGEN_OMIT_INTERNAL 451 #endif // DOXYGEN_OMIT_INTERNAL 503 #ifndef DOXYGEN_OMIT_INTERNAL 521 #endif // DOXYGEN_OMIT_INTERNAL 622 #ifndef DOXYGEN_OMIT_INTERNAL 625 #endif // DOXYGEN_OMIT_INTERNAL 645 #ifndef DOXYGEN_OMIT_INTERNAL 653 #endif // DOXYGEN_OMIT_INTERNAL 704 #ifndef DOXYGEN_OMIT_INTERNAL 710 #endif // DOXYGEN_OMIT_INTERNAL 748 #ifndef DOXYGEN_OMIT_INTERNAL 754 #endif // DOXYGEN_OMIT_INTERNAL 780 #ifndef DOXYGEN_OMIT_INTERNAL 785 #endif // DOXYGEN_OMIT_INTERNAL const FloatField & referencePosition() const
The name for this module. The string must be null-terminated and less than 21 characters.
bool has() const
True if (and only if) the field has a value.
FloatField spring_constant_
const IoBank & a() const
I/O pin bank a (pins 1-8 available)
IoBank & f()
I/O pin bank f (pins 1-8 available)
FlagField & reset()
Restart the module.
FlagField & saveCurrentSettings()
Indicates if the module should save the current values of all of its settings.
FloatField velocity_limit_max_
HebiCommandBoolField const field_
The spring constant of the module.
IoBank & d()
I/O pin bank d (pins 1-8 available)
const EnumField< PositionLimitStrategy > & minPositionLimitStrategy() const
The position limit strategy (at the minimum position) for the actuator.
const FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
HebiCommandHighResAngleField
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
HighResAngleField & positionLimitMax()
The firmware safety limit for the maximum allowed position.
#define HEBI_DISABLE_COPY(Class)
CommandGains effort_gains_
HebiCommandIoPinBank const bank_
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
A message field representable by a bool value.
HebiCommandRef & internal_
Actuator & actuator()
Actuator-specific commands.
Actuator-specific commands.
void hebiCommandSetEnum(HebiCommandRef &command, HebiCommandEnumField field, const int32_t *value)
Io & io()
Any available digital or analog output pins on the device.
const FloatField & effort() const
Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages)...
Settings & settings()
Module settings that are typically changed at a slower rate.
The firmware safety limit for the minimum allowed position.
const Io & io() const
Any available digital or analog output pins on the device.
FloatField & springConstant()
The spring constant of the module.
FloatField & effortLimitMin()
The firmware safety limit for the minimum allowed effort.
FlagField save_current_settings_
struct HebiCommand_ * HebiCommandPtr
Typedefs.
A message field for interfacing with a bank of I/O pins.
FlagField & boot()
Boot the module from bootloader into application.
Actuator & actuator()
Actuator-specific settings, such as controller gains.
const HighResAngleField & position() const
Position of the module output (post-spring), in radians.
const IoBank & d() const
I/O pin bank d (pins 1-8 available)
Command objects have various fields that can be set; when sent to the module, these fields control in...
const BoolField & accelIncludesGravity() const
Whether to include acceleration due to gravity in acceleration feedback.
EnumField< PositionLimitStrategy > max_position_limit_strategy_
IoBank & a()
I/O pin bank a (pins 1-8 available)
A message field representable by a std::string.
Command(HebiCommandPtr)
Wraps an existing C-style object that is managed by its parent. NOTE: this should not be used except ...
BoolField & accelIncludesGravity()
Whether to include acceleration due to gravity in acceleration feedback.
The firmware safety limit for the minimum allowed velocity.
HebiCommandRef & internal_
I/O pin bank b (pins 1-8 available)
A message field for interfacing with an LED.
const FlagField & clearLog() const
Clears the log message on the module.
HebiCommandRef internal_ref_
HebiCommandNumberedFloatField const field_
HebiCommandRef & internal_
The firmware safety limit for the maximum allowed velocity.
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
FloatField reference_effort_
CommandGains position_gains_
The motor is not given power (equivalent to a 0 PWM value)
HebiCommandHighResAngleField const field_
const StringField & name() const
CommandGains & effortGains()
Controller gains for the effort PID loop.
#define HEBI_DISABLE_COPY_MOVE(Class)
The position limit strategy (at the minimum position) for the actuator.
CommandGains velocity_gains_
const FlagField & reset() const
Restart the module.
const IoBank & c() const
I/O pin bank c (pins 1-8 available)
IoBank & c()
I/O pin bank c (pins 1-8 available)
const CommandGains & effortGains() const
Controller gains for the effort PID loop.
HebiCommandFloatField const field_
HighResAngleField & position()
Position of the module output (post-spring), in radians.
const FloatField & springConstant() const
The spring constant of the module.
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
CommandGains & velocityGains()
Controller gains for the velocity PID loop.
EnumField< MstopStrategy > mstop_strategy_
const IoBank & b() const
I/O pin bank b (pins 1-8 available)
Velocity of the module output (post-spring).
Actuator-specific settings, such as controller gains.
EnumField< PositionLimitStrategy > min_position_limit_strategy_
const NumberedFloatField & debug() const
Values for internal debug functions (channel 1-9 available).
Module settings that are typically changed at a slower rate.
EnumField(HebiCommandRef &internal, HebiCommandEnumField field)
const CommandGains & positionGains() const
Controller gains for the position PID loop.
FloatField & referencePosition()
const Settings & settings() const
Module settings that are typically changed at a slower rate.
A two-state message field (either set/true or cleared/false).
StringField & appendLog()
Appends to the current log message on the module.
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
IoBank & b()
I/O pin bank b (pins 1-8 available)
const IoBank & e() const
I/O pin bank e (pins 1-8 available)
Imu(HebiCommandRef &internal)
A message field containing a numbered set of single-precision floating point values.
HebiCommandFlagField const field_
HebiCommandPtr const internal_
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
HebiCommandFloatField
Command Enums.
const StringField & family() const
Io(HebiCommandRef &internal)
const FlagField & boot() const
Boot the module from bootloader into application.
FloatField & effortLimitMax()
The firmware safety limit for the maximum allowed effort.
HebiCommandNumberedFloatField
Set the internal encoder reference offset so that the current position matches the given reference co...
HighResAngleField position_limit_max_
EnumField< ControlStrategy > & controlStrategy()
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
const LedField & led() const
The module's LED.
HebiCommandRef & internal_
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
HighResAngleField & positionLimitMin()
The firmware safety limit for the minimum allowed position.
HebiCommandLedField const field_
FloatField & velocity()
Velocity of the module output (post-spring), in radians/second.
NumberedFloatField & debug()
Values for internal debug functions (channel 1-9 available).
Any available digital or analog output pins on the device.
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
EnumField< ControlStrategy > control_strategy_
FloatField & referenceEffort()
The internal effort reference offset (setting this matches the current effort to the given reference ...
const EnumField< PositionLimitStrategy > & maxPositionLimitStrategy() const
The position limit strategy (at the maximum position) for the actuator.
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
const Imu & imu() const
IMU-specific settings.
const FloatField & referenceEffort() const
The internal effort reference offset (setting this matches the current effort to the given reference ...
const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
HebiCommandRef & internal_
BoolField accel_includes_gravity_
void clear()
Removes any currently set value for this field.
FloatField effort_limit_max_
IoBank & e()
I/O pin bank e (pins 1-8 available)
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
FlagField & clearLog()
Clears the log message on the module.
EnumField< PositionLimitStrategy > & maxPositionLimitStrategy()
The position limit strategy (at the maximum position) for the actuator.
HighResAngleField position_
const EnumField< MstopStrategy > & mstopStrategy() const
The motion stop strategy for the actuator.
HighResAngleField position_limit_min_
Actuator(HebiCommandRef &internal)
A message field for an angle measurement which does not lose precision at very high angles...
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.
Imu & imu()
IMU-specific settings.
const FlagField & stopBoot() const
Stop the module from automatically booting into application.
The firmware safety limit for the minimum allowed effort.
EnumField< MstopStrategy > & mstopStrategy()
The motion stop strategy for the actuator.
const HebiCommandRef & internal_
HebiCommandRef & internal_
HebiCommandEnumField const field_
Position of the module output (post-spring).
const FloatField & velocity() const
Velocity of the module output (post-spring), in radians/second.
const Actuator & actuator() const
Actuator-specific commands.
const HebiCommandRef & internal_
FloatField & velocityLimitMax()
The firmware safety limit for the maximum allowed velocity.
const StringField & appendLog() const
Appends to the current log message on the module.
NumberedFloatField debug_
const FloatField & velocityLimitMax() const
The firmware safety limit for the maximum allowed velocity.
HebiCommandRef & internal_
I/O pin bank d (pins 1-8 available)
Set the internal effort reference offset so that the current effort matches the given reference comma...
Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages)...
LedField & led()
The module's LED.
HebiCommandStringField const field_
HebiCommandRef & internal_
Actuator(HebiCommandRef &internal)
HebiCommandRef & internal_
const CommandGains & velocityGains() const
Controller gains for the velocity PID loop.
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.
const IoBank & f() const
I/O pin bank f (pins 1-8 available)
Settings(HebiCommandPtr internal_ptr, HebiCommandRef &internal)
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
Structure to describe an RGB color.
CommandGains & positionGains()
Controller gains for the position PID loop.
A message field representable by a single-precision floating point value.
FloatField reference_position_
Command & operator=(Command &&other)=delete
FloatField & velocityLimitMin()
The firmware safety limit for the minimum allowed velocity.
The motion stop strategy for the actuator.
HebiCommandRef & internal_
I/O pin bank c (pins 1-8 available)
I/O pin bank a (pins 1-8 available)
FloatField effort_limit_min_
A simple lowpass filter applied to the controller output; needs to be between 0 and 1...
FloatField velocity_limit_min_
EnumField< PositionLimitStrategy > & minPositionLimitStrategy()
The position limit strategy (at the minimum position) for the actuator.
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.
I/O pin bank e (pins 1-8 available)
FlagField & stopBoot()
Stop the module from automatically booting into application.
A message field representable by an enum of a given type.
FloatField & effort()
Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages)...