Classes | Public Types | Public Member Functions | Protected Types | Private Attributes | List of all members
hebi::Info Class Referencefinal

Info objects have various fields representing the module state; which fields are populated depends on the module type and various other settings. More...

#include <info.hpp>

Classes

class  Actuator
 Actuator-specific information. More...
 
class  BoolField
 A message field representable by a bool value. More...
 
class  EnumField
 A message field representable by an enum of a given type. More...
 
class  FlagField
 A two-state message field (either set/true or cleared/false). More...
 
class  FloatField
 A message field representable by a single-precision floating point value. More...
 
class  HighResAngleField
 A message field for an angle measurement which does not lose precision at very high angles. More...
 
class  LedField
 A message field for interfacing with an LED. More...
 
class  Settings
 Module settings that are typically changed at a slower rate. More...
 
class  StringField
 A message field representable by a std::string. More...
 

Public Types

enum  CalibrationState { CalibrationState::Normal, CalibrationState::UncalibratedCurrent, CalibrationState::UncalibratedPosition, CalibrationState::UncalibratedEffort }
 
enum  ControlStrategy {
  ControlStrategy::Off, ControlStrategy::DirectPWM, ControlStrategy::Strategy2, ControlStrategy::Strategy3,
  ControlStrategy::Strategy4
}
 
enum  MstopStrategy { MstopStrategy::Disabled, MstopStrategy::MotorOff, MstopStrategy::HoldPosition }
 
enum  PositionLimitStrategy { PositionLimitStrategy::HoldPosition, PositionLimitStrategy::DampedSpring, PositionLimitStrategy::MotorOff, PositionLimitStrategy::Disabled }
 

Public Member Functions

const Actuatoractuator () const
 Actuator-specific information. More...
 
 Info (HebiInfoPtr)
 Wraps an existing C-style object that is managed by its parent. NOTE: this should not be used except by internal library functions! More...
 
 Info (Info &&other)
 Move constructor (necessary for containment in STL template classes) More...
 
const LedFieldled () const
 The module's LED. More...
 
Infooperator= (Info &&other)=delete
 
const StringFieldserial () const
 Gets the serial number for this module (e.g., X5-0001). More...
 
const Settingssettings () const
 Module settings that are typically changed at a slower rate. More...
 

Protected Types

using InfoGains = Gains< HebiInfoRef, FloatField, BoolField, HebiInfoFloatField, HebiInfoBoolField >
 

Private Attributes

Actuator actuator_
 
HebiInfoPtr internal_
 
HebiInfoRef internal_ref_
 
LedField led_
 
StringField serial_
 
Settings settings_
 

Detailed Description

Info objects have various fields representing the module state; which fields are populated depends on the module type and various other settings.

This object has a hierarchical structure – there are some direct general-purpose fields at the top level, and many more specific fields contained in different nested subobjects.

The subobjects contain references to the parent info object, and so should not be used after the parent object has been destroyed.

The fields in the info object are typed; generally, these are optional-style read-only fields (i.e., have the concept of has/get), although the return types and exact interface vary slightly between fields. Where appropriate, the explicit bool operator has been overridden so that you can shortcut if(field.has()) by calling if(field).

Although this header file can be used to look at the hierarchy of the messages, in general the online documentation at apidocs.hebi.us presents this information. in a more readable form.

Definition at line 33 of file info.hpp.

Member Typedef Documentation

Definition at line 309 of file info.hpp.

Member Enumeration Documentation

Enumerator
Normal 

The module has been calibrated; this is the normal state.

UncalibratedCurrent 

The current has not been calibrated.

UncalibratedPosition 

The factory zero position has not been set.

UncalibratedEffort 

The effort (e.g., spring nonlinearity) has not been calibrated.

Definition at line 51 of file info.hpp.

Enumerator
Off 

The motor is not given power (equivalent to a 0 PWM value)

DirectPWM 

A direct PWM value (-1 to 1) can be sent to the motor (subject to onboard safety limiting).

Strategy2 

A combination of the position, velocity, and effort loops with P and V feeding to T; documented on docs.hebi.us under "Control Modes"

Strategy3 

A combination of the position, velocity, and effort loops with P, V, and T feeding to PWM; documented on docs.hebi.us under "Control Modes"

Strategy4 

A combination of the position, velocity, and effort loops with P feeding to T and V feeding to PWM; documented on docs.hebi.us under "Control Modes"

Definition at line 35 of file info.hpp.

Enumerator
Disabled 

Triggering the M-Stop has no effect.

MotorOff 

Triggering the M-Stop results in the control strategy being set to 'off'. Remains 'off' until changed by user.

HoldPosition 

Triggering the M-Stop results in the motor holding the motor position. Operations resume to normal once trigger is released.

Definition at line 62 of file info.hpp.

Enumerator
HoldPosition 

Exceeding the position limit results in the actuator holding the position. Needs to be manually set to 'disabled' to recover.

DampedSpring 

Exceeding the position limit results in a virtual spring that pushes the actuator back to within the limits.

MotorOff 

Exceeding the position limit results in the control strategy being set to 'off'. Remains 'off' until changed by user.

Disabled 

Exceeding the position limit has no effect.

Definition at line 71 of file info.hpp.

Constructor & Destructor Documentation

hebi::Info::Info ( HebiInfoPtr  info)

Wraps an existing C-style object that is managed by its parent. NOTE: this should not be used except by internal library functions!

Definition at line 93 of file info.cpp.

hebi::Info::Info ( Info &&  other)

Move constructor (necessary for containment in STL template classes)

Definition at line 102 of file info.cpp.

Member Function Documentation

const Actuator& hebi::Info::actuator ( ) const
inline

Actuator-specific information.

Definition at line 500 of file info.hpp.

const LedField& hebi::Info::led ( ) const
inline

The module's LED.

Definition at line 507 of file info.hpp.

Info& hebi::Info::operator= ( Info &&  other)
delete

Disable copy constructor/assignment operators

const StringField& hebi::Info::serial ( ) const
inline

Gets the serial number for this module (e.g., X5-0001).

Definition at line 505 of file info.hpp.

const Settings& hebi::Info::settings ( ) const
inline

Module settings that are typically changed at a slower rate.

Definition at line 498 of file info.hpp.

Member Data Documentation

Actuator hebi::Info::actuator_
private

Definition at line 519 of file info.hpp.

HebiInfoPtr hebi::Info::internal_
private

C-style object; managed by parent. NOTE: this should not be used except by internal library functions!

Definition at line 476 of file info.hpp.

HebiInfoRef hebi::Info::internal_ref_
private

Definition at line 477 of file info.hpp.

LedField hebi::Info::led_
private

Definition at line 522 of file info.hpp.

StringField hebi::Info::serial_
private

Definition at line 521 of file info.hpp.

Settings hebi::Info::settings_
private

Definition at line 518 of file info.hpp.


The documentation for this class was generated from the following files:


hebi_cpp_api_ros
Author(s): Chris Bollinger , Matthew Tesch
autogenerated on Thu May 28 2020 03:14:45