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 The name for this module. The string must be null-terminated and less than 21 characters.
const EnumField< PositionLimitStrategy > & maxPositionLimitStrategy() const
The position limit strategy (at the maximum position) for the actuator.
const FloatField & velocityLimitMin() const
The firmware safety limit for the minimum allowed velocity.
FloatField spring_constant_
IoBank & f()
I/O pin bank f (pins 1-8 available)
FlagField & reset()
Restart the module.
const CommandGains & velocityGains() const
Controller gains for the velocity PID loop.
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 FloatField & velocity() const
Velocity of the module output (post-spring), in radians/second.
HebiCommandHighResAngleField
const FloatField & effort() const
Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages)...
HighResAngleField & positionLimitMax()
The firmware safety limit for the maximum allowed position.
#define HEBI_DISABLE_COPY(Class)
const FloatField & springConstant() const
The spring constant of the module.
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.
Settings & settings()
Module settings that are typically changed at a slower rate.
const StringField & name() const
The firmware safety limit for the minimum allowed position.
const FlagField & boot() const
Boot the module from bootloader into application.
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.
const Actuator & actuator() const
Actuator-specific commands.
FlagField & boot()
Boot the module from bootloader into application.
Actuator & actuator()
Actuator-specific settings, such as controller gains.
Command objects have various fields that can be set; when sent to the module, these fields control in...
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)
const HighResAngleField & positionLimitMin() const
The firmware safety limit for the minimum allowed position.
A message field for interfacing with an LED.
HebiCommandRef internal_ref_
HebiCommandNumberedFloatField const field_
HebiCommandRef & internal_
const FlagField & clearLog() const
Clears the log message on the module.
The firmware safety limit for the maximum allowed velocity.
FloatField reference_effort_
CommandGains position_gains_
The motor is not given power (equivalent to a 0 PWM value)
HebiCommandHighResAngleField const field_
bool has() const
True if (and only if) the field has a value.
const LedField & led() const
The module's LED.
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 FloatField & effortLimitMin() const
The firmware safety limit for the minimum allowed effort.
const EnumField< MstopStrategy > & mstopStrategy() const
The motion stop strategy for the actuator.
IoBank & c()
I/O pin bank c (pins 1-8 available)
HebiCommandFloatField const field_
HighResAngleField & position()
Position of the module output (post-spring), in radians.
CommandGains & velocityGains()
Controller gains for the velocity PID loop.
EnumField< MstopStrategy > mstop_strategy_
Velocity of the module output (post-spring).
Actuator-specific settings, such as controller gains.
const Io & io() const
Any available digital or analog output pins on the device.
EnumField< PositionLimitStrategy > min_position_limit_strategy_
Module settings that are typically changed at a slower rate.
EnumField(HebiCommandRef &internal, HebiCommandEnumField field)
FloatField & referencePosition()
const FlagField & reset() const
Restart the module.
A two-state message field (either set/true or cleared/false).
const FloatField & referenceEffort() const
The internal effort reference offset (setting this matches the current effort to the given reference ...
const IoBank & e() const
I/O pin bank e (pins 1-8 available)
StringField & appendLog()
Appends to the current log message on the module.
IoBank & b()
I/O pin bank b (pins 1-8 available)
Imu(HebiCommandRef &internal)
A message field containing a numbered set of single-precision floating point values.
HebiCommandFlagField const field_
const Settings & settings() const
Module settings that are typically changed at a slower rate.
const IoBank & c() const
I/O pin bank c (pins 1-8 available)
HebiCommandPtr const internal_
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
const IoBank & b() const
I/O pin bank b (pins 1-8 available)
HebiCommandFloatField
Command Enums.
Io(HebiCommandRef &internal)
const EnumField< PositionLimitStrategy > & minPositionLimitStrategy() const
The position limit strategy (at the minimum position) for the actuator.
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...
HebiCommandRef & internal_
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
const Imu & imu() const
IMU-specific settings.
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 StringField & appendLog() const
Appends to the current log message on the module.
EnumField< ControlStrategy > control_strategy_
const IoBank & d() const
I/O pin bank d (pins 1-8 available)
FloatField & referenceEffort()
The internal effort reference offset (setting this matches the current effort to the given reference ...
HebiCommandRef & internal_
BoolField accel_includes_gravity_
const FloatField & referencePosition() const
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 FlagField & stopBoot() const
Stop the module from automatically booting into application.
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.
The firmware safety limit for the minimum allowed effort.
const CommandGains & positionGains() const
Controller gains for the position PID loop.
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 HebiCommandRef & internal_
FloatField & velocityLimitMax()
The firmware safety limit for the maximum allowed velocity.
NumberedFloatField debug_
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.
const FloatField & effortLimitMax() const
The firmware safety limit for the maximum allowed effort.
HebiCommandStringField const field_
HebiCommandRef & internal_
Actuator(HebiCommandRef &internal)
const IoBank & f() const
I/O pin bank f (pins 1-8 available)
HebiCommandRef & internal_
const BoolField & accelIncludesGravity() const
Whether to include acceleration due to gravity in acceleration feedback.
const FlagField & saveCurrentSettings() const
Indicates if the module should save the current values of all of its settings.
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 & a() const
I/O pin bank a (pins 1-8 available)
const HighResAngleField & positionLimitMax() const
The firmware safety limit for the maximum allowed position.
const EnumField< ControlStrategy > & controlStrategy() const
How the position, velocity, and effort PID loops are connected in order to control motor PWM...
const Actuator & actuator() const
Actuator-specific settings, such as controller gains.
Settings(HebiCommandPtr internal_ptr, HebiCommandRef &internal)
A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).
const CommandGains & effortGains() const
Controller gains for the effort PID loop.
Structure to describe an RGB color.
CommandGains & positionGains()
Controller gains for the position PID loop.
const StringField & family() const
A message field representable by a single-precision floating point value.
FloatField reference_position_
Command & operator=(Command &&other)=delete
const HighResAngleField & position() const
Position of the module output (post-spring), in radians.
FloatField & velocityLimitMin()
The firmware safety limit for the minimum allowed velocity.
const NumberedFloatField & debug() const
Values for internal debug functions (channel 1-9 available).
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...
const FloatField & velocityLimitMax() const
The firmware safety limit for the maximum allowed velocity.
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)...