56 #include "rnr/rnrconfig.h" 59 #include "rnr/units.h" 85 {0x00,
"Model Number", 2, 0xffff,
false, NULL},
86 {0x02,
"Firmware Version", 1, 0xff,
false,
"%u"},
87 {0x03,
"Servo Id", 1, 0xff,
false,
"%u"},
88 {0x04,
"Baud Rate", 1, 0xff,
false,
"%u"},
89 {0x05,
"Return Delay Time", 1, 0xff,
false,
"%u"},
90 {0x06,
"CW Angle Limit", 2, 0x3ff,
false,
"%u"},
91 {0x08,
"CCW Angle Limit", 2, 0x3ff,
false,
"%u"},
92 {0x0b,
"Highest Temperature Limit", 1, 0xff,
false,
"%u"},
93 {0x0c,
"Lowest Voltage Limit", 1, 0xff,
false,
"%u"},
94 {0x0d,
"Highest Voltage Limit", 1, 0xff,
false,
"%u"},
95 {0x0e,
"Maximum Torque", 2, 0x3ff,
false,
"%u"},
96 {0x10,
"Status Return Level", 1, 0xff,
false,
"%u"},
97 {0x11,
"Alarm LED", 1, 0xff,
false,
"%u"},
98 {0x12,
"Alarm Shutdown", 1, 0xff,
false, NULL}
106 {0x18,
"Torque Enable", 1, 0xff,
false,
"%u"},
107 {0x19,
"LED", 1, 0xff,
false,
"%u"},
108 {0x1a,
"CW Compliance Margin", 1, 0xff,
false,
"%u"},
109 {0x1b,
"CCW Compliance Margin", 1, 0xff,
false,
"%u"},
110 {0x1c,
"CW Compliance Slope", 1, 0xff,
false,
"%u"},
111 {0x1d,
"CCW Compliance Slope", 1, 0xff,
false,
"%u"},
112 {0x1e,
"Goal Position", 2, 0x3ff,
false,
"%u"},
113 {0x20,
"Goal Speed", 2, 0x7ff,
true,
"%d"},
114 {0x22,
"Torque Limit", 2, 0x3ff,
false,
"%u"},
115 {0x24,
"Current Position", 2, 0x3ff,
false,
"%u"},
116 {0x26,
"Current Speed", 2, 0x7ff,
true,
"%d"},
117 {0x28,
"Current Load", 2, 0x7ff,
true,
"%d"},
118 {0x2a,
"Current Voltage", 1, 0xff,
false,
"%u"},
119 {0x2b,
"Current Temperature", 1, 0xff,
false,
"%u"},
120 {0x2c,
"Registered", 1, 0xff,
false,
"%u"},
121 {0x2e,
"Moving", 1, 0xff,
false,
"%u"},
122 {0x2f,
"Lock", 1, 0xff,
false,
"%u"},
123 {0x30,
"Punch", 2, 0x3ff,
false,
"%u"}
138 DynaServo(comm, nServoId, uModelNum, uFwVer)
181 "Goal speed %d: Out of range.", nGoalSpeed);
199 "Goal speed %d: Out of range.", nGoalSpeed);
204 nGoalSpeed, nGoalOdPos,
275 for(nTries=0; nTries<nMaxTries; ++nTries)
404 "Clockwise limit %u: Out of range.", uCwLim);
409 "Counterclockwise limit %u: Out of range.", uCcwLim);
412 "Counterclockwise limit %u: Smaller than clockwise limit %u.",
501 "Temperature limit %u: Out of range.", uTempLim);
575 "Minimum voltage limit %u: Out of range.", uMinVoltLim);
580 "Maximum voltage limit %u: Out of range.", uMaxVoltLim);
583 "Maximum voltage limit %u: Smaller than minimum voltage limit %u.",
584 uMaxVoltLim, uMinVoltLim);
667 "Maximum torque limit %u: Out of range.", uMaxTorqueLim);
1028 "Servo %d: Goal odometer position %d (encoder=%d): Out of range.",
1038 int nEncGoalPosMate;
1046 (uint_t)nEncGoalPosMate);
1099 uint_t uVal1, uVal2;
1107 "Goal speed %d: Out of range.", nGoalSpeed);
1179 "Maximum torque limit %u: Out of range.", uMaxTorqueLim);
1333 uint_t uVal3, uVal4;
1557 uint_t uVal1, uVal3, uVal4, uVal5;
1585 GenericEEPROMCtlTblInfo, arraysize(GenericEEPROMCtlTblInfo));
1589 DumpCtlTbl(
"RAM", GenericRAMCtlTblInfo, arraysize(GenericRAMCtlTblInfo));
1700 "Servo %d: Unknown control method %u.",
1748 nGoalOdPosMate = pServoMate->
GetOdometer() + delta;
1755 "Mate servo %d: Goal odometer position %d (encoder=%d): Out of range.",
1762 nGoalOdPosMate = nGoalOdPos;
1767 *pGoalOdPosMate = nGoalOdPosMate;
1838 "CW compliance margin %u: Out of range.",
1844 "CCW compliance margin %u: Out of range.",
1849 "CW compliance slope 0x%02x: Unknown value.",
1854 "CCW compliance slope 0x%02x: Unknown value.",
1947 &(pCtlMethod->
m_params.m_pid.m_uPGain));
1952 &(pCtlMethod->
m_params.m_pid.m_uIGain));
1958 &(pCtlMethod->
m_params.m_pid.m_uDGain));
1985 uPGain = ctlMethod.
m_params.m_pid.m_uPGain;
1986 uIGain = ctlMethod.
m_params.m_pid.m_uIGain;
1987 uDGain = ctlMethod.
m_params.m_pid.m_uDGain;
1996 "P-Gain %u: Out of range.", uPGain);
2001 "I-Gain %u: Out of range.", uIGain);
2006 "D-Gain %u: Out of range.", uDGain);
2100 return (uint_t)
iabs(nGoalSpeed);
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
#define DYNA_ADDR_ALARM_LED
alarm LED (RW)
#define DYNA_GOAL_SPEED_DIR_MASK
speed direction field mask
#define DYNA_LIM_TEMP_DFT_C
80C default maximum limit
uint_t m_uLimTemp
maximum temperature limit
virtual int UpdateOdometer(int nEncCurPos)
Update the odometer from the current servo position and rotation direction.
#define DYNA_P_GAIN_MAX_RAW
maximum value
char * newstr(const char *s)
Allocate new duplicated string.
#define DYNA_P_GAIN_MIN_RAW
minimum value
virtual int ReadHealth(uint_t *pAlarms, int *pCurLoad, uint_t *pCurVolt, uint_t *pCurTemp)
Read from the servo state memory the current servo health.
virtual int WriteGoalPos(int nGoalOdPos)
Write to the servo state memory to set the new goal position.
uint_t m_uLimVoltMin
minimum voltage limit
virtual uint_t GetServoMode() const
Get the servo operational mode.
#define DYNA_TORQUE_MAX_RAW
maximum raw torque
double m_fMaxSpeed
max no-load speed (rpm) at optimal power
void DumpCtlTbl(const char *sTblName, const DynaCtlTblEntry_T tblInfo[], size_t uSize)
Dump the servo control tabl values to stdout.
bool IsLinkedMaster() const
Test if this servo is a linked master.
#define DYNA_CUR_SPEED_MAG_MASK
speed magnitude field mask
#define DYNA_ADDR_CUR_POS_LSB
current position lsb (R)
#define DYNA_CTL_METHOD_COMPLIANCE
compliance control method
#define DYNA_OK
not an error, success
virtual void Dump()
Dump contents of the servo EEPROM and RAM control tables.
#define DYNA_TORQUE_EN_OFF
disable power drive to the motor
virtual int CfgReadAlarmShutdownMask(uint_t *pAlarmMask)
Read from the servo configuration EEPROM the current servo shutdown on alarms mask.
#define DYNA_ADDR_ALARM_SHUTDOWN
alarm shutdown (RW)
RoadNarrows MX Series Dynamixel Declarations.
virtual int MoveTo(int nGoalOdPos)
Move to the goal postition.
virtual int ReadGoalSpeed(int *pGoalSpeed)
Read from the servo state memory the current goal speed and direction.
#define DYNA_ADDR_CW_COMP_SLOPE
clockwise compliance slope
#define DYNA_ADDR_GOAL_SPEED_LSB
goal speed lsb (RW)
uint_t m_uRawVoltMin
minimum raw voltage value
#define DYNA_ADDR_MODEL_NUM_LSB
model number lsb (R)
#define DYNA_CUR_LOAD_MAG_MASK
load magnitude field mask
virtual int CfgReadServoMode(uint_t *pServoMode)
Read from the servo configuration EEPROM to determine the servo operational mode. ...
#define DYNA_LIM_TORQUE_MAX_ON_DFT_RAW
default maximum raw torque
#define DYNA_MODE_SERVO
servo mode with limited rotation
virtual int WriteCtlMethodCompliance(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new compliance control method parameters.
#define DYNA_D_GAIN_DFT
default value
#define DYNA_LED_OFF
LED off.
#define DYNA_ADDR_LIM_CW_LSB
clockwise angle limit lsb (RW)
virtual int vSyncWrite(uint_t uAddr, uint_t uValSize, uint_t uCount,...)
Synchronous write 8/16-bit values to a list of Dynamixel servos.
#define DYNA_ADDR_EEPROM_LOCK
lock the EEPROM (RW)
#define DYNA_POS_MIN_RAW
minimum raw angular position
#define DYNA_TEMP_MIN_RAW
minimum raw temperature
virtual int UnpackCurSpeed(uint_t uVal)
Unpack current speed from the control table value.
virtual int Reset(int nServoId)=0
Reset a servo back to default values.
double m_fHeight
height (mm)
int m_nOdGoalPos
odometer goal position
uint_t m_uRawPosMin
minimum raw position value (servo mode)
#define DYNA_ADDR_CW_COMP_MARGIN
clockwise compliance margin (RW)
virtual int ReadCurLoad(int *pCurLoad)
Read from the servo state memory the current load.
DynaAgent_T * m_pAgent
servo agent
uint_t m_uRawSpeedMax
maximum raw speed magnitude value
#define DYNA_SRL_RET_DFT
return status packet default
#define DYNA_COMP_SLOPE_TORQUE_2
compliance torque level 2
#define DYNA_TRY_EXPR(expr, ecode, efmt,...)
Test if the servo is in the required mode(s) exception macro.
#define DYNA_COMP_MARGIN_DFT_RAW
default raw position difference
#define DYNA_VOLT_MAX_RAW
maximum raw temperature
double m_fVoltMax
maximum operational voltage (V)
#define DYNA_ALARM_NONE
no alarms
int m_nCurLoad
current load
DynaServoCfg_T m_cfg
servo shadowed EEPROM configuration
uint_t m_uCtlMethod
Dynamixel Internal Position Control Methods
uint_t m_uRawSpeedMin
minimum raw speed magnitude value
virtual int Reset()
Reset this servo back to default values.
virtual int Read8(int nServoId, uint_t uAddr, byte_t *pVal)=0
Read an 8-bit value from Dynamixel servo control table.
#define DYNA_CCW_POS_CONT_MODE
continuous mode (with cw limit)
virtual int CfgWriteAlarmShutdownMask(uint_t uAlarmMask)
Write to the servo configuration EEPROM the new servo shutdown on alarms mask.
uint_t m_uLimTorqueMax
on power-up maximum torque limit
int(* m_fnWriteGoalPos)(int nServoId, int nGoalPos, void *pUsrArg)
Generic Dynamixel Servo Base Class Interface.
#define DYNA_P_GAIN_DFT
default value
#define DYNA_TRY_ADDR(addr)
Test if servo address is valid.
INLINE_IN_H int iabs(int a)
Return absolute value of a.
#define DYNA_SPEED_MIN_RAW
minimum raw value
virtual int Read16(int nServoId, uint_t uAddr, ushort_t *pVal)=0
Read a 16-bit value from Dynamixel servo control table.
virtual int MoveAtSpeed(int nGoalSpeed)
Move at speed.
double m_fDepth
depth (mm)
void Init()
Initialize servo class instance.
virtual bool HasAgent()
Tests if servo has a registered agent.
virtual bool ChkComplianceSlope(uint_t uVal)
Check validity of compliance slope discrete values.
virtual bool Ping(int nServoId)=0
Ping the servo.
#define DYNA_ADDR_LIM_VOLT_MIN
lowest voltage limit (RW)
uint_t m_uLimTorqueMax
maximum torque limit
#define DYNA_TRY_IS_MASTER(pservo)
Test if the servo is a master servo.
uint_t m_uAlarmShutdown
alarm shutdown mask enable causes
int(* m_fnWriteGoalSpeedPos)(int nServoId, int nGoalSpeed, int nGoalPos, void *pUsrArg)
static DynaCtlTblEntry_T GenericRAMCtlTblInfo[]
Generic Servo RAM Control Table Information.
#define DYNA_ECODE_NOT_SUPP
feature/function not supported
#define DYNA_IS_NOT_MOVING
not moving
virtual int WriteGoalSpeed(int nGoalSpeed)
Write to the servo state memory the new goal speed and direction.
#define DYNA_ADDR_CUR_SPEED_LSB
current speed lsb (R)
Miscellaneous collection of useful utilities.
uint_t m_uCtlMethodUsed
Dynamixel Internal Position Control Methods
virtual ~DynaServoGeneric()
Destructor.
double m_fVoltMin
minimum operational voltage (V)
double m_fAngleMin
min rotation angle in servo mode (deg)
virtual int AgentWriteGoalPos(int nGoalOdPos)
Agent write to the servo state memory to set the new goal position.
#define DYNA_D_GAIN_MAX_RAW
maximum value
#define DYNA_D_GAIN_MIN_RAW
minimum value
Dynamixel Servo Abstract Base Class.
double m_fGearRedectionRatio
gear reduction ratio
virtual int ReadGoalPos(int *pGoalPos)
Read from the servo state memory the current goal position.
virtual int CfgWriteVoltageLimits(uint_t uMinVoltLim, uint_t uMaxVoltLim)
Write to the servo configuration EEPROM the new voltage limits.
double m_fWeight
weight (grams)
#define DYNA_I_GAIN_DFT
default value
virtual int CalcMatesGoalPos(int nGoalOdPos, int *pGoalOdPosMate)
Calculate the linked mate's goal position given this servo's goal position.
#define DYNA_ADDR_CUR_TEMP_C
current temperature C (R)
uint_t m_uCurVolt
current voltage
#define DYNA_LOG_ERROR(ecode, efmt,...)
Log Error.
void * m_pAgentArg
servo agent callback argument
uint_t m_uSupportedModes
Dynamixel Operational Modes
#define DYNA_POS_MODULO
servo position modulo [0-max]
uint_t m_uRawPosModulo
raw position modulo
#define DYNA_COMP_SLOPE_TORQUE_6
compliance torque level 6
#define DYNA_T_RET_DELAY_DFT_RAW
raw default
virtual int Write8(int nServoId, uint_t uAddr, byte_t byVal)=0
Write an 8-bit value to Dynamixel servo control table.
virtual int Release()
Release servo from any applied torque.
virtual int CfgReadRotationLimits(uint_t *pCwLim, uint_t *pCcwLim)
Read from the servo configuration EEPROM the current rotation limits.
int m_nCurSpeed
current speed (raw)
bool_t m_bTorqueEnabled
torque [not] enabled
virtual int Freeze()
Freeze servo at current position.
virtual int ReadCurPos(int *pCurOdPos)
Read from the servo state memory the current servo position.
virtual int EStop()
Emergency stop servo.
virtual int WriteTorqueEnable(bool bState)
Write to the servo state memory to set the new torque enable value.
bool m_bRotReversed
do [not] rotate in opposite directions
Dynamixel Control Method Structure.
virtual int ReadCtlMethodPid(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current PID control method parameters.
virtual uint_t GetAlarms()
Get current alarms.
#define DYNA_COMP_MARGIN_MAX_RAW
max position difference (loosest)
virtual int WriteLed(bool bState)
Write to the servo state memory to turn on or off the servo LED.
virtual int Write16(int nServoId, uint_t uAddr, ushort_t uhVal)=0
Write a 16-bit value to Dynamixel servo control table.
#define DYNA_COMP_SLOPE_TORQUE_4
compliance torque level 4
DynaServoGeneric(DynaComm &comm)
Bare-bones initialization constructor.
Servo Control Table Entry.
double m_fResolution
resolution (degrees)
#define DYNA_COMP_SLOPE_TORQUE_1
compliance torque level 1
#define DYNA_TORQUE_MIN_RAW
minimum raw torque
#define DYNA_LOG_SERVO_ALARMS(id, alarms)
Log servo alarms.
uint_t m_uRawTorqueMin
minimum raw torque value
bool m_bOverTorqueCond
over torque condition state
uint_t m_uTRetDelay
response return delay time (raw or )
#define DYNA_TRY_SERVO_HAS_MODE(pservo, mode)
Test if the servo has one of the required modes exception macro.
The libDynamixel internal declarations.
virtual int SyncState()
Synchronize the shadowed state data to the servo control table RAM state.
char * m_sModelName
model name
#define DYNA_CUR_LOAD_DIR_MASK
load direction field mask
uint_t m_uClearTorqueTh
clear over torque cond. threshold
void SetServoMode()
Set the servo mode given the servo capabilites and the current rotation limits.
uint_t m_uLimVoltMax
maximum voltage limit
#define DYNA_COMP_SLOPE_TORQUE_3
compliance torque level 3
#define DYNA_ADDR_LIM_TORQUE_MAX_LSB
current torque limit lsb (RW)
virtual int MoveAtSpeedTo(int nGoalSpeed, int nGoalOdPos)
Move at speed to the goal postition.
uint_t m_uRawTempMin
minimum raw temperature value
uint_t m_uLimCcw
counterclockwise angle limit
double m_fTempMin
minimum operational temperature (C)
int(* m_fnWriteGoalSpeed)(int nServoId, int nGoalSpeed, void *pUsrArg)
#define DYNA_ADDR_IS_MOVING
is [not] moving (to goal position)
void InitCfg()
Initialize servo configuration data.
uint_t m_uRawTorqueMax
maximum raw torque value
uint_t m_uOverTorqueTh
set over torque cond. threshold
uint_t m_uAlarms
current servo alarms and errors
#define DYNA_GOAL_SPEED_MAG_MASK
speed magnitude field mask
#define DYNA_ADDR_LIM_TORQUE_MAX_ON_LSB
maximum torque lsb (RW)
#define DYNA_GOAL_SPEED_DIR_CW
clockwise direction
virtual int CfgWriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo configuration EEPROM the new on power-up maximum torque limit. ...
#define DYNA_ADDR_CUR_VOLT
current voltage (R)
void InitState()
Initialize servo state data.
#define DYNA_MODE_CONTINUOUS
continuous mode with/without position
#define DYNA_COMP_SLOPE_TORQUE_DFT
default compliance torque level
#define DYNA_ADDR_LED
LED on/off (RW)
#define DYNA_ADDR_BAUD_RATE
baud rate enumeration (RW)
RoadNarrows Dynamixel Fundatmental Types.
#define DYNA_TEMP_MAX_RAW
maximum raw temperature
#define DYNA_COMP_SLOPE_TORQUE_7
compliance torque level 7
#define DYNA_ADDR_I_GAIN
Igain (RW)
bool m_bOdEnabled
odometer mapping [not] enabled
virtual int ReadIsMoving(bool *pState)
Read from the servo state memory to test if the servo is currently moving.
virtual int ReadMaxTorqueLimit(uint_t *pMaxTorqueLim)
Read from the servo state memory the current maximum torque limit.
#define DYNA_I_GAIN_MAX_RAW
maximum value
int m_nGoalSpeed
goal speed (raw)
#define DYNA_LIM_VOLT_MIN_DFT_RAW
default minimum raw limit
#define DYNA_GOAL_SPEED_DIR_CCW
counterclockwise direction
virtual int CfgReadTemperatureLimit(uint_t *pTempLim)
Read from the servo configuration EEPROM the current maximum temperature limit.
#define DYNA_ALARM_LED_DFT
alarm LED default mask
#define DYNA_CTL_METHOD_PID
pid control method
CrossLink_T m_link
servo cross linkage
DynaServoOdometer_T m_od
servo virtual odometer
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
uint_t m_uCurPos
current position (encoder ticks)
#define DYNA_TRY_SERVO_HAS_POS_CTL(pservo)
Test if the servo has positiion control.
virtual void CheckData()
Check data for consitencies.
bool_t m_uAlarmLed
alarm led enable
#define DYNA_I_GAIN_MIN_RAW
minimum value
virtual int AgentWriteGoalSpeed(int nGoalSpeed)
Agent write to the servo state memory to set the new goal speed.
#define DYNA_VOLT_MIN_RAW
minimum raw temperature
DynaServo * m_pServoMate
linked servo mate
#define DYNA_ADDR_ALARM_SHUTDOWN_MASK
valid data mask
#define DYNA_POS_MAX_RAW
maximum raw angular position
virtual int ReadCtlMethodCompliance(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current compliance control method parameters.
virtual int ReadTorqueEnable(bool *pState)
Read from the servo state memory the current torque enable value.
virtual int SyncCfg()
Synchronize the shadowed configuration to the servo control table EEPROM configuration.
virtual int UnpackGoalSpeed(uint_t uVal)
Unpack goal speed from the control table value.
virtual int WriteControlMethod(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new control method parameters.
double m_fTempMax
maximum operational temperature (C)
#define DYNA_ADDR_ID
dynamixel id (RW)
int OdometerToEncoder(int nOdPos)
Convert virtual odometer units to servo encoder units.
virtual int SyncData()
Synchronize the shadowed configuration and state data to the servo control table. ...
RoadNarrows Dynamixel Top-Level Package Header File.
#define DYNA_ADDR_LIM_CCW_LSB
counterclockwise angle limit lsb (RW)
virtual bool Ping()
Ping this servo.
uint_t m_uLimCw
clockwise angle limit (deg
#define DYNA_ADDR_SRL
status return level (RW)
virtual uint_t PackGoalSpeed(int nGoalSpeed)
Pack the goal speed into the control table value.
#define DYNA_ADDR_PUNCH_LSB
punch lsb (not used)
#define DYNA_ECODE_INTERNAL
internal error (bug)
#define DYNA_CUR_SPEED_DIR_CW
clockwise direction
virtual uint_t GetServoId() const
Get servo id.
virtual int Read(uint_t uAddr, uint_t *pVal)
#define DYNA_LED_ON
LED on.
virtual int AgentWriteGoalSpeedPos(int nGoalSpeed, int nGoalOdPos)
Agent write to the servo state memory to set the new goal position and speed.
DynaComm & m_comm
attached Dynamixel bus comm. object
virtual int ReloadMaxTorqueLimit()
Reload the maximum torque limit from the configuration.
uint_t m_uRawPosMax
maximum raw position value (servo mode)
uint_t m_uServoMode
servo mode Dynamixel Operational Modes
virtual int CfgReadMaxTorqueLimit(uint_t *pMaxTorqueLim)
Read from the servo configuration EEPROM the current on power-up maximum torque limit.
virtual int ReadLed(bool *pState)
Read from the servo state memory the current LED on/off value.
DynaServoState_T m_state
servo shadowed RAM state
virtual int WriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo state memory to set the new maximum torque limit.
DynaServoSpec_T m_spec
servo specification
union DynaServoCtlMethod_T::@2 m_params
parameters to control methods
uint_t m_uGoalPos
goal position (encoder ticks)
struct DynaServoCtlMethod_T::@2::@3 m_comp
compliance control method parameters
#define DYNA_TORQUE_EN_ON
enable power drive to the motor
#define DYNA_CUR_SPEED_DIR_MASK
speed direction field mask
#define DYNA_ADDR_T_RET_DELAY
return delay time (RW)
static DynaCtlTblEntry_T GenericEEPROMCtlTblInfo[]
Generic Servo EEPROM Control Table Information.
virtual int ReadDynamics(int *pCurPos, int *pCurSpeed, int *pCurLoad)
Read from the servo state memory the current servo dynamics.
#define DYNA_ADDR_D_GAIN
Dgain (RW)
virtual int Stop()
Stop servo.
#define DYNA_ADDR_LIM_TEMP_MAX
maximum temperature limit (RW)
uint_t m_uRawTempMax
maximum raw temperature value
#define DYNA_ADDR_CUR_LOAD_LSB
current load lsb (R)
double m_fStallTorque
max stall torque (kgf) at optimal power
#define DYNA_TRY_SERVO_HAS_AGENT(pservo)
Test if the servo has a proxy agent.
#define DYNA_SPEED_MAX_RAW
maximum raw value
virtual int ResetOdometer(int nEncZeroPt, bool bIsReverse)
Reset the servo's virtual odometer.
#define DYNA_ADDR_GOAL_POS_LSB
goal position lsb (RW)
virtual int Write(uint_t uAddr, uint_t uVal)
#define DYNA_ECODE_BAD_VAL
bad value
virtual int UnpackCurLoad(uint_t uVal)
Unpack current load estimate from the control table value.
virtual int CfgWriteTemperatureLimit(uint_t uTempLim)
Write to the servo configuration EEPROM the new maximum temperature limit.
DynaServoCtlMethod_T m_ctlMethod
position control method
#define DYNA_CW_POS_CONT_MODE
continuous mode (with ccw limit)
#define DYNA_CUR_LOAD_DIR_CW
clockwise direction
bool_t m_bIsMoving
servo is [not] moving
double m_fWidth
width (mm)
uint_t m_uSrl
status return level
#define DYNA_ALARM_DFT
alarm shutdown default
#define DYNA_ADDR_TORQUE_EN
torque enable (RW)
double m_fAngleMax
max rotation angle in servo mode (deg)
#define DYNA_ADDR_REG_INSTR
registered instruction (RW)
virtual int CfgWriteServoModeContinuous()
Write to the servo configuration EEPROM to set the servo operational mode to the full/continuous mode...
#define DYNA_TRY_SERVO_IN_MODE(pservo, mode)
Test if the servo is in the given mode.
bool m_bHas360Pos
does [not] have full 360 position info
#define DYNA_ADDR_P_GAIN
Pgain (RW)
virtual int CfgWriteRotationLimits(uint_t uCwLim, uint_t uCcwLim)
Write to the servo configuration EEPROM the new rotation limits.
#define DYNA_ADDR_LIM_VOLT_MAX
highest voltage limit (RW)
#define DYNA_TRY_RC(rc, fmt,...)
Test if Dynamixel return code is not an error.
#define DYNA_COMP_SLOPE_TORQUE_5
compliance torque level 5
uint_t m_uCurTemp
current temperature
#define DYNA_ADDR_FWVER
firmware version (R)
virtual int ReadCurSpeed(int *pCurSpeed)
Read from the servo state memory the current speed and direction.
virtual int CfgWriteServoMode(uint_t uCwLim, uint_t uCcwLim)
Write to the servo configuration EEPROM to set the servo operational mode.
virtual int ReadControlMethod(DynaServoCtlMethod_T *pCtlMethod)
Read from the servo state memory the current control method parameters.
uint_t m_uRawVoltMax
maximum raw voltage value
RoadNarrows Dynamixel Library Error and Logging Routines.
int GetOdometer()
Get the current virtual odometer value.
#define DYNA_ADDR_CCW_COMP_MARGIN
counterclockwise compliance margin
#define DYNA_LIM_VOLT_MAX_DFT_RAW
default maximum raw limit
virtual int WriteCtlMethodPid(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new PID control method parameters.
#define DYNA_SPEED_CONT_STOP
continuous mode: stop
#define DYNA_COMP_MARGIN_MIN_RAW
min position difference (tightest)
void InitSpec()
Initialize servo fixed specification data.
#define DYNA_ADDR_CCW_COMP_SLOPE
counterclockwise compliance slope
Dynamixel Bus Communications Abstract Base Class.
virtual int CalcMatesGoalSpeed(int nGoalSpeed)
Calculate the linked mate's speed speed given this servo's goal speed.
#define DYNA_TRY_COMM(comm)
Test if bus communication is available exception macro.
virtual int CfgReadVoltageLimits(uint_t *pMinVoltLim, uint_t *pMaxVoltLim)
Read from the servo configuration EEPROM the current voltage limits.