Classes | Macros | Typedefs | Enumerations | Functions
hebi.h File Reference
#include <math.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for hebi.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  HebiCommandMetadata_
 
struct  HebiCommandRef_
 
struct  HebiFeedbackMetadata_
 
struct  HebiFeedbackRef_
 
struct  HebiHighResAngleStruct_
 
struct  HebiInfoMetadata_
 
struct  HebiInfoRef_
 
struct  HebiIoBankPinStruct_
 
struct  HebiMacAddress_
 Structures. More...
 
struct  HebiQuaternionf_
 
struct  HebiRobotModelElementMetadata_
 
struct  HebiRobotModelElementTopology_
 
struct  HebiVector3f_
 

Macros

#define M_PI   3.14159265358979323846
 

Typedefs

typedef void(* GroupFeedbackHandlerFunction) (HebiGroupFeedbackPtr fbk, void *user_data)
 Group feedback handling function signature. More...
 
typedef enum HebiActuatorType HebiActuatorType
 
typedef enum HebiArQuality HebiArQuality
 
typedef enum HebiBracketType HebiBracketType
 
typedef enum HebiCommandBoolField HebiCommandBoolField
 
typedef enum HebiCommandEnumField HebiCommandEnumField
 
typedef enum HebiCommandFlagField HebiCommandFlagField
 
typedef enum HebiCommandFloatField HebiCommandFloatField
 Command Enums. More...
 
typedef enum HebiCommandHighResAngleField HebiCommandHighResAngleField
 
typedef enum HebiCommandIoPinBank HebiCommandIoPinBank
 
typedef enum HebiCommandLedField HebiCommandLedField
 
typedef struct HebiCommandMetadata_ HebiCommandMetadata
 
typedef enum HebiCommandNumberedFloatField HebiCommandNumberedFloatField
 
typedef struct HebiCommand_ * HebiCommandPtr
 Typedefs. More...
 
typedef struct HebiCommandRef_ HebiCommandRef
 
typedef enum HebiCommandStringField HebiCommandStringField
 
typedef enum HebiEndEffectorType HebiEndEffectorType
 
typedef enum HebiFeedbackEnumField HebiFeedbackEnumField
 
typedef enum HebiFeedbackFloatField HebiFeedbackFloatField
 Feedback Enums. More...
 
typedef enum HebiFeedbackHighResAngleField HebiFeedbackHighResAngleField
 
typedef enum HebiFeedbackIoPinBank HebiFeedbackIoPinBank
 
typedef enum HebiFeedbackLedField HebiFeedbackLedField
 
typedef struct HebiFeedbackMetadata_ HebiFeedbackMetadata
 
typedef enum HebiFeedbackNumberedFloatField HebiFeedbackNumberedFloatField
 
typedef struct HebiFeedback_ * HebiFeedbackPtr
 The C-style's API representation of feedback. More...
 
typedef enum HebiFeedbackQuaternionfField HebiFeedbackQuaternionfField
 
typedef struct HebiFeedbackRef_ HebiFeedbackRef
 
typedef enum HebiFeedbackUInt64Field HebiFeedbackUInt64Field
 
typedef enum HebiFeedbackVector3fField HebiFeedbackVector3fField
 
typedef enum HebiFrameType HebiFrameType
 RobotModel Enums. More...
 
typedef struct HebiGroupCommand_ * HebiGroupCommandPtr
 The C-style's API representation of a command object for a group of modules. More...
 
typedef struct HebiGroupFeedback_ * HebiGroupFeedbackPtr
 The C-style's API representation of a feedback object for a group of modules. More...
 
typedef struct HebiGroupInfo_ * HebiGroupInfoPtr
 The C-style's API representation of a info object for a group of modules. More...
 
typedef struct HebiGroup_ * HebiGroupPtr
 The C-style's API representation of a group. More...
 
typedef struct HebiHighResAngleStruct_ HebiHighResAngleStruct
 
typedef struct HebiIK_ * HebiIKPtr
 
typedef enum HebiInfoBoolField HebiInfoBoolField
 
typedef enum HebiInfoEnumField HebiInfoEnumField
 
typedef enum HebiInfoFlagField HebiInfoFlagField
 
typedef enum HebiInfoFloatField HebiInfoFloatField
 Info Enums. More...
 
typedef enum HebiInfoHighResAngleField HebiInfoHighResAngleField
 
typedef enum HebiInfoLedField HebiInfoLedField
 
typedef struct HebiInfoMetadata_ HebiInfoMetadata
 
typedef struct HebiInfo_ * HebiInfoPtr
 The C-style's API representation of info. More...
 
typedef struct HebiInfoRef_ HebiInfoRef
 
typedef enum HebiInfoStringField HebiInfoStringField
 
typedef enum HebiIoBankPinResidentType HebiIoBankPinResidentType
 
typedef struct HebiIoBankPinStruct_ HebiIoBankPinStruct
 
typedef enum HebiJointType HebiJointType
 
typedef enum HebiLinkInputType HebiLinkInputType
 
typedef enum HebiLinkOutputType HebiLinkOutputType
 
typedef enum HebiLinkType HebiLinkType
 
typedef struct HebiLogFile_ * HebiLogFilePtr
 The C-style's API representation of a log file. More...
 
typedef struct HebiLookupEntryList_ * HebiLookupEntryListPtr
 
typedef struct HebiLookup_ * HebiLookupPtr
 
typedef struct HebiMacAddress_ HebiMacAddress
 Structures. More...
 
typedef enum HebiMatrixOrdering HebiMatrixOrdering
 
typedef struct HebiQuaternionf_ HebiQuaternionf
 
typedef struct HebiRobotModelElementMetadata_ HebiRobotModelElementMetadata
 
typedef struct HebiRobotModelElement_ * HebiRobotModelElementPtr
 
typedef struct HebiRobotModelElementTopology_ HebiRobotModelElementTopology
 
typedef enum HebiRobotModelElementType HebiRobotModelElementType
 
typedef struct HebiRobotModel_ * HebiRobotModelPtr
 
typedef enum HebiStatusCode HebiStatusCode
 Enum Types. More...
 
typedef struct HebiString_ * HebiStringPtr
 The C-style's API representation of a string. More...
 
typedef struct HebiTrajectory_ * HebiTrajectoryPtr
 The C-style's API representation of a trajectory. More...
 
typedef struct HebiVector3f_ HebiVector3f
 

Enumerations

enum  HebiActuatorType {
  HebiActuatorTypeX5_1, HebiActuatorTypeX5_4, HebiActuatorTypeX5_9, HebiActuatorTypeX8_3,
  HebiActuatorTypeX8_9, HebiActuatorTypeX8_16, HebiActuatorTypeR8_3, HebiActuatorTypeR8_9,
  HebiActuatorTypeR8_16
}
 
enum  HebiArQuality {
  HebiArQualityNotAvailable, HebiArQualityLimitedUnknown, HebiArQualityLimitedInitializing, HebiArQualityLimitedRelocalizing,
  HebiArQualityLimitedExcessiveMotion, HebiArQualityLimitedInsufficientFeatures, HebiArQualityNormal
}
 
enum  HebiBracketType {
  HebiBracketTypeX5LightLeft, HebiBracketTypeX5LightRight, HebiBracketTypeX5HeavyLeftInside, HebiBracketTypeX5HeavyLeftOutside,
  HebiBracketTypeX5HeavyRightInside, HebiBracketTypeX5HeavyRightOutside, HebiBracketTypeR8LightLeft, HebiBracketTypeR8LightRight,
  HebiBracketTypeR8HeavyLeftInside, HebiBracketTypeR8HeavyLeftOutside, HebiBracketTypeR8HeavyRightInside, HebiBracketTypeR8HeavyRightOutside
}
 
enum  HebiCommandBoolField { HebiCommandBoolPositionDOnError, HebiCommandBoolVelocityDOnError, HebiCommandBoolEffortDOnError, HebiCommandBoolAccelIncludesGravity }
 
enum  HebiCommandEnumField { HebiCommandEnumControlStrategy, HebiCommandEnumMstopStrategy, HebiCommandEnumMinPositionLimitStrategy, HebiCommandEnumMaxPositionLimitStrategy }
 
enum  HebiCommandFlagField {
  HebiCommandFlagSaveCurrentSettings, HebiCommandFlagReset, HebiCommandFlagBoot, HebiCommandFlagStopBoot,
  HebiCommandFlagClearLog
}
 
enum  HebiCommandFloatField {
  HebiCommandFloatVelocity, HebiCommandFloatEffort, HebiCommandFloatPositionKp, HebiCommandFloatPositionKi,
  HebiCommandFloatPositionKd, HebiCommandFloatPositionFeedForward, HebiCommandFloatPositionDeadZone, HebiCommandFloatPositionIClamp,
  HebiCommandFloatPositionPunch, HebiCommandFloatPositionMinTarget, HebiCommandFloatPositionMaxTarget, HebiCommandFloatPositionTargetLowpass,
  HebiCommandFloatPositionMinOutput, HebiCommandFloatPositionMaxOutput, HebiCommandFloatPositionOutputLowpass, HebiCommandFloatVelocityKp,
  HebiCommandFloatVelocityKi, HebiCommandFloatVelocityKd, HebiCommandFloatVelocityFeedForward, HebiCommandFloatVelocityDeadZone,
  HebiCommandFloatVelocityIClamp, HebiCommandFloatVelocityPunch, HebiCommandFloatVelocityMinTarget, HebiCommandFloatVelocityMaxTarget,
  HebiCommandFloatVelocityTargetLowpass, HebiCommandFloatVelocityMinOutput, HebiCommandFloatVelocityMaxOutput, HebiCommandFloatVelocityOutputLowpass,
  HebiCommandFloatEffortKp, HebiCommandFloatEffortKi, HebiCommandFloatEffortKd, HebiCommandFloatEffortFeedForward,
  HebiCommandFloatEffortDeadZone, HebiCommandFloatEffortIClamp, HebiCommandFloatEffortPunch, HebiCommandFloatEffortMinTarget,
  HebiCommandFloatEffortMaxTarget, HebiCommandFloatEffortTargetLowpass, HebiCommandFloatEffortMinOutput, HebiCommandFloatEffortMaxOutput,
  HebiCommandFloatEffortOutputLowpass, HebiCommandFloatSpringConstant, HebiCommandFloatReferencePosition, HebiCommandFloatReferenceEffort,
  HebiCommandFloatVelocityLimitMin, HebiCommandFloatVelocityLimitMax, HebiCommandFloatEffortLimitMin, HebiCommandFloatEffortLimitMax
}
 Command Enums. More...
 
enum  HebiCommandHighResAngleField { HebiCommandHighResAnglePosition, HebiCommandHighResAnglePositionLimitMin, HebiCommandHighResAnglePositionLimitMax }
 
enum  HebiCommandIoPinBank {
  HebiCommandIoBankA, HebiCommandIoBankB, HebiCommandIoBankC, HebiCommandIoBankD,
  HebiCommandIoBankE, HebiCommandIoBankF
}
 
enum  HebiCommandLedField { HebiCommandLedLed }
 
enum  HebiCommandNumberedFloatField { HebiCommandNumberedFloatDebug }
 
enum  HebiCommandStringField { HebiCommandStringName, HebiCommandStringFamily, HebiCommandStringAppendLog }
 
enum  HebiEndEffectorType { HebiEndEffectorTypeCustom, HebiEndEffectorTypeX5Parallel, HebiEndEffectorTypeR8Parallel }
 
enum  HebiFeedbackEnumField {
  HebiFeedbackEnumTemperatureState, HebiFeedbackEnumMstopState, HebiFeedbackEnumPositionLimitState, HebiFeedbackEnumVelocityLimitState,
  HebiFeedbackEnumEffortLimitState, HebiFeedbackEnumCommandLifetimeState, HebiFeedbackEnumArQuality
}
 
enum  HebiFeedbackFloatField {
  HebiFeedbackFloatBoardTemperature, HebiFeedbackFloatProcessorTemperature, HebiFeedbackFloatVoltage, HebiFeedbackFloatVelocity,
  HebiFeedbackFloatEffort, HebiFeedbackFloatVelocityCommand, HebiFeedbackFloatEffortCommand, HebiFeedbackFloatDeflection,
  HebiFeedbackFloatDeflectionVelocity, HebiFeedbackFloatMotorVelocity, HebiFeedbackFloatMotorCurrent, HebiFeedbackFloatMotorSensorTemperature,
  HebiFeedbackFloatMotorWindingCurrent, HebiFeedbackFloatMotorWindingTemperature, HebiFeedbackFloatMotorHousingTemperature, HebiFeedbackFloatBatteryLevel,
  HebiFeedbackFloatPwmCommand
}
 Feedback Enums. More...
 
enum  HebiFeedbackHighResAngleField { HebiFeedbackHighResAnglePosition, HebiFeedbackHighResAnglePositionCommand, HebiFeedbackHighResAngleMotorPosition }
 
enum  HebiFeedbackIoPinBank {
  HebiFeedbackIoBankA, HebiFeedbackIoBankB, HebiFeedbackIoBankC, HebiFeedbackIoBankD,
  HebiFeedbackIoBankE, HebiFeedbackIoBankF
}
 
enum  HebiFeedbackLedField { HebiFeedbackLedLed }
 
enum  HebiFeedbackNumberedFloatField { HebiFeedbackNumberedFloatDebug }
 
enum  HebiFeedbackQuaternionfField { HebiFeedbackQuaternionfOrientation, HebiFeedbackQuaternionfArOrientation }
 
enum  HebiFeedbackUInt64Field {
  HebiFeedbackUInt64SequenceNumber, HebiFeedbackUInt64ReceiveTime, HebiFeedbackUInt64TransmitTime, HebiFeedbackUInt64HardwareReceiveTime,
  HebiFeedbackUInt64HardwareTransmitTime, HebiFeedbackUInt64SenderId
}
 
enum  HebiFeedbackVector3fField { HebiFeedbackVector3fAccelerometer, HebiFeedbackVector3fGyro, HebiFeedbackVector3fArPosition }
 
enum  HebiFrameType { HebiFrameTypeCenterOfMass, HebiFrameTypeOutput, HebiFrameTypeEndEffector, HebiFrameTypeInput }
 RobotModel Enums. More...
 
enum  HebiInfoBoolField { HebiInfoBoolPositionDOnError, HebiInfoBoolVelocityDOnError, HebiInfoBoolEffortDOnError, HebiInfoBoolAccelIncludesGravity }
 
