55 #include "rnr/rnrconfig.h" 58 #include "rnr/units.h" 80 {0x00,
"Model Number", 2, 0xffff,
false, NULL},
81 {0x02,
"Firmware Version", 1, 0xff,
false,
"%u"},
82 {0x03,
"Servo Id", 1, 0xff,
false,
"%u"},
83 {0x04,
"Baud Rate", 1, 0xff,
false,
"%u"},
84 {0x05,
"Return Delay Time", 1, 0xff,
false,
"%u"},
85 {0x06,
"CW Angle Limit", 2, 0x3ff,
false,
"%u"},
86 {0x08,
"CCW Angle Limit", 2, 0x3ff,
false,
"%u"},
87 {0x0a,
"Drive Mode", 1, 0xff,
false,
"%u"},
88 {0x0b,
"Highest Temperature Limit", 1, 0xff,
false,
"%u"},
89 {0x0c,
"Lowest Voltage Limit", 1, 0xff,
false,
"%u"},
90 {0x0d,
"Highest Voltage Limit", 1, 0xff,
false,
"%u"},
91 {0x0e,
"Maximum Torque", 2, 0x3ff,
false,
"%u"},
92 {0x10,
"Status Return Level", 1, 0xff,
false,
"%u"},
93 {0x11,
"Alarm LED", 1, 0xff,
false,
"%u"},
94 {0x12,
"Alarm Shutdown", 1, 0xff,
false, NULL},
95 {0x14,
"Multi Turn Offset", 2, 0xffff,
true,
"%d"},
96 {0x16,
"Resolution Divider", 1, 0xff,
false,
"%u"}
104 {0x18,
"Torque Enable", 1, 0xff,
false,
"%u"},
105 {0x19,
"LED", 1, 0xff,
false,
"%u"},
106 {0x1a,
"CW Compliance Margin", 1, 0xff,
false,
"%u"},
107 {0x1b,
"CCW Compliance Margin", 1, 0xff,
false,
"%u"},
108 {0x1c,
"CW Compliance Slope", 1, 0xff,
false,
"%u"},
109 {0x1d,
"CCW Compliance Slope", 1, 0xff,
false,
"%u"},
110 {0x1e,
"Goal Position", 2, 0x3ff,
false,
"%u"},
111 {0x20,
"Goal Speed", 2, 0x7ff,
true,
"%d"},
112 {0x22,
"Torque Limit", 2, 0x3ff,
false,
"%u"},
113 {0x24,
"Current Position", 2, 0x3ff,
false,
"%u"},
114 {0x26,
"Current Speed", 2, 0x7ff,
true,
"%d"},
115 {0x28,
"Current Load", 2, 0x7ff,
true,
"%d"},
116 {0x2a,
"Current Voltage", 1, 0xff,
false,
"%u"},
117 {0x2b,
"Current Temperature", 1, 0xff,
false,
"%u"},
118 {0x2c,
"Registered", 1, 0xff,
false,
"%u"},
119 {0x2e,
"Moving", 1, 0xff,
false,
"%u"},
120 {0x2f,
"Lock", 1, 0xff,
false,
"%u"},
121 {0x30,
"Punch", 2, 0x3ff,
false,
"%u"},
122 {0x38,
"Sensed Current", 2, 0x3ff,
true,
"%d"}
140 Init(nServoId, uFwVer);
201 "Linked master servo %d: Drive mode must also be master.",
m_nServoId);
332 EX106PEEPROMCtlTblInfo, arraysize(EX106PEEPROMCtlTblInfo));
336 DumpCtlTbl(
"RAM", EX106PRAMCtlTblInfo, arraysize(EX106PRAMCtlTblInfo));
RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
#define DYNA_EX106P_POS_MODULO
continuous position mod [0-max]
char * newstr(const char *s)
Allocate new duplicated string.
#define DYNA_EX106P_SPEC_TEMP_MAX_C
maximum recommended operational temperature (C)
#define DYNA_TORQUE_MAX_RAW
maximum raw torque
double m_fMaxSpeed
max no-load speed (rpm) at optimal power
#define DYNA_EX106P_SPEC_VOLT_MIN_V
minimum operational voltage (V)
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_OK
not an error, success
#define DYNA_EX106P_SPEC_CTL_METHOD
position control method (see Dynamixel Internal Position Control Methods)
uint_t m_uRawVoltMin
minimum raw voltage value
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_EX106P_SPEC_WEIGHT_G
weight (grams)
#define DYNA_TEMP_MIN_RAW
minimum raw temperature
void InitSpec()
Initialize servo fixed specification data.
double m_fHeight
height (mm)
#define DYNA_EX106P_SPEC_MAX_SPEED_RPM
maximum no-load speed (rpm) at optimal power
#define DYNA_EX106P_DRIVE_MODE_MS_SLAVE
dual joint slave
uint_t m_uRawPosMin
minimum raw position value (servo mode)
DynaServoEX106P(DynaComm &comm)
Bare-bones initialization constructor.
uint_t m_uRawSpeedMax
maximum raw speed magnitude value
#define DYNA_TRY_EXPR(expr, ecode, efmt,...)
Test if the servo is in the required mode(s) exception macro.
#define DYNA_VOLT_MAX_RAW
maximum raw temperature
double m_fVoltMax
maximum operational voltage (V)
uint_t m_uRawSpeedMin
minimum raw speed magnitude value
virtual int Read8(int nServoId, uint_t uAddr, byte_t *pVal)=0
Read an 8-bit value from Dynamixel servo control table.
uint_t m_uSensedCurrentTorqueDir
sensed applied torque direction
Generic Dynamixel Servo Base Class Interface.
static DynaCtlTblEntry_T EX106PEEPROMCtlTblInfo[]
EX-106P Servo EEPROM Control Table Information.
#define DYNA_TRY_ADDR(addr)
Test if servo address is valid.
#define DYNA_EX106P_DRIVE_MODE_NR_REV
dual joint reverse rotation
#define DYNA_SPEED_MIN_RAW
minimum raw value
static DynaCtlTblEntry_T EX106PRAMCtlTblInfo[]
EX-106P Servo RAM Control Table Information.
virtual int Read16(int nServoId, uint_t uAddr, ushort_t *pVal)=0
Read a 16-bit value from Dynamixel servo control table.
double m_fDepth
depth (mm)
void Init()
Initialize servo class instance.
virtual int CfgReadDriveMode(bool *pIsMaster, bool *pIsNormal)
Read from the servo configuration EEPROM the drive mode.
#define DYNA_TRY_IS_MASTER(pservo)
Test if the servo is a master servo.
DynaEX106PCfgExt_T m_cfgExt
configuration extension data
#define DYNA_EX106P_SPEC_HEIGHT_MM
height (mm)
EX-106+ Dynamixel Servo Class.
uint_t m_uCtlMethodUsed
Dynamixel Internal Position Control Methods
double m_fVoltMin
minimum operational voltage (V)
double m_fAngleMin
min rotation angle in servo mode (deg)
RoadNarrows EX Series Dynamixel Declarations.
#define DYNA_EX106P_SPEC_MODES
supported modes (see Dynamixel Operational Modes)
double m_fGearRedectionRatio
gear reduction ratio
double m_fWeight
weight (grams)
uint_t m_uSupportedModes
Dynamixel Operational Modes
#define DYNA_EX106P_SPEC_WIDTH_MM
width (mm)
uint_t m_uRawPosModulo
raw position modulo
void InitCfg()
Initialize servo configuration data.
#define DYNA_EX106P_SPEC_GEAR_RATIO
gear reduction ratio : 1
virtual int Write8(int nServoId, uint_t uAddr, byte_t byVal)=0
Write an 8-bit value to Dynamixel servo control table.
virtual int Write16(int nServoId, uint_t uAddr, ushort_t uhVal)=0
Write a 16-bit value to Dynamixel servo control table.
#define DYNA_EX106P_DRIVE_MODE_MS_MASTER
dual joint master
Servo Control Table Entry.
#define DYNA_EX106P_SPEC_HAS_360_POS
servo does provide 360 ° position data
double m_fResolution
resolution (degrees)
#define DYNA_EX106P_CURRENT_RES_M_AMP
10mA resolution
#define DYNA_TORQUE_MIN_RAW
minimum raw torque
#define DYNA_EX106P_SPEC_ANGLE_MIN_DEG
minimum rotation angle in servo mode (deg)
uint_t m_uRawTorqueMin
minimum raw torque value
#define DYNA_EX106P_CURRENT_M_AMP(val)
Current(mA) / 10.
virtual int CfgWriteDriveMode(bool bIsMaster, bool bIsNormal)
Write to the servo configuration EEPROM the new drive mode.
#define DYNA_EX106P_SPEC_VOLT_MAX_V
maximum operational voltage (V)
#define DYNA_EX106P_SPEC_STALL_TORQUE_KGF
maximum stall torque (kgf) at optimal power
The libDynamixel internal declarations.
virtual int SyncState()
Synchronize the shadowed state data to the servo control table RAM state.
char * m_sModelName
model name
Generic Dynamixel Servo Base Class.
uint_t m_uRawTempMin
minimum raw temperature value
double m_fTempMin
minimum operational temperature (C)
void InitCfg()
Initialize servo configuration data.
#define DYNA_EX106P_SPEC_ANGLE_MAX_DEG
maximum rotation angle in servo mode (deg)
uint_t m_uRawTorqueMax
maximum raw torque value
#define DYNA_EX106P_POS_MIN_RAW
minimum raw angular position
void InitState()
Initialize servo state data.
#define DYNA_TEMP_MAX_RAW
maximum raw temperature
#define DYNA_EX106P_POS_MAX_RAW
maximum raw angular position
int UnpackDriveMode(uint_t uVal, bool *pIsMaster, bool *pIsNormal)
Unpack drive mode.
static const int DYNA_MODEL_NUM
void Init(int nServoId, uint_t uModelNum, uint_t uFwVer)
Initialize servo class instance.
CrossLink_T m_link
servo cross linkage
DynaEX106PStateExt_T m_stateExt
state extension data
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
virtual void CheckData()
Check data for consitencies.
#define DYNA_VOLT_MIN_RAW
minimum raw temperature
DynaServo * m_pServoMate
linked servo mate
virtual int ReadSensedCurrent(uint_t *pMilliAmps, uint_t *pTorqueDir)
Read from the servo configuration EEPROM the sensed current data.
#define DYNA_DIR_NONE
no direction
virtual int SyncCfg()
Synchronize the shadowed configuration to the servo control table EEPROM configuration.
double m_fTempMax
maximum operational temperature (C)
virtual int SyncData()
Synchronize the shadowed configuration and state data to the servo control table. ...
RoadNarrows Dynamixel Top-Level Package Header File.
EX-106+ Dynamixel Servo Class Interface.
virtual uint_t GetServoId() const
Get servo id.
virtual int Read(uint_t uAddr, uint_t *pVal)
virtual int Write(uint_t uAddr, uint_t uVal)
DynaComm & m_comm
attached Dynamixel bus comm. object
#define DYNA_EX106P_ADDR_CURRENT_LSB
sensed current draw (lsb)
uint_t m_uRawPosMax
maximum raw position value (servo mode)
virtual ~DynaServoEX106P()
Destructor.
DynaServoSpec_T m_spec
servo specification
void InitState()
Initialize servo state data.
uint_t PackDriveMode(bool bIsMaster, bool bIsNormal)
Pack drive mode.
#define DYNA_EX106P_DRIVE_MODE_NR_NORM
dual joint normal rotation
#define DYNA_EX106P_CURRENT_TORQUE_DIR(val)
Torque direction.
#define DYNA_EX106P_ADDR_DRIVE_MODE
EEPROM drive mode (RW)
virtual void Dump()
Dump contents of the servo EEPROM and RAM control tables.
virtual int Read(uint_t uAddr, uint_t *pVal)
uint_t m_uRawTempMax
maximum raw temperature value
double m_fStallTorque
max stall torque (kgf) at optimal power
int UnpackSensedCurrent(uint_t uVal, uint_t *pMilliAmps, uint_t *pTorqueDir)
Unpack sensed current.
#define DYNA_SPEED_MAX_RAW
maximum raw value
#define DYNA_EX106P_SPEC_TEMP_MIN_C
minimum recommended operational temperature (C)
virtual int Write(uint_t uAddr, uint_t uVal)
#define DYNA_ECODE_BAD_VAL
bad value
#define DYNA_EX106P_SPEC_POS_RES_DEG
resolution (degrees)
virtual int SyncCfg()
Synchronize the shadowed configuration to the servo control table EEPROM configuration.
double m_fWidth
width (mm)
bool m_bDriveModeIsMaster
master (slave) servo
uint_t m_uSensedCurrentMilliAmps
sensed current milli-amperes
double m_fAngleMax
max rotation angle in servo mode (deg)
bool m_bDriveModeIsNormal
normal (reverse) rotation to each other
bool m_bHas360Pos
does [not] have full 360 position info
#define DYNA_EX106P_SPEC_DEPTH_MM
depth (mm)
uint_t m_uRawVoltMax
maximum raw voltage value
RoadNarrows Dynamixel Library Error and Logging Routines.
virtual int SyncState()
Synchronize the shadowed state data to the servo control table RAM state.
Dynamixel Bus Communications Abstract Base Class.
#define DYNA_TRY_COMM(comm)
Test if bus communication is available exception macro.