enum  HebiInfoEnumField {
  HebiInfoEnumControlStrategy, HebiInfoEnumCalibrationState, HebiInfoEnumMstopStrategy, HebiInfoEnumMinPositionLimitStrategy,
  HebiInfoEnumMaxPositionLimitStrategy
}
 
enum  HebiInfoFlagField { HebiInfoFlagSaveCurrentSettings }
 
enum  HebiInfoFloatField {
  HebiInfoFloatPositionKp, HebiInfoFloatPositionKi, HebiInfoFloatPositionKd, HebiInfoFloatPositionFeedForward,
  HebiInfoFloatPositionDeadZone, HebiInfoFloatPositionIClamp, HebiInfoFloatPositionPunch, HebiInfoFloatPositionMinTarget,
  HebiInfoFloatPositionMaxTarget, HebiInfoFloatPositionTargetLowpass, HebiInfoFloatPositionMinOutput, HebiInfoFloatPositionMaxOutput,
  HebiInfoFloatPositionOutputLowpass, HebiInfoFloatVelocityKp, HebiInfoFloatVelocityKi, HebiInfoFloatVelocityKd,
  HebiInfoFloatVelocityFeedForward, HebiInfoFloatVelocityDeadZone, HebiInfoFloatVelocityIClamp, HebiInfoFloatVelocityPunch,
  HebiInfoFloatVelocityMinTarget, HebiInfoFloatVelocityMaxTarget, HebiInfoFloatVelocityTargetLowpass, HebiInfoFloatVelocityMinOutput,
  HebiInfoFloatVelocityMaxOutput, HebiInfoFloatVelocityOutputLowpass, HebiInfoFloatEffortKp, HebiInfoFloatEffortKi,
  HebiInfoFloatEffortKd, HebiInfoFloatEffortFeedForward, HebiInfoFloatEffortDeadZone, HebiInfoFloatEffortIClamp,
  HebiInfoFloatEffortPunch, HebiInfoFloatEffortMinTarget, HebiInfoFloatEffortMaxTarget, HebiInfoFloatEffortTargetLowpass,
  HebiInfoFloatEffortMinOutput, HebiInfoFloatEffortMaxOutput, HebiInfoFloatEffortOutputLowpass, HebiInfoFloatSpringConstant,
  HebiInfoFloatVelocityLimitMin, HebiInfoFloatVelocityLimitMax, HebiInfoFloatEffortLimitMin, HebiInfoFloatEffortLimitMax
}
 Info Enums. More...
 
enum  HebiInfoHighResAngleField { HebiInfoHighResAnglePositionLimitMin, HebiInfoHighResAnglePositionLimitMax }
 
enum  HebiInfoLedField { HebiInfoLedLed }
 
enum  HebiInfoStringField { HebiInfoStringName, HebiInfoStringFamily, HebiInfoStringSerial }
 
enum  HebiIoBankPinResidentType { HebiIoBankPinResidentTypeNone, HebiIoBankPinResidentTypeInteger, HebiIoBankPinResidentTypeFloat }
 
enum  HebiJointType {
  HebiJointTypeRotationX, HebiJointTypeRotationY, HebiJointTypeRotationZ, HebiJointTypeTranslationX,
  HebiJointTypeTranslationY, HebiJointTypeTranslationZ
}
 
enum  HebiLinkInputType { HebiLinkInputTypeRightAngle, HebiLinkInputTypeInline }
 
enum  HebiLinkOutputType { HebiLinkOutputTypeRightAngle, HebiLinkOutputTypeInline }
 
enum  HebiLinkType { HebiLinkTypeX5, HebiLinkTypeR8 }
 
enum  HebiMatrixOrdering { HebiMatrixOrderingRowMajor, HebiMatrixOrderingColumnMajor }
 
enum  HebiRobotModelElementType {
  HebiRobotModelElementTypeOther, HebiRobotModelElementTypeActuator, HebiRobotModelElementTypeBracket, HebiRobotModelElementTypeJoint,
  HebiRobotModelElementTypeLink, HebiRobotModelElementTypeRigidBody, HebiRobotModelElementTypeEndEffector
}
 
enum  HebiStatusCode {
  HebiStatusSuccess = 0, HebiStatusInvalidArgument = 1, HebiStatusBufferTooSmall = 2, HebiStatusValueNotSet = 3,
  HebiStatusFailure = 4, HebiStatusArgumentOutOfRange = 5
}
 Enum Types. More...
 

Functions

void hebiCleanup (void)
 Frees all resources created by the library. Note: any calls to the HEBI library functions after this will result in undefined behavior! More...
 
void hebiCommandGetMetadata (HebiCommandMetadata *metadata)
 
void hebiCommandGetReference (HebiCommandPtr command, HebiCommandRef *ref)
 
HebiStatusCode hebiCommandGetString (HebiCommandPtr command, HebiCommandStringField field, char *buffer, size_t *length)
 Command API. More...
 
void hebiCommandSetString (HebiCommandPtr command, HebiCommandStringField field, const char *buffer, const size_t *length)
 
HebiLookupEntryListPtr hebiCreateLookupEntryList (HebiLookupPtr lookup)
 Return a snapshot of the contents of the module registry – i.e., which modules have been found by the lookup. More...
 
void hebiFeedbackGetMetadata (HebiFeedbackMetadata *metadata)
 
void hebiFeedbackGetReference (HebiFeedbackPtr feedback, HebiFeedbackRef *ref)
 Feedback API. More...
 
HebiStatusCode hebiGetLibraryVersion (int32_t *major, int32_t *minor, int32_t *revision)
 Get the version of the library. More...
 
void hebiGroupClearFeedbackHandlers (HebiGroupPtr group)
 Removes all feedback handling functions from the queue to be called on receipt of group feedback. More...
 
void hebiGroupCommandClear (HebiGroupCommandPtr command)
 Clears all data in the GroupCommand object. More...
 
HebiStatusCode hebiGroupCommandCopy (HebiGroupCommandPtr dest, HebiGroupCommandPtr src)
 Clears the dest GroupCommand object, and copies all data from the src GroupCommand object to dest. More...
 
HebiGroupCommandPtr hebiGroupCommandCreate (size_t size)
 Creates a GroupCommand for a group with the specified number of modules. More...
 
HebiCommandPtr hebiGroupCommandGetModuleCommand (HebiGroupCommandPtr command, size_t module_index)
 Get an individual command for a particular module at index module_index. More...
 
size_t hebiGroupCommandGetSize (HebiGroupCommandPtr command)
 Return the number of modules in this group Command. More...
 
HebiStatusCode hebiGroupCommandReadGains (HebiGroupCommandPtr command, const char *file)
 Import gains from a file into a GroupCommand object. More...
 
HebiStatusCode hebiGroupCommandReadSafetyParameters (HebiGroupCommandPtr command, const char *file)
 Import safety parameters from a file into a GroupCommand object. More...
 
void hebiGroupCommandRelease (HebiGroupCommandPtr command)
 Frees resources created by the GroupCommand object. More...
 
HebiStatusCode hebiGroupCommandWriteGains (HebiGroupCommandPtr command, const char *file)
 Export gains from a GroupCommand object into a file. More...
 
HebiStatusCode hebiGroupCommandWriteSafetyParameters (HebiGroupCommandPtr command, const char *file)
 Export safety parameters from a GroupCommand object into a file. More...
 
HebiGroupPtr hebiGroupCreateConnectedFromMac (HebiLookupPtr lookup, const HebiMacAddress *address, int32_t timeout_ms)
 Create a group with all modules connected to module with the given MAC address. More...
 
HebiGroupPtr hebiGroupCreateConnectedFromName (HebiLookupPtr lookup, const char *family, const char *name, int32_t timeout_ms)
 Create a group with all modules connected to module with the given name and family. More...
 
HebiGroupPtr hebiGroupCreateFromFamily (HebiLookupPtr lookup, const char *family, int32_t timeout_ms)
 Create a group with all modules known to the lookup with the given family. More...
 
HebiGroupPtr hebiGroupCreateFromMacs (HebiLookupPtr lookup, const HebiMacAddress *const *addresses, size_t num_addresses, int32_t timeout_ms)
 Create a group of modules with the given MAC addresses. More...
 
HebiGroupPtr hebiGroupCreateFromNames (HebiLookupPtr lookup, const char *const *families, size_t num_families, const char *const *names, size_t num_names, int32_t timeout_ms)
 Create a group with modules matching the given names and families. More...
 
HebiGroupPtr hebiGroupCreateImitation (size_t size)
 Group API. More...
 
void hebiGroupFeedbackClear (HebiGroupFeedbackPtr feedback)
 Clears all data in the GroupFeedback object. More...
 
HebiStatusCode hebiGroupFeedbackCopy (HebiGroupFeedbackPtr dest, HebiGroupFeedbackPtr src)
 Clears the dest GroupFeedback object, and copies all data from the src GroupFeedback object to dest. More...
 
HebiGroupFeedbackPtr hebiGroupFeedbackCreate (size_t size)
 Creates a GroupFeedback for a group with the specified number of modules. More...
 
HebiFeedbackPtr hebiGroupFeedbackGetModuleFeedback (HebiGroupFeedbackPtr feedback, size_t module_index)
 Get an individual feedback for a particular module at index module_index. More...
 
size_t hebiGroupFeedbackGetSize (HebiGroupFeedbackPtr feedback)
 Return the number of modules in this group Feedback. More...
 
void hebiGroupFeedbackRelease (HebiGroupFeedbackPtr feedback)
 Frees resources created by the GroupFeedback object. More...
 
int32_t hebiGroupGetCommandLifetime (HebiGroupPtr group)
 Returns the current command lifetime, in milliseconds. More...
 
float hebiGroupGetFeedbackFrequencyHz (HebiGroupPtr group)
 Returns the current feedback request loop frequency (in Hz). More...
 
HebiStatusCode hebiGroupGetNextFeedback (HebiGroupPtr group, HebiGroupFeedbackPtr feedback, int32_t timeout_ms)
 Returns the most recently stored feedback from a sent feedback request, or returns the next one received (up to the requested timeout). More...
 
size_t hebiGroupGetSize (HebiGroupPtr group)
 Returns the number of modules in a group. More...
 
void hebiGroupInfoClear (HebiGroupInfoPtr info)
 Clears all data in the GroupInfo object. More...
 
HebiStatusCode hebiGroupInfoCopy (HebiGroupInfoPtr dest, HebiGroupInfoPtr src)
 Clears the dest GroupInfo object, and copies all data from the src GroupInfo object to dest. More...
 
HebiGroupInfoPtr hebiGroupInfoCreate (size_t size)
 Creates a GroupInfo for a group with the specified number of modules. More...
 
HebiInfoPtr hebiGroupInfoGetModuleInfo (HebiGroupInfoPtr info, size_t module_index)
 Get an individual info for a particular module at index module_index. More...
 
size_t hebiGroupInfoGetSize (HebiGroupInfoPtr info)
 Return the number of modules in this group Info. More...
 
void hebiGroupInfoRelease (HebiGroupInfoPtr info)
 Frees resources created by the GroupInfo object. More...
 
HebiStatusCode hebiGroupInfoWriteGains (HebiGroupInfoPtr info, const char *file)
 Export gains from a GroupInfo object into a file. More...
 
HebiStatusCode hebiGroupInfoWriteSafetyParameters (HebiGroupInfoPtr info, const char *file)
 Export safety parameters from a GroupInfo object into a file. More...
 
HebiStatusCode hebiGroupRegisterFeedbackHandler (HebiGroupPtr group, GroupFeedbackHandlerFunction handler, void *user_data)
 Add a function that is called whenever feedback is returned from the group. More...
 
void hebiGroupRelease (HebiGroupPtr group)
 Release resources for a given group; group should not be used after this call. More...
 
HebiStatusCode hebiGroupRequestInfo (HebiGroupPtr group, HebiGroupInfoPtr info, int32_t timeout_ms)
 Requests info from the group, and writes it to the provided info object. More...
 
HebiStatusCode hebiGroupSendCommand (HebiGroupPtr group, HebiGroupCommandPtr command)
 Sends a command to the given group without requesting an acknowledgement. More...
 
HebiStatusCode hebiGroupSendCommandWithAcknowledgement (HebiGroupPtr group, HebiGroupCommandPtr command, int32_t timeout_ms)
 Sends a command to the given group, requesting an acknowledgement of transmission to be sent back. More...
 
HebiStatusCode hebiGroupSendFeedbackRequest (HebiGroupPtr group)
 Requests feedback from the group. More...
 
HebiStatusCode hebiGroupSetCommandLifetime (HebiGroupPtr group, int32_t lifetime_ms)
 Sets the command lifetime for the group, in milliseconds. More...
 
HebiStatusCode hebiGroupSetFeedbackFrequencyHz (HebiGroupPtr group, float frequency)
 Sets the feedback request loop frequency (in Hz). More...
 
HebiStatusCode hebiGroupStartLog (HebiGroupPtr group, const char *dir, const char *file, HebiStringPtr *ret)
 Starts logging data to a file. More...
 
HebiLogFilePtr hebiGroupStopLog (HebiGroupPtr group)
 Stops logging data to a file. More...
 
HebiStatusCode hebiIKAddConstraintJointAngles (HebiIKPtr ik, double weight, size_t num_joints, const double *min_positions, const double *max_positions)
 Define joint angle constraints. More...
 
HebiStatusCode hebiIKAddObjectiveCustom (HebiIKPtr ik, double weight, size_t num_errors, void(*err_fnc)(void *user_data, size_t num_positions, const double *positions, double *errors), void *user_data)
 Add a custom objective function to be minimized by the IK solver. More...
 
HebiStatusCode hebiIKAddObjectiveEndEffectorPosition (HebiIKPtr ik, double weight, size_t end_effector_index, double x, double y, double z)
 Add an objective that optimizes for the end effector output frame origin to be at the given (x, y, z) point. More...
 
HebiStatusCode hebiIKAddObjectiveEndEffectorSO3 (HebiIKPtr ik, double weight, size_t end_effector_index, const double *matrix, HebiMatrixOrdering ordering)
 Add an objective that optimizes for the end effector output frame orientation to be given by the 3x3 rotation matrix. Note that this is incompatible with the end effector tip axis objective. More...
 
HebiStatusCode hebiIKAddObjectiveEndEffectorTipAxis (HebiIKPtr ik, double weight, size_t end_effector_index, double x, double y, double z)
 Add an objective that points the end effector's z axis in a given direction. Note that this is incompatible with the end effector S03 orientation objective. More...
 
void hebiIKClearAll (HebiIKPtr ik)
 Clears the objectives and constraints from this IK object, along with any modifications to the default algorithm parameters. More...
 
HebiIKPtr hebiIKCreate (void)
 Inverse Kinematics API. More...
 
void hebiIKRelease (HebiIKPtr ik)
 Frees resources created by this inverse kinematics object. More...
 
HebiStatusCode hebiIKSolve (HebiIKPtr ik, HebiRobotModelPtr model, const double *initial_positions, double *ik_solution, void *result_info)
 Solves for an inverse kinematics solution that moves the end effector to a given point. More...
 
void hebiInfoGetMetadata (HebiInfoMetadata *metadata)
 
void hebiInfoGetReference (HebiInfoPtr info, HebiInfoRef *ref)
 
HebiStatusCode hebiInfoGetString (HebiInfoPtr info, HebiInfoStringField field, char *buffer, size_t *length)
 Info API. More...
 
HebiStatusCode hebiLogFileGetFileName (HebiLogFilePtr log_file, char *buffer, size_t *length)
 Copy the path and name of the log file into a buffer. More...
 
HebiStatusCode hebiLogFileGetNextFeedback (HebiLogFilePtr log_file, HebiGroupFeedbackPtr field)
 Retrieve the next group feedback from the opened log file. More...
 
size_t hebiLogFileGetNumberOfModules (HebiLogFilePtr log_file)
 Retrieve the number of modules in the group represented by an opened log file. More...
 
HebiLogFilePtr hebiLogFileOpen (const char *file)
 Opens an existing log file. More...
 
void hebiLogFileRelease (HebiLogFilePtr log_file)
 Logging API. More...
 
HebiLookupPtr hebiLookupCreate (const char *const *ifaces, size_t ifaces_length)
 Lookup API. More...
 
HebiStatusCode hebiLookupEntryListGetFamily (HebiLookupEntryListPtr lookup_list, size_t index, char *buffer, size_t *length)
 
HebiStatusCode hebiLookupEntryListGetMacAddress (HebiLookupEntryListPtr lookup_list, size_t index, HebiMacAddress *mac_address)
 
HebiStatusCode hebiLookupEntryListGetName (HebiLookupEntryListPtr lookup_list, size_t index, char *buffer, size_t *length)
 
size_t hebiLookupEntryListGetSize (HebiLookupEntryListPtr lookup_list)
 
void hebiLookupEntryListRelease (HebiLookupEntryListPtr lookup_list)
 Release resources for a given lookup entry list; list should not be used after this call. More...
 
double hebiLookupGetLookupFrequencyHz (HebiLookupPtr lookup)
 gets the lookup request rate [Hz] More...
 
void hebiLookupRelease (HebiLookupPtr lookup)
 Frees resources created by the lookup object. More...
 
HebiStatusCode hebiLookupSetLookupFrequencyHz (HebiLookupPtr lookup, double frequency)
 sets the lookup request rate [Hz] More...
 
HebiStatusCode hebiRobotModelAdd (HebiRobotModelPtr robot_model, HebiRobotModelElementPtr existing_element, size_t output_index, HebiRobotModelElementPtr new_element)
 Add an element to a parent element connected to a robot model object. More...
 
HebiRobotModelPtr hebiRobotModelCreate (void)
 Creates an object to hold a robot model (tree topology). This structure has a single output available at the origin. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateActuator (HebiActuatorType actuator_type)
 Creates a robot model element corresponding to a standard HEBI actuator. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateBracket (HebiBracketType bracket_type)
 Creates a rigid body, including mass and static transforms, corresponding to a standard HEBI bracket. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateEndEffector (HebiEndEffectorType end_effector_type, const double *com, const double *inertia, double mass, const double *output_frame, HebiMatrixOrdering ordering)
 Creates a robot model element corresponding to a standard HEBI end effector, or a custom end effector defining static transforms to the given outputs. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateJoint (HebiJointType joint_type)
 RobotModel API. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateLink (HebiLinkType link_type, HebiLinkInputType input_type, HebiLinkOutputType output_type, double extension, double twist)
 Creates a rigid body, including mass and static transforms, corresponding to a standard HEBI link. More...
 
HebiRobotModelElementPtr hebiRobotModelElementCreateRigidBody (const double *com, const double *inertia, double mass, size_t num_outputs, const double *outputs, HebiMatrixOrdering ordering)
 Creates a rigid body defining static transforms to the given outputs. More...
 
void hebiRobotModelElementRelease (HebiRobotModelElementPtr element)
 Frees resources created by this element. More...
 
HebiStatusCode hebiRobotModelGetBaseFrame (HebiRobotModelPtr robot_model, double *transform, HebiMatrixOrdering ordering)
 Retreives the fixed transform from the origin to the input of the first added model element. More...
 
HebiStatusCode hebiRobotModelGetElementMetadata (HebiRobotModelPtr model, size_t index, HebiRobotModelElementMetadata *output)
 Retrieves metadata about an element in the robot model. This metadata includes what type of element this is, and per-element-type information. More...
 
HebiStatusCode hebiRobotModelGetForwardKinematics (HebiRobotModelPtr robot_model, HebiFrameType frame_type, const double *positions, double *frames, HebiMatrixOrdering ordering)
 Generates the transforms for the forward kinematics of the given robot model. More...
 
const char * hebiRobotModelGetImportError ()
 Retrieve any error string from the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport. More...
 
const char * hebiRobotModelGetImportWarning (size_t warning_index)
 Retrieve the 'ith' warning string from the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport. More...
 
size_t hebiRobotModelGetImportWarningCount ()
 Retrieve the number of warnings corresponding to the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport. More...
 
HebiStatusCode hebiRobotModelGetJacobians (HebiRobotModelPtr robot_model, HebiFrameType frame_type, const double *positions, double *jacobians, HebiMatrixOrdering ordering)
 Generates the jacobian for each frame in the given kinematic tree. More...
 
HebiStatusCode hebiRobotModelGetMasses (HebiRobotModelPtr robot_model, double *masses)
 Fill in the masses vector with the mass of each body with mass in the kinematic tree, reported in a depth-first ordering. More...
 
size_t hebiRobotModelGetNumberOfDoFs (HebiRobotModelPtr robot_model)
 Returns the number of settable degrees of freedom in the kinematic tree. (This is equal to the number of joints added). More...
 
size_t hebiRobotModelGetNumberOfElements (HebiRobotModelPtr robot_model)
 Returns the number of elements added to the kinematic tree. More...
 
size_t hebiRobotModelGetNumberOfFrames (HebiRobotModelPtr robot_model, HebiFrameType frame_type)
 Return the number of frames in the forward kinematic tree of the robot model. More...
 
HebiStatusCode hebiRobotModelGetTreeTopology (HebiRobotModelPtr robot_model, HebiFrameType frame_type, HebiRobotModelElementTopology *table)
 returns table of information about the shape of kinematic tree More...
 
HebiRobotModelPtr hebiRobotModelImport (const char *file)
 Import robot model from a file into a RobotModel object. More...
 
HebiRobotModelPtr hebiRobotModelImportBuffer (const char *buffer, size_t buffer_size)
 Import robot model from a buffer into a RobotModel object. More...
 
void hebiRobotModelRelease (HebiRobotModelPtr robot_model)
 Frees resources created by this robot model object. More...
 
HebiStatusCode hebiRobotModelSetBaseFrame (HebiRobotModelPtr robot_model, const double *transform, HebiMatrixOrdering ordering)
 Sets the fixed transform from the origin to the input of the first added model element. More...
 
const char * hebiSafetyParametersGetLastError (void)
 Misc Functions. More...
 
HebiStatusCode hebiStringGetString (HebiStringPtr str, char *buffer, size_t *length)
 String Functions. More...
 
void hebiStringRelease (HebiStringPtr str)
 Releases a string instance. More...
 
HebiTrajectoryPtr hebiTrajectoryCreateUnconstrainedQp (size_t num_waypoints, const double *positions, const double *velocities, const double *accelerations, const double *time_vector)
 Trajectory API. More...
 
double hebiTrajectoryGetDuration (HebiTrajectoryPtr trajectory)
 Returns the length of this trajectory (in seconds). More...
 
HebiStatusCode hebiTrajectoryGetState (HebiTrajectoryPtr trajectory, double time, double *position, double *velocity, double *acceleration)
 Gets the value of the trajectory at a given time. More...
 
void hebiTrajectoryRelease (HebiTrajectoryPtr trajectory)
 Frees resources created by this trajectory. More...
 

Macro Definition Documentation

#define M_PI   3.14159265358979323846

Definition at line 13 of file hebi.h.

Typedef Documentation

typedef void(* GroupFeedbackHandlerFunction) (HebiGroupFeedbackPtr fbk, void *user_data)

Group feedback handling function signature.

Definition at line 554 of file hebi.h.

The type of actuators supported by the API

AR Quality codes

The type of brackets supported by the API

Command Enums.

Command metadata which is guaranteed to be static for the loaded library

typedef struct HebiCommand_* HebiCommandPtr

Typedefs.

The C-style's API representation of a command.

Encapsulates data to be sent to a module

Definition at line 444 of file hebi.h.

Direct Command field reference

The type of end effectors supported by the API

Feedback Enums.

Feedback metadata which is guaranteed to be static for the loaded library

typedef struct HebiFeedback_* HebiFeedbackPtr

The C-style's API representation of feedback.

Encapsulates feedback received from a module

Definition at line 451 of file hebi.h.

Direct Feedback field reference

RobotModel Enums.

Which frame to report results in (e.g., for getForwardKinematics and other functions.

typedef struct HebiGroupCommand_* HebiGroupCommandPtr

The C-style's API representation of a command object for a group of modules.

This is an iterable list of command structures; commands are sent to modules in a group using the fields within this structure.

Definition at line 467 of file hebi.h.

typedef struct HebiGroupFeedback_* HebiGroupFeedbackPtr

The C-style's API representation of a feedback object for a group of modules.

This is an iterable list of feedback structures; feedback from modules in a group are retrieved primarily through this structure.

Definition at line 476 of file hebi.h.

typedef struct HebiGroupInfo_* HebiGroupInfoPtr

The C-style's API representation of a info object for a group of modules.

This is an iterable list of info structures; info from modules in a group are retrieved primarily through this structure.

Definition at line 485 of file hebi.h.

typedef struct HebiGroup_* HebiGroupPtr

The C-style's API representation of a group.

Represents a connection to a group of modules. Sends commands to and receives feedback from the group.

Definition at line 493 of file hebi.h.

typedef struct HebiIK_* HebiIKPtr

An inverse kinematics object which uses a kinematics object to search for joint angles that optimize any of several objectives while respecting defined constraints.

Definition at line 540 of file hebi.h.

Info Enums.

Info metadata which is guaranteed to be static for the loaded library

typedef struct HebiInfo_* HebiInfoPtr

The C-style's API representation of info.

Encapsulates info (settings, etc.) received from a module

Definition at line 458 of file hebi.h.

typedef struct HebiInfoRef_ HebiInfoRef

Direct Info field reference

What the type of motion (axis, rotation, translation, etc) is allowed by a joint.

The type of link inputs supported by the API

The type of link outputs supported by the API

typedef enum HebiLinkType HebiLinkType

The type of links supported by the API

typedef struct HebiLogFile_* HebiLogFilePtr

The C-style's API representation of a log file.

Represents a log file generated by the API.

Definition at line 514 of file hebi.h.

typedef struct HebiLookupEntryList_* HebiLookupEntryListPtr

A list of entries that represent a snapshot of the state of the lookup object at some point in time. These entries include network HEBI devices such as actuators.

Definition at line 507 of file hebi.h.

typedef struct HebiLookup_* HebiLookupPtr

Maintains a registry of network-connected modules and returns Group objects to the user. Only one Lookup object is needed per application.

Definition at line 500 of file hebi.h.

Structures.

How a matrix is serialized to an array.

Contains matadata information about a robot element (e.g. element is an X5-9 actuator)

typedef struct HebiRobotModelElement_* HebiRobotModelElementPtr

Contains a robot model element, which has an input and zero or more outputs. This may refer to a rigid body or a massless joint.

Definition at line 533 of file hebi.h.

Which type of robot model element (e.g. actuator, link, etc.)

typedef struct HebiRobotModel_* HebiRobotModelPtr

A robot model object which stores a tree of connected modules, and allows for computation of forward kinematics, jacobians, and more.

Definition at line 527 of file hebi.h.

Enum Types.

API call status codes

typedef struct HebiString_* HebiStringPtr

The C-style's API representation of a string.

Represents a null terminated UTF-8 string

Definition at line 521 of file hebi.h.

typedef struct HebiTrajectory_* HebiTrajectoryPtr

The C-style's API representation of a trajectory.

Do not inherit from this; only obtain pointers through the API!

Used to generate position, velocity, and acceleration for different joints.

Definition at line 549 of file hebi.h.

typedef struct HebiVector3f_ HebiVector3f

Enumeration Type Documentation

The type of actuators supported by the API

Enumerator
HebiActuatorTypeX5_1 
HebiActuatorTypeX5_4 
HebiActuatorTypeX5_9 
HebiActuatorTypeX8_3 
HebiActuatorTypeX8_9 
HebiActuatorTypeX8_16 
HebiActuatorTypeR8_3 
HebiActuatorTypeR8_9 
HebiActuatorTypeR8_16 

Definition at line 364 of file hebi.h.

AR Quality codes

Enumerator
HebiArQualityNotAvailable 
HebiArQualityLimitedUnknown 

Camera position tracking is not available.

HebiArQualityLimitedInitializing 

Tracking is available albeit suboptimal for an unknown reason.

HebiArQualityLimitedRelocalizing 

The AR session has not yet gathered enough camera or motion data to provide tracking information.

HebiArQualityLimitedExcessiveMotion 

The AR session is attempting to resume after an interruption.

HebiArQualityLimitedInsufficientFeatures 

The device is moving too fast for accurate image-based position tracking.

HebiArQualityNormal 

The scene visible to the camera does not contain enough distinguishable features for image-based position tracking.

Camera position tracking is providing optimal results

Definition at line 35 of file hebi.h.

The type of brackets supported by the API

Enumerator
HebiBracketTypeX5LightLeft 
HebiBracketTypeX5LightRight 
HebiBracketTypeX5HeavyLeftInside 
HebiBracketTypeX5HeavyLeftOutside 
HebiBracketTypeX5HeavyRightInside 
HebiBracketTypeX5HeavyRightOutside 
HebiBracketTypeR8LightLeft 
HebiBracketTypeR8LightRight 
HebiBracketTypeR8HeavyLeftInside 
HebiBracketTypeR8HeavyLeftOutside 
HebiBracketTypeR8HeavyRightInside 
HebiBracketTypeR8HeavyRightOutside 

Definition at line 403 of file hebi.h.

Enumerator
HebiCommandBoolPositionDOnError 
HebiCommandBoolVelocityDOnError 

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.

HebiCommandBoolEffortDOnError 

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.

HebiCommandBoolAccelIncludesGravity 

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.

Definition at line 116 of file hebi.h.

Enumerator
HebiCommandEnumControlStrategy 
HebiCommandEnumMstopStrategy 

How the position, velocity, and effort PID loops are connected in order to control motor PWM.

HebiCommandEnumMinPositionLimitStrategy 

The motion stop strategy for the actuator.

HebiCommandEnumMaxPositionLimitStrategy 

The position limit strategy (at the minimum position) for the actuator.

Definition at line 137 of file hebi.h.

Enumerator
HebiCommandFlagSaveCurrentSettings 
HebiCommandFlagReset 

Indicates if the module should save the current values of all of its settings.

HebiCommandFlagBoot 

Restart the module.

HebiCommandFlagStopBoot 

Boot the module from bootloader into application.

HebiCommandFlagClearLog 

Stop the module from automatically booting into application.

Definition at line 129 of file hebi.h.

Command Enums.

Enumerator
HebiCommandFloatVelocity 
HebiCommandFloatEffort 

Velocity of the module output (post-spring).

HebiCommandFloatPositionKp 

Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages).

HebiCommandFloatPositionKi 

Proportional PID gain for position.

HebiCommandFloatPositionKd 

Integral PID gain for position.

HebiCommandFloatPositionFeedForward 

Derivative PID gain for position.

HebiCommandFloatPositionDeadZone 

Feed forward term for position (this term is multiplied by the target and added to the output).

HebiCommandFloatPositionIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiCommandFloatPositionPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiCommandFloatPositionMinTarget 

Constant offset to the position PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiCommandFloatPositionMaxTarget 

Minimum allowed value for input to the PID controller.

HebiCommandFloatPositionTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiCommandFloatPositionMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatPositionMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiCommandFloatPositionOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiCommandFloatVelocityKp 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatVelocityKi 

Proportional PID gain for velocity.

HebiCommandFloatVelocityKd 

Integral PID gain for velocity.

HebiCommandFloatVelocityFeedForward 

Derivative PID gain for velocity.

HebiCommandFloatVelocityDeadZone 

Feed forward term for velocity (this term is multiplied by the target and added to the output).

HebiCommandFloatVelocityIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiCommandFloatVelocityPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiCommandFloatVelocityMinTarget 

Constant offset to the velocity PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiCommandFloatVelocityMaxTarget 

Minimum allowed value for input to the PID controller.

HebiCommandFloatVelocityTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiCommandFloatVelocityMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatVelocityMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiCommandFloatVelocityOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiCommandFloatEffortKp 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatEffortKi 

Proportional PID gain for effort.

HebiCommandFloatEffortKd 

Integral PID gain for effort.

HebiCommandFloatEffortFeedForward 

Derivative PID gain for effort.

HebiCommandFloatEffortDeadZone 

Feed forward term for effort (this term is multiplied by the target and added to the output).

HebiCommandFloatEffortIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiCommandFloatEffortPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiCommandFloatEffortMinTarget 

Constant offset to the effort PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiCommandFloatEffortMaxTarget 

Minimum allowed value for input to the PID controller.

HebiCommandFloatEffortTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiCommandFloatEffortMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatEffortMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiCommandFloatEffortOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiCommandFloatSpringConstant 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiCommandFloatReferencePosition 

The spring constant of the module.

HebiCommandFloatReferenceEffort 

Set the internal encoder reference offset so that the current position matches the given reference command.

HebiCommandFloatVelocityLimitMin 

Set the internal effort reference offset so that the current effort matches the given reference command.

HebiCommandFloatVelocityLimitMax 

The firmware safety limit for the minimum allowed velocity.

HebiCommandFloatEffortLimitMin 

The firmware safety limit for the maximum allowed velocity.

HebiCommandFloatEffortLimitMax 

The firmware safety limit for the minimum allowed effort.

Definition at line 55 of file hebi.h.

Enumerator
HebiCommandHighResAnglePosition 
HebiCommandHighResAnglePositionLimitMin 

Position of the module output (post-spring).

HebiCommandHighResAnglePositionLimitMax 

The firmware safety limit for the minimum allowed position.

Definition at line 106 of file hebi.h.

Enumerator
HebiCommandIoBankA 
HebiCommandIoBankB 

I/O pin bank a (pins 1-8 available)

HebiCommandIoBankC 

I/O pin bank b (pins 1-8 available)

HebiCommandIoBankD 

I/O pin bank c (pins 1-8 available)

HebiCommandIoBankE 

I/O pin bank d (pins 1-8 available)

HebiCommandIoBankF 

I/O pin bank e (pins 1-8 available)

Definition at line 144 of file hebi.h.

Enumerator
HebiCommandLedLed 

Definition at line 153 of file hebi.h.

Enumerator
HebiCommandNumberedFloatDebug 

Definition at line 112 of file hebi.h.

Enumerator
HebiCommandStringName 
HebiCommandStringFamily 

The name for this module. The string must be null-terminated and less than 21 characters.

HebiCommandStringAppendLog 

The family for this module. The string must be null-terminated and less than 21 characters.

Definition at line 123 of file hebi.h.

The type of end effectors supported by the API

Enumerator
HebiEndEffectorTypeCustom 
HebiEndEffectorTypeX5Parallel 
HebiEndEffectorTypeR8Parallel 

Definition at line 421 of file hebi.h.

Enumerator
HebiFeedbackEnumTemperatureState 
HebiFeedbackEnumMstopState 

Describes how the temperature inside the module is limiting the output of the motor.

HebiFeedbackEnumPositionLimitState 

Current status of the MStop.

HebiFeedbackEnumVelocityLimitState 

Software-controlled bounds on the allowable position of the module; user settable.

HebiFeedbackEnumEffortLimitState 

Software-controlled bounds on the allowable velocity of the module.

HebiFeedbackEnumCommandLifetimeState 

Software-controlled bounds on the allowable effort of the module.

HebiFeedbackEnumArQuality 

The state of the command lifetime safety controller, with respect to the current group.

Definition at line 211 of file hebi.h.

Feedback Enums.

Enumerator
HebiFeedbackFloatBoardTemperature 
HebiFeedbackFloatProcessorTemperature 

Ambient temperature inside the module (measured at the IMU chip)

HebiFeedbackFloatVoltage 

Temperature of the processor chip.

HebiFeedbackFloatVelocity 

Bus voltage at which the module is running.

HebiFeedbackFloatEffort 

Velocity of the module output (post-spring).

HebiFeedbackFloatVelocityCommand 

Effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages).

HebiFeedbackFloatEffortCommand 

Commanded velocity of the module output (post-spring)

HebiFeedbackFloatDeflection 

Commanded effort at the module output; units vary (e.g., N * m for rotational joints and N for linear stages).

HebiFeedbackFloatDeflectionVelocity 

Difference between the pre-spring and post-spring output position.

HebiFeedbackFloatMotorVelocity 

Velocity of the difference between the pre-spring and post-spring output position.

HebiFeedbackFloatMotorCurrent 

The velocity of the motor shaft.

HebiFeedbackFloatMotorSensorTemperature 

Current supplied to the motor.

HebiFeedbackFloatMotorWindingCurrent 

The temperature from a sensor near the motor housing.

HebiFeedbackFloatMotorWindingTemperature 

The estimated current in the motor windings.

HebiFeedbackFloatMotorHousingTemperature 

The estimated temperature of the motor windings.

HebiFeedbackFloatBatteryLevel 

The estimated temperature of the motor housing.

HebiFeedbackFloatPwmCommand 

Charge level of the device’s battery (in percent).

Definition at line 161 of file hebi.h.

Enumerator
HebiFeedbackHighResAnglePosition 
HebiFeedbackHighResAnglePositionCommand 

Position of the module output (post-spring).

HebiFeedbackHighResAngleMotorPosition 

Commanded position of the module output (post-spring).

Definition at line 181 of file hebi.h.

Enumerator
HebiFeedbackIoBankA 
HebiFeedbackIoBankB 

I/O pin bank a (pins 1-8 available)

HebiFeedbackIoBankC 

I/O pin bank b (pins 1-8 available)

HebiFeedbackIoBankD 

I/O pin bank c (pins 1-8 available)

HebiFeedbackIoBankE 

I/O pin bank d (pins 1-8 available)

HebiFeedbackIoBankF 

I/O pin bank e (pins 1-8 available)

Definition at line 221 of file hebi.h.

Enumerator
HebiFeedbackLedLed 

Definition at line 230 of file hebi.h.

Enumerator
HebiFeedbackNumberedFloatDebug 

Definition at line 187 of file hebi.h.

Enumerator
HebiFeedbackQuaternionfOrientation 
HebiFeedbackQuaternionfArOrientation 

A filtered estimate of the orientation of the module.

Definition at line 206 of file hebi.h.

Enumerator
HebiFeedbackUInt64SequenceNumber 
HebiFeedbackUInt64ReceiveTime 

Sequence number going to module (local)

HebiFeedbackUInt64TransmitTime 

Timestamp of when message was received from module (local)

HebiFeedbackUInt64HardwareReceiveTime 

Timestamp of when message was transmitted to module (local)

HebiFeedbackUInt64HardwareTransmitTime 

Timestamp of when message was received by module (remote)

HebiFeedbackUInt64SenderId 

Timestamp of when message was transmitted from module (remote)

Definition at line 191 of file hebi.h.

Enumerator
HebiFeedbackVector3fAccelerometer 
HebiFeedbackVector3fGyro 

Accelerometer data.

HebiFeedbackVector3fArPosition 

Gyro data.

Definition at line 200 of file hebi.h.

RobotModel Enums.

Which frame to report results in (e.g., for getForwardKinematics and other functions.

Enumerator
HebiFrameTypeCenterOfMass 
HebiFrameTypeOutput 
HebiFrameTypeEndEffector 
HebiFrameTypeInput 

Definition at line 327 of file hebi.h.

Enumerator
HebiInfoBoolPositionDOnError 
HebiInfoBoolVelocityDOnError 

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.

HebiInfoBoolEffortDOnError 

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.

HebiInfoBoolAccelIncludesGravity 

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.

Definition at line 290 of file hebi.h.

Enumerator
HebiInfoEnumControlStrategy 
HebiInfoEnumCalibrationState 

How the position, velocity, and effort PID loops are connected in order to control motor PWM.

HebiInfoEnumMstopStrategy 

The calibration state of the module.

HebiInfoEnumMinPositionLimitStrategy 

The motion stop strategy for the actuator.

HebiInfoEnumMaxPositionLimitStrategy 

The position limit strategy (at the minimum position) for the actuator.

Definition at line 307 of file hebi.h.

Enumerator
HebiInfoFlagSaveCurrentSettings 

Definition at line 303 of file hebi.h.

Info Enums.

Enumerator
HebiInfoFloatPositionKp 
HebiInfoFloatPositionKi 

Proportional PID gain for position.

HebiInfoFloatPositionKd 

Integral PID gain for position.

HebiInfoFloatPositionFeedForward 

Derivative PID gain for position.

HebiInfoFloatPositionDeadZone 

Feed forward term for position (this term is multiplied by the target and added to the output).

HebiInfoFloatPositionIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiInfoFloatPositionPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiInfoFloatPositionMinTarget 

Constant offset to the position PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiInfoFloatPositionMaxTarget 

Minimum allowed value for input to the PID controller.

HebiInfoFloatPositionTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiInfoFloatPositionMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatPositionMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiInfoFloatPositionOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiInfoFloatVelocityKp 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatVelocityKi 

Proportional PID gain for velocity.

HebiInfoFloatVelocityKd 

Integral PID gain for velocity.

HebiInfoFloatVelocityFeedForward 

Derivative PID gain for velocity.

HebiInfoFloatVelocityDeadZone 

Feed forward term for velocity (this term is multiplied by the target and added to the output).

HebiInfoFloatVelocityIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiInfoFloatVelocityPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiInfoFloatVelocityMinTarget 

Constant offset to the velocity PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiInfoFloatVelocityMaxTarget 

Minimum allowed value for input to the PID controller.

HebiInfoFloatVelocityTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiInfoFloatVelocityMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatVelocityMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiInfoFloatVelocityOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiInfoFloatEffortKp 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatEffortKi 

Proportional PID gain for effort.

HebiInfoFloatEffortKd 

Integral PID gain for effort.

HebiInfoFloatEffortFeedForward 

Derivative PID gain for effort.

HebiInfoFloatEffortDeadZone 

Feed forward term for effort (this term is multiplied by the target and added to the output).

HebiInfoFloatEffortIClamp 

Error values within +/- this value from zero are treated as zero (in terms of computed proportional output, input to numerical derivative, and accumulated integral error).

HebiInfoFloatEffortPunch 

Maximum allowed value for the output of the integral component of the PID loop; the integrated error is not allowed to exceed value that will generate this number.

HebiInfoFloatEffortMinTarget 

Constant offset to the effort PID output outside of the deadzone; it is added when the error is positive and subtracted when it is negative.

HebiInfoFloatEffortMaxTarget 

Minimum allowed value for input to the PID controller.

HebiInfoFloatEffortTargetLowpass 

Maximum allowed value for input to the PID controller.

HebiInfoFloatEffortMinOutput 

A simple lowpass filter applied to the target set point; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatEffortMaxOutput 

Output from the PID controller is limited to a minimum of this value.

HebiInfoFloatEffortOutputLowpass 

Output from the PID controller is limited to a maximum of this value.

HebiInfoFloatSpringConstant 

A simple lowpass filter applied to the controller output; needs to be between 0 and 1. At each timestep: x_t = x_t * a + x_{t-1} * (1 - a).

HebiInfoFloatVelocityLimitMin 

The spring constant of the module.

HebiInfoFloatVelocityLimitMax 

The firmware safety limit for the minimum allowed velocity.

HebiInfoFloatEffortLimitMin 

The firmware safety limit for the maximum allowed velocity.

HebiInfoFloatEffortLimitMax 

The firmware safety limit for the minimum allowed effort.

Definition at line 238 of file hebi.h.

Enumerator
HebiInfoHighResAnglePositionLimitMin 
HebiInfoHighResAnglePositionLimitMax 

The firmware safety limit for the minimum allowed position.

Definition at line 285 of file hebi.h.

Enumerator
HebiInfoLedLed 

Definition at line 315 of file hebi.h.

Enumerator
HebiInfoStringName 
HebiInfoStringFamily 

The name for this module. The string must be null-terminated and less than 21 characters.

HebiInfoStringSerial 

The family for this module. The string must be null-terminated and less than 21 characters.

Definition at line 297 of file hebi.h.

Enumerator
HebiIoBankPinResidentTypeNone 
HebiIoBankPinResidentTypeInteger 
HebiIoBankPinResidentTypeFloat 

Definition at line 45 of file hebi.h.

What the type of motion (axis, rotation, translation, etc) is allowed by a joint.

Enumerator
HebiJointTypeRotationX 
HebiJointTypeRotationY 
HebiJointTypeRotationZ 
HebiJointTypeTranslationX 
HebiJointTypeTranslationY 
HebiJointTypeTranslationZ 

Definition at line 352 of file hebi.h.

The type of link inputs supported by the API

Enumerator
HebiLinkInputTypeRightAngle 
HebiLinkInputTypeInline 

Definition at line 387 of file hebi.h.

The type of link outputs supported by the API

Enumerator
HebiLinkOutputTypeRightAngle 
HebiLinkOutputTypeInline 

Definition at line 395 of file hebi.h.

The type of links supported by the API

Enumerator
HebiLinkTypeX5 
HebiLinkTypeR8 

Definition at line 379 of file hebi.h.

How a matrix is serialized to an array.

Enumerator
HebiMatrixOrderingRowMajor 
HebiMatrixOrderingColumnMajor 

Definition at line 430 of file hebi.h.

Which type of robot model element (e.g. actuator, link, etc.)

Enumerator
HebiRobotModelElementTypeOther 
HebiRobotModelElementTypeActuator 
HebiRobotModelElementTypeBracket 
HebiRobotModelElementTypeJoint 
HebiRobotModelElementTypeLink 
HebiRobotModelElementTypeRigidBody 
HebiRobotModelElementTypeEndEffector 

Definition at line 338 of file hebi.h.

Enum Types.

API call status codes

Enumerator
HebiStatusSuccess 
HebiStatusInvalidArgument 

Success; no failures occurred.

HebiStatusBufferTooSmall 

An invalid argument was supplied to the routine (e.g. null pointer)

HebiStatusValueNotSet 

A buffer supplied to the routine was too small (normally determined by a size parameter)

HebiStatusFailure 

Returned when an accessor function attempts to retrieve a field which is not set.

HebiStatusArgumentOutOfRange 

Generic code for failure; this is generally used for an internal or unknown failure.

Definition at line 23 of file hebi.h.

Function Documentation

void hebiCleanup ( void  )

Frees all resources created by the library. Note: any calls to the HEBI library functions after this will result in undefined behavior!

void hebiCommandGetMetadata ( HebiCommandMetadata metadata)

Retrieve the static metadata for all Command instances

void hebiCommandGetReference ( HebiCommandPtr  command,
HebiCommandRef ref 
)

Retrieves a reference of the Command instance for direct access of fields

HebiStatusCode hebiCommandGetString ( HebiCommandPtr  command,
HebiCommandStringField  field,
char *  buffer,
size_t *  length 
)

Command API.

Retrieves the value and/or the length of the string field.

If this string is not set in the Command, HebiStatusValueNotSet is returned (regardless of any other arguments) and any pointer values are unchanged.

If 'length' is NULL, returns HebiStatusValueSuccess if this string value is set (the value of 'buffer' is ignored in this case).

If 'buffer' is not NULL, then 'length' should be non-NULL and set to the number of characters that can be written to 'buffer'. If the specified string is set, and it can fit into the provided buffer (including a null terminating character), then the string is copied to 'buffer' and HebiStatusSuccess is returned. If the buffer is not large enough to contain the string, then HebiStatusBufferTooSmall is returned.

If 'buffer' is NULL, returns HebiStatusValueSuccess if this string value is set.

If 'length' is not NULL (regardless of the state of 'buffer'), it is set to the necessary size to hold the specified string value (including the null terminating character).

Note - assumes ASCII string encoding.

void hebiCommandSetString ( HebiCommandPtr  command,
HebiCommandStringField  field,
const char *  buffer,
const size_t *  length 
)

Sets the given string to the value given in the buffer (if given). If any of the provided pointers are null, the field is cleared.

If not NULL, 'length' should be set to the length of the c-style string in 'buffer', without including the terminating null character. The data in 'buffer' does not need to be null terminated.

Note - assumes ASCII string encoding.

HebiLookupEntryListPtr hebiCreateLookupEntryList ( HebiLookupPtr  lookup)

Return a snapshot of the contents of the module registry – i.e., which modules have been found by the lookup.

Parameters
lookupA valid HebiLookup object.
void hebiFeedbackGetMetadata ( HebiFeedbackMetadata metadata)

Retrieve the static metadata for all Feedback instances

void hebiFeedbackGetReference ( HebiFeedbackPtr  feedback,
HebiFeedbackRef ref 
)

Feedback API.

Retrieves a reference of the Feedback instance for direct access of fields

HebiStatusCode hebiGetLibraryVersion ( int32_t *  major,
int32_t *  minor,
int32_t *  revision 
)

Get the version of the library.

All parameters must not be NULL.

Returns
HebiStatusSuccess on success, otherwise HebiStatusInvalidArgument if a parameter is NULL.
void hebiGroupClearFeedbackHandlers ( HebiGroupPtr  group)

Removes all feedback handling functions from the queue to be called on receipt of group feedback.

Parameters
groupThe group to which the handlers are attached.
void hebiGroupCommandClear ( HebiGroupCommandPtr  command)

Clears all data in the GroupCommand object.

HebiStatusCode hebiGroupCommandCopy ( HebiGroupCommandPtr  dest,
HebiGroupCommandPtr  src 
)

Clears the dest GroupCommand object, and copies all data from the src GroupCommand object to dest.

The GroupCommand objects should have identical state after this.

Parameters
destThe GroupCommandPtr to copy data into. The previous state of this object will be cleared.
srcThe GroupCommandPtr to copy data from. This object will remain unchanged.
Returns
HebiStatusSuccess if the operation succeeds; HebiStatusInvalidArgument if the sizes of the two messages do not match; HebiStatusError for any other error.
HebiGroupCommandPtr hebiGroupCommandCreate ( size_t  size)

Creates a GroupCommand for a group with the specified number of modules.

Parameters
sizeThe number of modules in the group.
Returns
A pointer to a new GroupCommand object. This must be released with hebiGroupCommandRelease(HebiGroupCommandPtr).
HebiCommandPtr hebiGroupCommandGetModuleCommand ( HebiGroupCommandPtr  command,
size_t  module_index 
)

Get an individual command for a particular module at index module_index.

Parameters
module_indexThe index to retrieve the module command; must be from 0 to the size - 1, inclusive, or results in undefined behavior.
Returns
The command corresponding to the module at index module_index.
size_t hebiGroupCommandGetSize ( HebiGroupCommandPtr  command)

Return the number of modules in this group Command.

Returns
The number of module commands in this group command.
HebiStatusCode hebiGroupCommandReadGains ( HebiGroupCommandPtr  command,
const char *  file 
)

Import gains from a file into a GroupCommand object.

Parameters
fileA null-terminated string that gives the path/filename of the gains XML file. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could note be opened or read. In particular:
  • if the file was successfully read, but the number of modules in the file is not equal to '1' or the size of the group, returns HebiStatusInvalidArgument.
  • if file is NULL, returns HebiStatusInvalidArgument.
  • for other parsing errors, may return HebiStatusFailure or HebiStatusInvalidArgument.
HebiStatusCode hebiGroupCommandReadSafetyParameters ( HebiGroupCommandPtr  command,
const char *  file 
)

Import safety parameters from a file into a GroupCommand object.

Parameters
fileA null-terminated string that gives the path/filename of the safety parameters XML file. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could note be opened or read. In particular:
  • if the file was successfully read, but the number of modules in the file is not equal to '1' or the size of the group, returns HebiStatusInvalidArgument.
  • if file is NULL, returns HebiStatusInvalidArgument.
  • for other parsing errors, may return HebiStatusFailure or HebiStatusInvalidArgument.
void hebiGroupCommandRelease ( HebiGroupCommandPtr  command)

Frees resources created by the GroupCommand object.

The GroupCommandPtr must not be used after this function is called.

HebiStatusCode hebiGroupCommandWriteGains ( HebiGroupCommandPtr  command,
const char *  file 
)

Export gains from a GroupCommand object into a file.

Parameters
fileA null-terminated string that gives the path/filename to save the gains XML file at. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could not be written to or an internal error occurs.
HebiStatusCode hebiGroupCommandWriteSafetyParameters ( HebiGroupCommandPtr  command,
const char *  file 
)

Export safety parameters from a GroupCommand object into a file.

Parameters
fileA null-terminated string that gives the path/filename to which the safety parameters will be saved. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could not be written to or an internal error occurs.
HebiGroupPtr hebiGroupCreateConnectedFromMac ( HebiLookupPtr  lookup,
const HebiMacAddress address,
int32_t  timeout_ms 
)

Create a group with all modules connected to module with the given MAC address.

Modules in group will be ordered depth-first, starting with the most proximal module.

Blocking call which waits to get a pointer to a Group object with the given parameters. Times out after timeout_msec milliseconds. Must be released when use is complete via the hebiGroupRelease function.

Parameters
lookupA valid HebiLookup object.
addressPointer to a HebiMacAddress structure representing the physical mac address of the given module (serves as unique id). Must not be NULL.
timeout_msTimeout in milliseconds. A value of -1 blocks until a module is found, and a value of 0 returns immediately if no module with that address is currently known by the Lookup class.
Returns
NULL if matching group not found in allotted time; pointer to newly allocated group object otherwise.
HebiGroupPtr hebiGroupCreateConnectedFromName ( HebiLookupPtr  lookup,
const char *  family,
const char *  name,
int32_t  timeout_ms 
)

Create a group with all modules connected to module with the given name and family.

Modules in group will be ordered depth-first, starting with the most proximal module.

Blocking call which waits to get a pointer to a Group object with the given parameters. Times out after timeout_msec milliseconds. Must be released when use is complete via the hebiGroupRelease function.

Parameters
lookupA valid HebiLookup object.
nameThe given name of the key module, as viewable in the HEBI GUI. Must be a null-terminated string, and must not be NULL.
familyThe given family of the key module, as viewable in the HEBI GUI. Must be a null-terminated string, and must not be NULL.
timeout_msTimeout in milliseconds. A value of -1 blocks until a module is found, and a value of 0 returns immediately if no module with that address is currently known by the Lookup class.
Returns
NULL if matching group not found in allotted time; pointer to newly allocated group object otherwise.
HebiGroupPtr hebiGroupCreateFromFamily ( HebiLookupPtr  lookup,
const char *  family,
int32_t  timeout_ms 
)

Create a group with all modules known to the lookup with the given family.

Group contains all modules with the given family, regardless of name.

Blocking call which waits to get a pointer to a Group object with the given parameters. Times out after timeout_msec milliseconds. Must be released when use is complete via the hebiGroupRelease function.

Parameters
lookupA valid HebiLookup object.
familyThe given family of the modules, as viewable in the HEBI GUI. Must be a null-terminated string, and must not be NULL.
timeout_msTimeout in milliseconds. A value of -1 blocks until a module is found, and a value of 0 returns immediately if no module with that address is currently known by the Lookup class.
Returns
NULL if matching group not found in allotted time; pointer to newly allocated group object otherwise.
HebiGroupPtr hebiGroupCreateFromMacs ( HebiLookupPtr  lookup,
const HebiMacAddress *const *  addresses,
size_t  num_addresses,
int32_t  timeout_ms 
)

Create a group of modules with the given MAC addresses.

If any given modules are not found, no group is created.

Blocking call which waits to get a pointer to a Group object with the given parameters. Times out after timeout_msec milliseconds. Must be released when use is complete via the hebiGroupRelease function.

Parameters
lookupA valid HebiLookup object.
addressesAn array of pointers to physical mac addresses of the given modules. Length of the array must equal num_addresses. This param must not be NULL, and each element of this list must not be NULL.
num_addressesLength of the addresses array of pointers (number of pointers in the array, not cumulative size of objects they point to).
timeout_msTimeout in milliseconds. A value of -1 blocks until a module is found, and a value of 0 returns immediately if no module with that address is currently known by the Lookup class.
Returns
NULL if matching group not found in allotted time; pointer to newly allocated group object otherwise.
HebiGroupPtr hebiGroupCreateFromNames ( HebiLookupPtr  lookup,
const char *const *  families,
size_t  num_families,
const char *const *  names,
size_t  num_names,
int32_t  timeout_ms 
)

Create a group with modules matching the given names and families.

If only one family is given, it is used for all modules. Otherwise, number of names and families must match. If any given modules are not found, no group is created.

Blocking call which waits to get a pointer to a Group object with the given parameters. Times out after timeout_msec milliseconds. Must be released when use is complete via the hebiGroupRelease function.

Parameters
lookupA valid HebiLookup object.
familiesThe given families of the modules, as viewable in the HEBI GUI. Must be a list of pointers to null-terminated strings. The number of pointers must match the num_families parameter. Note that a single string (with corresponding value of num_families == 1) will be used with each name in the names list. This param must not be NULL, and each element of this list must not be NULL.
num_familiesThe number of pointers to null-terminated strings given by the families parameter. Note that this must either be 1, or be equal to num_names.
namesThe given names of the modules, as viewable in the HEBI GUI. Must be a list of pointers to null-terminated strings. The number of pointers must match the num_names parameter. This param must not be NULL, and each element of this list must not be NULL.
num_namesThe number of pointers to null-terminated strings given by the names parameter.
timeout_msTimeout in milliseconds. A value of -1 blocks until a module is found, and a value of 0 returns immediately if no module with that address is currently known by the Lookup class.
Returns
NULL if matching group not found in allotted time; pointer to newly allocated group object otherwise.
HebiGroupPtr hebiGroupCreateImitation ( size_t  size)

Group API.

Creates an "imitation" group with the specified number of modules.

The imitation group is useful for testing the API, as it acts like a Group would in most cases, but is not backed by hardware. Commands that are sent to the imitation group are returned as feedback, using the standard feedback request methods.

Note that standard groups are created through the HebiLookup objects.

Parameters
sizeThe number of modules in the group.
Returns
An imitation group that returns commanded values as feedback.
void hebiGroupFeedbackClear ( HebiGroupFeedbackPtr  feedback)

Clears all data in the GroupFeedback object.

HebiStatusCode hebiGroupFeedbackCopy ( HebiGroupFeedbackPtr  dest,
HebiGroupFeedbackPtr  src 
)

Clears the dest GroupFeedback object, and copies all data from the src GroupFeedback object to dest.

The GroupFeedback objects should have identical state after this.

Parameters
destThe GroupFeedbackPtr to copy data into. The previous state of this object will be cleared.
srcThe GroupFeedbackPtr to copy data from. This object will remain unchanged.
Returns
HebiStatusSuccess if the operation succeeds; HebiStatusInvalidArgument if the sizes of the two messages do not match; HebiStatusError for any other error.
HebiGroupFeedbackPtr hebiGroupFeedbackCreate ( size_t  size)

Creates a GroupFeedback for a group with the specified number of modules.

Parameters
sizeThe number of modules in the group.
Returns
A pointer to a new GroupFeedback object. This must be released with hebiGroupFeedbackRelease(HebiGroupFeedbackPtr).
HebiFeedbackPtr hebiGroupFeedbackGetModuleFeedback ( HebiGroupFeedbackPtr  feedback,
size_t  module_index 
)

Get an individual feedback for a particular module at index module_index.

Parameters
module_indexThe index to retrieve the module feedback; must be from 0 to the size - 1, inclusive, or results in undefined behavior.
Returns
The feedback corresponding to the module at index module_index.
size_t hebiGroupFeedbackGetSize ( HebiGroupFeedbackPtr  feedback)

Return the number of modules in this group Feedback.

Returns
The number of module feedbacks in this group feedback.
void hebiGroupFeedbackRelease ( HebiGroupFeedbackPtr  feedback)

Frees resources created by the GroupFeedback object.

The GroupFeedbackPtr must not be used after this function is called.

int32_t hebiGroupGetCommandLifetime ( HebiGroupPtr  group)

Returns the current command lifetime, in milliseconds.

Parameters
groupWhich group is being queried.
Returns
The current command lifetime, in milliseconds. A value of '0' indicates that commands remain active until the next command is received.
float hebiGroupGetFeedbackFrequencyHz ( HebiGroupPtr  group)

Returns the current feedback request loop frequency (in Hz).

Parameters
groupWhich group is being queried.
Returns
The current feedback request loop frequency (in Hz).
HebiStatusCode hebiGroupGetNextFeedback ( HebiGroupPtr  group,
HebiGroupFeedbackPtr  feedback,
int32_t  timeout_ms 
)

Returns the most recently stored feedback from a sent feedback request, or returns the next one received (up to the requested timeout).

Note that a feedback request can be sent either with the hebiGroupSendFeedbackRequest function, or by setting a background feedback frequency with hebiGroupSetFeedbackFrequencyHz.

Warning: other data in the provided 'Feedback' object is erased!

Parameters
groupThe group to return feedback from.
feedbackOn success, the feedback read from the group are written into this structure.
timeout_msIndicates how many milliseconds to wait for feedback. For typical networks, '15' ms is a value that can be reasonably expected to allow for a round trip transmission after the last 'send feedback request' call.
Returns
HebiStatusSuccess if feedback was returned, or a failure code if not (i.e., connection error or timeout waiting for response).
size_t hebiGroupGetSize ( HebiGroupPtr  group)

Returns the number of modules in a group.

Parameters
groupThe group to send this command to.
Returns
the number of modules in the group.
void hebiGroupInfoClear ( HebiGroupInfoPtr  info)

Clears all data in the GroupInfo object.

HebiStatusCode hebiGroupInfoCopy ( HebiGroupInfoPtr  dest,
HebiGroupInfoPtr  src 
)

Clears the dest GroupInfo object, and copies all data from the src GroupInfo object to dest.

The GroupInfo objects should have identical state after this.

Parameters
destThe GroupInfoPtr to copy data into. The previous state of this object will be cleared.
srcThe GroupInfoPtr to copy data from. This object will remain unchanged.
Returns
HebiStatusSuccess if the operation succeeds; HebiStatusInvalidArgument if the sizes of the two messages do not match; HebiStatusError for any other error.
HebiGroupInfoPtr hebiGroupInfoCreate ( size_t  size)

Creates a GroupInfo for a group with the specified number of modules.

Parameters
sizeThe number of modules in the group.
Returns
A pointer to a new GroupInfo object. This must be released with hebiGroupInfoRelease(HebiGroupInfoPtr).
HebiInfoPtr hebiGroupInfoGetModuleInfo ( HebiGroupInfoPtr  info,
size_t  module_index 
)

Get an individual info for a particular module at index module_index.

Parameters
module_indexThe index to retrieve the module info; must be from 0 to the size - 1, inclusive, or results in undefined behavior.
Returns
The info corresponding to the module at index module_index.
size_t hebiGroupInfoGetSize ( HebiGroupInfoPtr  info)

Return the number of modules in this group Info.

Returns
The number of module infos in this group info.
void hebiGroupInfoRelease ( HebiGroupInfoPtr  info)

Frees resources created by the GroupInfo object.

The GroupInfoPtr must not be used after this function is called.

HebiStatusCode hebiGroupInfoWriteGains ( HebiGroupInfoPtr  info,
const char *  file 
)

Export gains from a GroupInfo object into a file.

Parameters
fileA null-terminated string that gives the path/filename to save the gains XML file at. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could not be written to or an internal error occurs.
HebiStatusCode hebiGroupInfoWriteSafetyParameters ( HebiGroupInfoPtr  info,
const char *  file 
)

Export safety parameters from a GroupInfo object into a file.

Parameters
fileA null-terminated string that gives the path/filename to which the safety parameters will be saved. Must not be NULL.
Returns
HebiStatusSuccess on success, or a failure code if the file could not be written to or an internal error occurs.
HebiStatusCode hebiGroupRegisterFeedbackHandler ( HebiGroupPtr  group,
GroupFeedbackHandlerFunction  handler,
void *  user_data 
)

Add a function that is called whenever feedback is returned from the group.

Parameters
groupThe group to attach this handler to.
handlerA feedback handling function called whenever feedback is received from the group.
user_dataA pointer to user data which will be returned as the second callback argument. This pointer can be NULL if desired.
void hebiGroupRelease ( HebiGroupPtr  group)

Release resources for a given group; group should not be used after this call.

Parameters
groupA valid HebiGroup object.
HebiStatusCode hebiGroupRequestInfo ( HebiGroupPtr  group,
HebiGroupInfoPtr  info,
int32_t  timeout_ms 
)

Requests info from the group, and writes it to the provided info object.

Warning: if successful, other data in the provided 'Info' object is erased!

Parameters
groupThe group to send this command to.
infoOn success, the info read from the group is written into this structure.
timeout_msIndicates how many milliseconds to wait for a response after sending a packet. For typical networks, '15' ms is a value that can be reasonably expected to encompass the time required for a round-trip transmission.
Returns
HebiStatusSuccess if info was received, or a failure code if not (i.e., connection error or timeout waiting for response).
HebiStatusCode hebiGroupSendCommand ( HebiGroupPtr  group,
HebiGroupCommandPtr  command 
)

Sends a command to the given group without requesting an acknowledgement.

Appropriate for high-frequency applications.

Parameters
groupThe group to send this command to.
commandThe HebiGroupCommand object containing information to be sent to the group.
Returns
HebiStatusSuccess if the command was successfully sent, otherwise a failure code.
HebiStatusCode hebiGroupSendCommandWithAcknowledgement ( HebiGroupPtr  group,
HebiGroupCommandPtr  command,
int32_t  timeout_ms 
)

Sends a command to the given group, requesting an acknowledgement of transmission to be sent back.

Note: A non-HebiStatusSuccess return does not indicate a specific failure, and may result from an error while sending or simply a timeout/dropped response packet after a successful transmission.

Parameters
groupThe group to send this command to.
commandThe HebiGroupCommand object containing information to be sent to the group.
timeout_msIndicates how many milliseconds to wait for a response after sending a packet. For typical networks, '15' ms is a value that can be reasonably expected to encompass the time required for a round-trip transmission.
Returns
HebiStatusSuccess if an acknowledgement was successfully received (guaranteeing the group received this command), or a failure code for an error otherwise.
HebiStatusCode hebiGroupSendFeedbackRequest ( HebiGroupPtr  group)

Requests feedback from the group.

Sends a background request to the modules in the group; if/when all modules return feedback, any associated handler functions are called. This returned feedback is also stored to be returned by the next call to hebiGroupGetNextFeedback (any previously returned data is discarded).

Parameters
groupThe group to return feedback from.
Returns
HebiStatusSuccess if request was successfully sent, or a failure code if not (i.e., connection error).
HebiStatusCode hebiGroupSetCommandLifetime ( HebiGroupPtr  group,
int32_t  lifetime_ms 
)

Sets the command lifetime for the group, in milliseconds.

The command lifetime is the duration for which a sent command remains active. If the hardware does not receive further commands within the specified time frame, all local controllers get deactivated. This is a safety feature to mitigate the risk of accidents in case programs get interrupted in an unsafe state, e.g., on program exceptions or during a network fault.

Additionally, supporting hardware does not accept commands from any other sources during the lifetime of a command. This mitigates the risk of other users accidentally sending conflicting targets from, e.g., the GUI.

Parameters
groupWhich group the command lifetime is being set for.
lifetime_msThe number of milliseconds which the command 'lives' for. Setting a value less than or equal to '0' disables command lifetime. When disabled, the hardware will continue to execute the last sent command. Setting a value above the accepted maximum will set the lockout to the maximum value.
Returns
HebiStatusSuccess if command lifetime successfully set, or a failure code if value was outside of accepted range (higher than supported maximum or negative).
HebiStatusCode hebiGroupSetFeedbackFrequencyHz ( HebiGroupPtr  group,
float  frequency 
)

Sets the feedback request loop frequency (in Hz).

The group is queried for feedback in a background thread at this frequency, and any added callbacks are called from this background thread.

Parameters
groupWhich group this frequency set is for.
frequencyThe feedback request loop frequency (in Hz). A value of '0' is the default, and disables the feedback request thread.
Returns
HebiStatusSuccess if feedback frequency successfully set, or a failure code if value was outside of accepted range (higher than supported maximum, NaN or negative).
HebiStatusCode hebiGroupStartLog ( HebiGroupPtr  group,
const char *  dir,
const char *  file,
HebiStringPtr ret 
)

Starts logging data to a file.

Note: If a non null parameter is used for the returned string, and it is populated with a non null reference to a string, it must be explicitly freed using hebiStringRelease(HebiStringPtr str)

Parameters
dirThe relative or absolute path to the directory in which to log. To use the current directory, pass in a null pointer
fileThe optional file name. If this is null, a name will be created using the time at the moment which this function was invoked.
retThe optional pointer to a string reference. If this is null, this is ignored. Otherwise, a reference to a string is populated with the path and name of the log file created. If this function does not return HebiStatusSuccess and this parameter is not null, the value at this pointer is set to null.
Returns
HebiStatusSuccess if successfully started a log, a failure code otherwise.
HebiLogFilePtr hebiGroupStopLog ( HebiGroupPtr  group)

Stops logging data to a file.

Note: This function allocates a log file structure on the heap, so make sure to release the pointer returned by this function by calling hebiLogFileRelease(HebiLogFilePtr ptr)

Parameters
groupThe group that is logging.
Returns
a log file instance on success, otherwise a null pointer.
HebiStatusCode hebiIKAddConstraintJointAngles ( HebiIKPtr  ik,
double  weight,
size_t  num_joints,
const double *  min_positions,
const double *  max_positions 
)

Define joint angle constraints.

NaN or +/- infinity can be set on particular joints to ignore joint limits. Currently, the joint limit constraints are two-sided, which means that any joint must either have both min/max set to NaN/inf, or have neither.

Parameters
weightThe weight of this constraint relative to any other objective functions (this constraint is multiplied by this weight before passing to the optimizer). Defaults to 1.0.
num_jointsThe number of elements in the min_positions and max_positions arrays.
min_positionsAn array with the minimum joint limit for each joint, or NaN or inf if unlimited. Must have num_joints elements, and must not be NULL.
max_positionsAn array with the maximum joint limit for each joint, or NaN or inf if unlimited. Must have num_joints elements, and must not be NULL.
Returns
HebiStatusSuccess on success; otherwise a failure code.
HebiStatusCode hebiIKAddObjectiveCustom ( HebiIKPtr  ik,
double  weight,
size_t  num_errors,
void(*)(void *user_data, size_t num_positions, const double *positions, double *errors)  err_fnc,
void *  user_data 
)

Add a custom objective function to be minimized by the IK solver.

The given callback is called at each iteration of the local optimization, and is expected to fill in each entry of the "errors" vector.

Parameters
weightThe weight of this constraint relative to any other objective functions (this constraint is multiplied by this weight before passing to the optimizer). Defaults to 1.0.
num_errorsThe number of independent error values that this objective returns.
err_fncThe callback function which is used to compute the errors. The arguments are: user_data - The pointer passed in when adding a custom objective; this can be anything (even NULL), and is designed to allow the user to easily access information in the callback. num_positions - the number of elements in the 'positions' array positions - an array of the joint positions at this point in the optimization; of length 'num_positions' errors - an array of error values which must be filled in by the callback; of length 'num_errors'.
HebiStatusCode hebiIKAddObjectiveEndEffectorPosition ( HebiIKPtr  ik,
double  weight,
size_t  end_effector_index,
double  x,
double  y,
double  z 
)

Add an objective that optimizes for the end effector output frame origin to be at the given (x, y, z) point.

If an end effector position objective already exists, this will replace it.

Parameters
weightThe weight of this objective relative to any other objective functions (this objective is multiplied by this weight before passing to the optimizer). Defaults to 1.0.
xThe desired x position of the end effector frame. 'NaN' can be passed to ignore this variable.
yThe desired y position of the end effector frame. 'NaN' can be passed to ignore this variable.
zThe desired z position of the end effector frame. 'NaN' can be passed to ignore this variable.
Returns
HebiStatusSuccess on success, otherwise a failure code (e.g. incompatible with existing objectives, or all components are set to 'NaN')
HebiStatusCode hebiIKAddObjectiveEndEffectorSO3 ( HebiIKPtr  ik,
double  weight,
size_t  end_effector_index,
const double *  matrix,
HebiMatrixOrdering  ordering 
)

Add an objective that optimizes for the end effector output frame orientation to be given by the 3x3 rotation matrix. Note that this is incompatible with the end effector tip axis objective.

If an end effector orientation objective already exists, this will replace it.

Parameters
weightThe weight of this objective relative to any other objective functions (this objective is multiplied by this weight before passing to the optimizer). Defaults to 1.0.
matrixThe desired orientation of the end effector frame, as a 3x3 rotation matrix. Must not be NULL.
orderingHow the data in matrix should be serialized.
Returns
HebiStatusSuccess on success, otherwise a failure code (e.g. incompatible with existing objectives, or rotation matrix is invalid or null.)
HebiStatusCode hebiIKAddObjectiveEndEffectorTipAxis ( HebiIKPtr  ik,
double  weight,
size_t  end_effector_index,
double  x,
double  y,
double  z 
)

Add an objective that points the end effector's z axis in a given direction. Note that this is incompatible with the end effector S03 orientation objective.

If an end effector orientation objective already exists, this will replace it.

Parameters
weightThe weight of this objective relative to any other objective functions (this objective is multiplied by this weight before passing to the optimizer). Defaults to 1.0.
xThe desired end effector z axis, projected onto the x axis.
yThe desired end effector z axis, projected onto the y axis.
zThe desired end effector z axis, projected onto the z axis.
Returns
HebiStatusSuccess on success, otherwise a failure code (e.g. incompatible with existing objectives, or rotation matrix is invalid.)
void hebiIKClearAll ( HebiIKPtr  ik)

Clears the objectives and constraints from this IK object, along with any modifications to the default algorithm parameters.

HebiIKPtr hebiIKCreate ( void  )

Inverse Kinematics API.

Creates an IK (inverse kinematics) object that allows for solving for joint angles/positions given objectives and constraints.

This optimization is completed using a specified forward kinematics object. The objectives and constraints are stored with this object.

void hebiIKRelease ( HebiIKPtr  ik)

Frees resources created by this inverse kinematics object.

IK object should no longer be used after this function is called!

Parameters
ikA valid HEBI inverse kinematics object.
HebiStatusCode hebiIKSolve ( HebiIKPtr  ik,
HebiRobotModelPtr  model,
const double *  initial_positions,
double *  ik_solution,
void *  result_info 
)

Solves for an inverse kinematics solution that moves the end effector to a given point.

Note: multiple "hebiIKSolve" calls can be made using the same IK object.

Parameters
ikA valid HEBI IK object.
modelA valid HEBI RobotModel object.
initial_positionsThe seed positions/angles (in SI units of meters or radians) to start the IK search from; equal in length to the number of DoFs of the kinematic tree. Must not be NULL.
ik_solutionAllocated array of doubles equal in length to the number of DoFs of the kinematic tree; the function will fill in this array with the IK solution (in SI units of meters or radians). Must not be NULL.
result_infoReserved for future use (will enable more information about output of optimization such as success/failure, function error, etc). This should currently be set to NULL.
Returns
HebiStatusSuccess on success, other values on failure (e.g., no objectives given or dimension mismatch between kinematics object and stored objectives).
void hebiInfoGetMetadata ( HebiInfoMetadata metadata)

Retrieve the static metadata for all Info instances

void hebiInfoGetReference ( HebiInfoPtr  info,
HebiInfoRef ref 
)

Retrieves a reference of the Info instance for direct access of fields

HebiStatusCode hebiInfoGetString ( HebiInfoPtr  info,
HebiInfoStringField  field,
char *  buffer,
size_t *  length 
)

Info API.

Retrieves the value and/or the length of the string field.

If this string is not set in the Info, HebiStatusValueNotSet is returned (regardless of any other arguments) and any pointer values are unchanged.

If 'length' is NULL, returns HebiStatusValueSuccess if this string value is set (the value of 'buffer' is ignored in this case).

If 'buffer' is not NULL, then 'length' should be non-NULL and set to the number of characters that can be written to 'buffer'. If the specified string is set, and it can fit into the provided buffer (including a null terminating character), then the string is copied to 'buffer' and HebiStatusSuccess is returned. If the buffer is not large enough to contain the string, then HebiStatusBufferTooSmall is returned.

If 'buffer' is NULL, returns HebiStatusValueSuccess if this string value is set.

If 'length' is not NULL (regardless of the state of 'buffer'), it is set to the necessary size to hold the specified string value (including the null terminating character).

Note - assumes ASCII string encoding.

HebiStatusCode hebiLogFileGetFileName ( HebiLogFilePtr  log_file,
char *  buffer,
size_t *  length 
)

Copy the path and name of the log file into a buffer.

To only query the length of the string, provide a null pointer for the buffer parameter. If the provided buffer is not large enough to hold the string (the length determined by the length parameter), the call will fail. Note that the size of this buffer includes the null terminating character.

Parameters
bufferPointer to a buffer into which the string will be written. This can be null, in which case this function will write the size of the string (including null character) into length.
lengthPointer to the length of the input buffer. This parameter must not be null, or this function will return HebiStatusInvalidArgument
Returns
HebiStatusSuccess on success, HebiStatusBufferTooSmall if the value referenced by length is smaller than the string (including the character), or HebiStatusInvalidArgument if length pointer is null
HebiStatusCode hebiLogFileGetNextFeedback ( HebiLogFilePtr  log_file,
HebiGroupFeedbackPtr  field 
)

Retrieve the next group feedback from the opened log file.

Parameters
feedbackthe feedback object into which the contents will be copied
Returns
HebiStatusSuccess on success, otherwise HebiStatusFailure
size_t hebiLogFileGetNumberOfModules ( HebiLogFilePtr  log_file)

Retrieve the number of modules in the group represented by an opened log file.

Returns
The number of modules in the group
HebiLogFilePtr hebiLogFileOpen ( const char *  file)

Opens an existing log file.

Note: It is up to the user to check if the returned pointer is null. If the file does not exist, or if the file is not a valid log file, this function returns null.

If this function returns a pointer, you must call hebiLogFileRelease(HebiLogFilePtr) to release the allocated memory.

Parameters
filethe directory and path of the file to open. Must not be NULL.
Returns
a pointer to the file; null if the file could not be opened
void hebiLogFileRelease ( HebiLogFilePtr  log_file)

Logging API.

Releases a log file instance

HebiLookupPtr hebiLookupCreate ( const char *const *  ifaces,
size_t  ifaces_length 
)

Lookup API.

Create a Lookup instance.

Lookup created by this function must be released with 'hebiLookupRelease' when no longer needed.

Note that this call invokes a background thread to query the network for modules at regular intervals.

Parameters
ifacesA buffer of c-style strings representing the interfaces to which to restrict the module discovery. The contents of the strings must be in human readable order (e.g., "192.168.1.0"). If this parameter is null, then all interfaces besides the loopback interface are used to discover modules.
ifaces_lengththe length of the buffer ifaces. This must be zero if ifaces is null.
HebiStatusCode hebiLookupEntryListGetFamily ( HebiLookupEntryListPtr  lookup_list,
size_t  index,
char *  buffer,
size_t *  length 
)

Gets the family of the given entry in the lookup entry list. Must be a valid index.

To only query the length of the string, provide a null pointer for the buffer parameter. If the provided buffer is not large enough to hold the string (the length determined by the length parameter), the call will fail. Note that the size of this buffer includes the null terminating character.

Note - assumes ASCII string encoding.

Parameters
lookup_listA valid HebiLookupEntryList object.
indexThe entry index that is being queried.
bufferAn allocated buffer of length 'length'.
lengththe length of the provided buffer. After calling this function, the value dereferenced will be updated with the length of the string plus the null character. This argument must not be NULL.
Returns
HebiStatusSuccess on success, HebiStatusBufferTooSmall if the provided buffer is too small, or HebiStatusInvalidArgument if the length parameter is null
HebiStatusCode hebiLookupEntryListGetMacAddress ( HebiLookupEntryListPtr  lookup_list,
size_t  index,
HebiMacAddress mac_address 
)
Parameters
lookup_listA valid HebiLookupEntryList object.
indexThe entry index that is being queried.
mac_addressA pointer to an allocated HebiMacAddress structure that the function will update with the mac address of the given entry.
Returns
HebiStatusSuccess on success, HebiStatusInvalidArgument if the mac_address parameter is null, or HebiStatusArgumentOutOfRange if there is no entry with the given index.
HebiStatusCode hebiLookupEntryListGetName ( HebiLookupEntryListPtr  lookup_list,
size_t  index,
char *  buffer,
size_t *  length 
)

Gets the name of the given entry in the lookup entry list. Must be a valid index.

To only query the length of the string, provide a null pointer for the buffer parameter. If the provided buffer is not large enough to hold the string (the length determined by the length parameter), the call will fail. Note that the size of this buffer includes the null terminating character.

Note - assumes ASCII string encoding.

Parameters
lookup_listA valid HebiLookupEntryList object.
indexThe entry index that is being queried.
bufferAn allocated buffer of length 'length'
lengththe length of the provided buffer. After calling this function, the value dereferenced will be updated with the length of the string plus the null character. This argument must not be NULL.
Returns
HebiStatusSuccess on success, HebiStatusBufferTooSmall if the provided buffer is too small, or HebiStatusInvalidArgument if the length parameter is null
size_t hebiLookupEntryListGetSize ( HebiLookupEntryListPtr  lookup_list)

Gets the number of entries in the lookup entry list.

Parameters
lookup_listA valid HebiLookupEntryList object.
void hebiLookupEntryListRelease ( HebiLookupEntryListPtr  lookup_list)

Release resources for a given lookup entry list; list should not be used after this call.

Parameters
lookup_listA valid HebiLookupEntryList object.
double hebiLookupGetLookupFrequencyHz ( HebiLookupPtr  lookup)

gets the lookup request rate [Hz]

void hebiLookupRelease ( HebiLookupPtr  lookup)

Frees resources created by the lookup object.

Lookup object should no longer be used after this function is called! Note that background query thread is stopped by this function.

HebiStatusCode hebiLookupSetLookupFrequencyHz ( HebiLookupPtr  lookup,
double  frequency 
)

sets the lookup request rate [Hz]

Returns
HebiStatusSuccess on success, HebiStatusInvalidArgument on negative or non-finite frequency
HebiStatusCode hebiRobotModelAdd ( HebiRobotModelPtr  robot_model,
HebiRobotModelElementPtr  existing_element,
size_t  output_index,
HebiRobotModelElementPtr  new_element 
)

Add an element to a parent element connected to a robot model object.

After the addition, the robot model object manages the resources of the added element. On failure, the passed in 'new_element' argument is properly disposed by this function.

The added element is assumed to connect to an available output on a element that has already been attached to the kinematic tree. That element should be passed in as 'existing_element', and the index of the requested output on that element should be given as 'output_index'.

To attach the initial element to the robot model object, use NULL for the 'existing_element' argument.

NOTE: currently, only a single output is supported for each element (e.g., a kinematic chain), and so the 'existing_element' and 'output_index' parameters are not checked; this will be changed in an upcoming minor release so do not rely on this behavior!

Parameters
robot_modelA valid HEBI RobotModel object.
existing_elementThe parent element which the element is added to (or NULL to add the initial element to the tree).
output_indexThe index of the requested output on the parent element on which to attach this element.
new_elementThe kinematic element which is added to the tree. Must not be NULL.
combineWhether or not to combine this with the output frame where this is being attached to, essentially "hiding" this existing output frame from returned frames and replacing it with the output from this. Body masses and inertias are also combined. '1' means combine; '0' means do not combine.
Returns
HebiStatusSuccess on success, otherwise HebiStatusFailure (e.g., the parent body's requested output is invalid or already occupied) or HebiStatusInvalidArgument (e.g., 'new_element' is NULL).
HebiRobotModelPtr hebiRobotModelCreate ( void  )

Creates an object to hold a robot model (tree topology). This structure has a single output available at the origin.

RobotModel object created by this function must be released with 'hebiRobotModelRelease' when no longer needed.

HebiRobotModelElementPtr hebiRobotModelElementCreateActuator ( HebiActuatorType  actuator_type)

Creates a robot model element corresponding to a standard HEBI actuator.

Parameters
actuator_typeThe supported actuator type from the HEBI component library, as given by the HebiActuatorType enum.
Returns
NULL if the actuator could not be created; otherwise, pointer to newly allocated element. Must either be added to a robot model object or released via 'hebiRobotModelElementRelease'.
HebiRobotModelElementPtr hebiRobotModelElementCreateBracket ( HebiBracketType  bracket_type)

Creates a rigid body, including mass and static transforms, corresponding to a standard HEBI bracket.

Parameters
bracket_typeThe supported bracket type from the HEBI component library, as given by the HebiBracketType enum.
Returns
NULL if the rigid body could not be created; otherwise, pointer to newly allocated body. Must either be added to a robot model object or released via 'hebiRobotModelElementRelease'.
HebiRobotModelElementPtr hebiRobotModelElementCreateEndEffector ( HebiEndEffectorType  end_effector_type,
const double *  com,
const double *  inertia,
double  mass,
const double *  output_frame,
HebiMatrixOrdering  ordering 
)

Creates a robot model element corresponding to a standard HEBI end effector, or a custom end effector defining static transforms to the given outputs.

Parameters
end_effector_typeThe support end effector type from the HEBI component library, as given by the HebiEndEffectorType enum. If "Custom" is not given, then mass, center of mass, inertia, and output frame are ignored.
comMatrix (4x4 tranform) for the center of mass location, including the frame which the inertia tensor is given in. Only used if end_effector_type is Custom; defaults to (0,0,0) if NULL.
inertiaVector (6 elements, Ixx, Iyy, Izz, Ixy, Ixz, Iyz) of the inertia tensor, in the frame given by the COM. Only used if end_effector_type is Custom; defaults to point mass (all elements 0) if NULL.
massMass (in kg) of the rigid body. Only used if end_effector_type is Custom.
output_frameA matrix (4x4 transform) from the input to the available frames of the end effector. Only used if end_effector_type is Custom; defaults to identity if NULL.
orderingHow the data in com and output_frame should be serialized.
Returns
NULL if the rigid body could not be created; otherwise, pointer to newly allocated body. Must either be added to a robot model object or released via 'hebiRobotModelElementRelease'.
HebiRobotModelElementPtr hebiRobotModelElementCreateJoint ( HebiJointType  joint_type)

RobotModel API.

Creates a one-dof joint about the specified axis.

Parameters
joint_typeWhat the axis of motion for this joint is. The coordinate frame is relative to the previous robot model element this is attached to.
Returns
NULL if the joint could not be created; otherwise, pointer to newly allocated joint. Must either be added to a robot model object or released via hebiRobotModelElementRelease(HebiRobotModelElementPtr).
HebiRobotModelElementPtr hebiRobotModelElementCreateLink ( HebiLinkType  link_type,
HebiLinkInputType  input_type,
HebiLinkOutputType  output_type,
double  extension,
double  twist 
)

Creates a rigid body, including mass and static transforms, corresponding to a standard HEBI link.

Parameters
link_typeThe supported link type from the HEBI component library, as given by the HebiLinkType enum.
input_typeThe supported link input style, as given by the HebiLinkInputType enum.
output_typeThe supported link output style, as given by the HebiLinkOutputType enum.
extensionThe z-axis to z-axis input to output distance, as defined at docs.hebi.us.
twistRotation (in radians) about the extension axis, as defined at docs.hebi.us.
Returns
NULL if the rigid body could not be created; otherwise, pointer to newly allocated body. Must either be added to a robot model object or released via 'hebiRobotModelElementRelease'.
HebiRobotModelElementPtr hebiRobotModelElementCreateRigidBody ( const double *  com,
const double *  inertia,
double  mass,
size_t  num_outputs,
const double *  outputs,
HebiMatrixOrdering  ordering 
)

Creates a rigid body defining static transforms to the given outputs.

Parameters
comMatrix (4x4 tranform) for the center of mass location, including the frame which the inertia tensor is given in. Must not be NULL.
inertiaVector (6 elements, Ixx, Iyy, Izz, Ixy, Ixz, Iyz) of the inertia tensor, in the frame given by the COM. Must not be NULL.
massMass (in kg) of the rigid body.
num_outputsThe number of available outputs.
outputsMatrices (list of n 4x4 transforms) of the transforms from input to the available outputs of the body. Must not be NULL unless num_outputs is 0.
orderingHow the data in com and outputs should be serialized.

NOTE: currently, num_outputs must be 1.

Returns
NULL if the rigid body could not be created; otherwise, pointer to newly allocated body. Must either be added to a robot model object or released via 'hebiRobotModelElementRelease'.
void hebiRobotModelElementRelease ( HebiRobotModelElementPtr  element)

Frees resources created by this element.

Note: Only do this if element has not been added to a robot model object! Once added, the robot model object manages the element's resources.

The element should no longer be used after this function is called.

Parameters
Avalid robot model element object which has not been added to a robot_model object.
HebiStatusCode hebiRobotModelGetBaseFrame ( HebiRobotModelPtr  robot_model,
double *  transform,
HebiMatrixOrdering  ordering 
)

Retreives the fixed transform from the origin to the input of the first added model element.

Parameters
robot_modelA valid HEBI RobotModel object.
transformA allocated 16 element array of doubles; this is filled in by the function with the 4x4 homogeneous transform. Must not be NULL.
orderingHow the data in transform should be serialized.
Returns
HebiStatusSuccess on success, or HebiStatusInvalidArgument if transform is null.
HebiStatusCode hebiRobotModelGetElementMetadata ( HebiRobotModelPtr  model,
size_t  index,
HebiRobotModelElementMetadata output 
)

Retrieves metadata about an element in the robot model. This metadata includes what type of element this is, and per-element-type information.

There is one "metadata" object for each element in the robot model.

Parameters
modelThe robot model pointer to query.
indexThe index of the element in the robot model; this corresponds to the "robot model element" frame with the same index.
outputThis should be a HebiRobotModelElementMetadata structure, and cannot be NULL.
Returns
On success, HebiStatusSuccess will be returned. If "model" or "output" is NULL, then HebiStatusInvalidArgument will be returned. If the index does not exist in this robot model, then HebiStatusArgumentOutOfRange will be returned.
HebiStatusCode hebiRobotModelGetForwardKinematics ( HebiRobotModelPtr  robot_model,
HebiFrameType  frame_type,
const double *  positions,
double *  frames,
HebiMatrixOrdering  ordering 
)

Generates the transforms for the forward kinematics of the given robot model.

The order of the returned frames is in a depth-first tree. As an example, assume an element A has one output, to which element B is connected to. Element B has two outputs; C is attached to the first output and E is attached to the second output. Element D is attached to the only output of element C:

(BASE) A - B(1) - C - D (2) | E

For center of mass frames, the returned frames would be A-B-C-D-E.

For output frames, the returned frames would be A-B(1)-C-D-B(2)-E.

For end effector frames, the returned frames are the outputs of the leaf nodes; here the output of D and E.

Parameters
robot_modelA valid HEBI RobotModel object.
frame_typeWhich type of frame to consider – see HebiFrameType enum.
positionsA vector of joint positions/angles (in SI units of meters or radians) equal in length to the number of DoFs of the robot model. Must not be NULL.
framesAn allocated (16 x number of frames) array of doubles; this is filled in by the function with the 4x4 homogeneous transform of each frame. Note that the number of frames depends on the frame type! Must not be NULL.
orderingHow the data in frames should be serialized.
Returns
HebiStatusSuccess on success, or HebiStatusInvalidArgument if positions or frames are NULL.
const char* hebiRobotModelGetImportError ( )

Retrieve any error string from the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport.

Returns
A null-terminated ASCII character array with a human readable error message describing the failure. This array is valid until the next call to 'hebiRobotModelImport' on this thread; accessing the array after that call is undefined behavior.
const char* hebiRobotModelGetImportWarning ( size_t  warning_index)

Retrieve the 'ith' warning string from the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport.

Parameters
warning_indexThe 0-based index of the warning to retrieve. Must be in the range [0, hebiRobotModelGetImportWarningCount), or NULL will be returned.
Returns
A null-terminated ASCII character array with a human readable error message describing the failure. This array is valid until the next call to 'hebiRobotModelImport' on this thread; accessing the array after that call is undefined behavior.
size_t hebiRobotModelGetImportWarningCount ( )

Retrieve the number of warnings corresponding to the last call to hebiRobotModelImport. This must be called on the same thread as the call to hebiRobotModelImport.

Returns
The number of recoverable warnings encountered when importing the file.
HebiStatusCode hebiRobotModelGetJacobians ( HebiRobotModelPtr  robot_model,
HebiFrameType  frame_type,
const double *  positions,
double *  jacobians,
HebiMatrixOrdering  ordering 
)

Generates the jacobian for each frame in the given kinematic tree.

Parameters
robot_modelA valid HEBI RobotModel object.
frame_typeWhich type of frame to consider – see HebiFrameType enum.
positionsA vector of joint positions/angles (in SI units of meters or radians) equal in length to the number of DoFs of the robot model. Must not be NULL.
jacobiansAn allocated (6 x number of dofs x number of frames) array of doubles; this is filled in by the function with the 6 x number of dofs jacobian for each frame. Note that the number of frames depends on the frame type! Must not be NULL.
orderingHow the data in jacobians should be serialized.
Returns
HebiStatusSuccess on success, or HebiStatusInvalidArgument if positions or jacobians are NULL.
HebiStatusCode hebiRobotModelGetMasses ( HebiRobotModelPtr  robot_model,
double *  masses 
)

Fill in the masses vector with the mass of each body with mass in the kinematic tree, reported in a depth-first ordering.

Parameters
robot_modelA valid HEBI RobotModel object.
massesAn allocated array of doubles, with length equal to the return value of hebiRobotModelGetNumberOfFrames with argument HebiFrameTypeCenterOfMass. Must not be NULL.
Returns
HebiStatusSuccess on success, or HebiStatusInvalidArgument if masses is NULL.
size_t hebiRobotModelGetNumberOfDoFs ( HebiRobotModelPtr  robot_model)

Returns the number of settable degrees of freedom in the kinematic tree. (This is equal to the number of joints added).

Parameters
robot_modelA valid HEBI RobotModel object.
size_t hebiRobotModelGetNumberOfElements ( HebiRobotModelPtr  robot_model)

Returns the number of elements added to the kinematic tree.

Parameters
robot_modelA valid HEBI RobotModel object.
size_t hebiRobotModelGetNumberOfFrames ( HebiRobotModelPtr  robot_model,
HebiFrameType  frame_type 
)

Return the number of frames in the forward kinematic tree of the robot model.

Note that this depends on the type of frame requested – for center of mass frames, there is one per added rigid body (that was not combined with another); for output frames, there is one per output per element. For end effectors, this is the total number of outputs on the leaves of the kinematic tree.

Parameters
robot_modelA valid HEBI RobotModel object.
frame_typeWhich type of frame to consider – see HebiFrameType enum.
HebiStatusCode hebiRobotModelGetTreeTopology ( HebiRobotModelPtr  robot_model,
HebiFrameType  frame_type,
HebiRobotModelElementTopology table 
)

returns table of information about the shape of kinematic tree

Parameters
robot_modelA valid HEBI RobotModel object.
frame_typeWhich type of frame to consider – see HebiFrameType enum (index of table corresponds to index of forward kinematic frames of the specified type).
tableAn allocated (number of frames for frame_type) array of HebiRobotModelElementTopology objects; this is filled by the function.
Returns
HebiStatusSuccess on success or HebiStatusInvalidArgument if robot_model or table is null.
HebiRobotModelPtr hebiRobotModelImport ( const char *  file)

Import robot model from a file into a RobotModel object.

Parameters
fileA null-terminated string that gives the path/filename of the robot model XML file (HRDF). Must not be NULL. The format of this file is documented at docs.hebi.us.
Returns
A HebiRobotModelPtr on success, or NULL if the file could not be opened or read. In the case that NULL is returned, an error message is set that is retrievable via hebiRobotModelGetImportError. This saved error message is thread-safe, and is available until hebiRobotModelImport is called again on this thread. In the case that a non-NULL object is returned, this must be released with 'hebiRobotModelRelease' when no longer needed.
HebiRobotModelPtr hebiRobotModelImportBuffer ( const char *  buffer,
size_t  buffer_size 
)

Import robot model from a buffer into a RobotModel object.

Parameters
bufferA buffer of the text content of an robot model XML file (HRDF). Must not be NULL. The format of this file is documented at docs.hebi.us.
buffer_sizeThe length of the above buffer. The buffer does not need to be null terminated, and as such this buffer_size should not include any null terminating characters.
Returns
A HebiRobotModelPtr on success, or NULL if the file could not be parsed. In the case that NULL is returned, an error message is set that is retrievable via hebiRobotModelGetImportError. This saved error message is thread-safe, and is available until hebiRobotModelImport is called again on this thread. In the case that a non-NULL object is returned, this must be released with 'hebiRobotModelRelease' when no longer needed.
void hebiRobotModelRelease ( HebiRobotModelPtr  robot_model)

Frees resources created by this robot model object.

RobotModel object should no longer be used after this function is called!

Parameters
robot_modelA valid HEBI RobotModel object.
HebiStatusCode hebiRobotModelSetBaseFrame ( HebiRobotModelPtr  robot_model,
const double *  transform,
HebiMatrixOrdering  ordering 
)

Sets the fixed transform from the origin to the input of the first added model element.

Parameters
robot_modelA valid HEBI RobotModel object.
transformA 4x4 homogeneous transform. Must not be null, and must be a valid transform.
orderingHow the data in transform should be serialized.
Returns
HebiStatusSuccess on success, or HebiStatusInvalidArgument if transform is null or invalid.
const char* hebiSafetyParametersGetLastError ( void  )

Misc Functions.

Get the string corresponding to the last error from any safety parameters function.

Note: This function returns the last error from the current thread.

Returns
a NULL terminated string which must not be deallocated
HebiStatusCode hebiStringGetString ( HebiStringPtr  str,
char *  buffer,
size_t *  length 
)

String Functions.

Copy the string into a buffer

To only query the length of the string, provide a null pointer for the buffer parameter. If the provided buffer is not large enough to hold the string (the length determined by the length parameter), the call will fail. Note that the size of this buffer includes the null terminating character.

Parameters
bufferPointer to a buffer into which the string will be written. This can be null, in which case this function will write the size of the string (including null character) into length.
lengthPointer to the length of the input buffer. This parameter must not be null, or this function will return HebiStatusInvalidArgument
Returns
HebiStatusSuccess on success, HebiStatusBufferTooSmall if the value referenced by length is smaller than the string (including the character), or HebiStatusInvalidArgument if length pointer is null
void hebiStringRelease ( HebiStringPtr  str)

Releases a string instance.

HebiTrajectoryPtr hebiTrajectoryCreateUnconstrainedQp ( size_t  num_waypoints,
const double *  positions,
const double *  velocities,
const double *  accelerations,
const double *  time_vector 
)

Trajectory API.

Creates a HebiTrajectory object for a single joint using the given parameters; this must be released with hebiTrajectoryRelease after use.

Parameters
num_waypointsThe number of waypoints.
positionsA vector of waypoints for this joint; should be num_waypoints in length. Any elements that are NAN will be considered free parameters, and will be set by the function. Values of +/-infinity are not allowed. Must not be NULL.
velocitiesAn optional vector of velocity constraints at the corresponding waypoints; should either be NULL or num_waypoints in length. Any elements that are NAN will be considered free parameters, and will be set by the function. Values of +/-infinity are not allowed.
accelerationsAn optional vector of acceleration constraints at the corresponding waypoints; should either be NULL or num_waypoints in length. Any elements that are NAN will be considered free parameters, and will be set by the function. Values of +/-infinity are not allowed.
time_vectorA vector of times to reach each waypoint; this must be defined (not NULL, and not NAN for any element). The first element must be zero.
Returns
A HebiTrajectory object if there were no errors, and the trajectory has been created. A NULL value indicates that there was an error, but does not specify any details about the error at this time.
double hebiTrajectoryGetDuration ( HebiTrajectoryPtr  trajectory)

Returns the length of this trajectory (in seconds).

HebiStatusCode hebiTrajectoryGetState ( HebiTrajectoryPtr  trajectory,
double  time,
double *  position,
double *  velocity,
double *  acceleration 
)

Gets the value of the trajectory at a given time.

Parameters
trajectoryA HebiTrajectory object
timeThe time within the trajectory (from the beginning to the end of the trajectory's time vector) at which to query.
positionFilled in with the position at the given time, as defined by this trajectory. Must not be null.
velocityFilled in with the velocity at the given time, as defined by this trajectory. Must not be null.
accelerationFilled in with the acceleration at the given time, as defined by this trajectory. Must not be null.
Returns
HebiStatusSuccess on success, otherwise an error status.
void hebiTrajectoryRelease ( HebiTrajectoryPtr  trajectory)

Frees resources created by this trajectory.

Trajectory should no longer be used after this function is called!



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