![]() |
Dynamixel
2.9.5
RoadNarrows Robotics Dynamixel Package
|
MX-12W Dynamixel Servo Class. More...
#include <DynaServoMX12W.h>
Public Member Functions | |
| DynaServoMX12W (DynaComm &comm) | |
| Bare-bones initialization constructor. More... | |
| DynaServoMX12W (DynaComm &comm, int nServoId, uint_t uModelNum=DYNA_MODEL_NUM, uint_t uFwVer=DYNA_FWVER_NA) | |
| Initialization constructor. More... | |
| virtual | ~DynaServoMX12W () |
| Destructor. | |
| virtual void | Dump () |
| Dump contents of the servo EEPROM and RAM control tables. | |
Public Member Functions inherited from DynaServoGeneric | |
| DynaServoGeneric (DynaComm &comm) | |
| Bare-bones initialization constructor. More... | |
| DynaServoGeneric (DynaComm &comm, int nServoId, uint_t uModelNum=DYNA_MODEL_NUM, uint_t uFwVer=DYNA_FWVER_NA) | |
| Initialization constructor. More... | |
| virtual | ~DynaServoGeneric () |
| Destructor. | |
| virtual float | CvtRawTempToC (uint uTemp) |
| Convert raw temperature coding to degrees Celsius. More... | |
| virtual float | CvtRawVoltToVolts (uint uVolts) |
| Convert raw volts coding to volts. More... | |
| virtual int | AgentWriteGoalPos (int nGoalOdPos) |
| Agent write to the servo state memory to set the new goal position. More... | |
| virtual int | AgentWriteGoalSpeed (int nGoalSpeed) |
| Agent write to the servo state memory to set the new goal speed. More... | |
| virtual int | AgentWriteGoalSpeedPos (int nGoalSpeed, int nGoalOdPos) |
| Agent write to the servo state memory to set the new goal position and speed. More... | |
| virtual int | MoveTo (int nGoalOdPos) |
| Move to the goal postition. More... | |
| virtual int | MoveAtSpeedTo (int nGoalSpeed, int nGoalOdPos) |
| Move at speed to the goal postition. More... | |
| virtual int | MoveAtSpeed (int nGoalSpeed) |
| Move at speed. More... | |
| virtual int | EStop () |
| Emergency stop servo. More... | |
| virtual int | Stop () |
| Stop servo. More... | |
| virtual int | Freeze () |
| Freeze servo at current position. More... | |
| virtual int | Release () |
| Release servo from any applied torque. More... | |
| virtual int | CfgReadRotationLimits (uint_t *pCwLim, uint_t *pCcwLim) |
| Read from the servo configuration EEPROM the current rotation limits. More... | |
| virtual int | CfgWriteRotationLimits (uint_t uCwLim, uint_t uCcwLim) |
| Write to the servo configuration EEPROM the new rotation limits. More... | |
| virtual int | CfgReadTemperatureLimit (uint_t *pTempLim) |
| Read from the servo configuration EEPROM the current maximum temperature limit. More... | |
| virtual int | CfgWriteTemperatureLimit (uint_t uTempLim) |
| Write to the servo configuration EEPROM the new maximum temperature limit. More... | |
| virtual int | CfgReadVoltageLimits (uint_t *pMinVoltLim, uint_t *pMaxVoltLim) |
| Read from the servo configuration EEPROM the current voltage limits. More... | |
| virtual int | CfgWriteVoltageLimits (uint_t uMinVoltLim, uint_t uMaxVoltLim) |
| Write to the servo configuration EEPROM the new voltage limits. More... | |
| virtual int | CfgReadMaxTorqueLimit (uint_t *pMaxTorqueLim) |
| Read from the servo configuration EEPROM the current on power-up maximum torque limit. More... | |
| virtual int | CfgWriteMaxTorqueLimit (uint_t uMaxTorqueLim) |
| Write to the servo configuration EEPROM the new on power-up maximum torque limit. More... | |
| virtual int | CfgReadAlarmShutdownMask (uint_t *pAlarmMask) |
| Read from the servo configuration EEPROM the current servo shutdown on alarms mask. More... | |
| virtual int | CfgWriteAlarmShutdownMask (uint_t uAlarmMask) |
| Write to the servo configuration EEPROM the new servo shutdown on alarms mask. More... | |
| virtual int | CfgReadServoMode (uint_t *pServoMode) |
| Read from the servo configuration EEPROM to determine the servo operational mode. More... | |
| virtual int | CfgWriteServoMode (uint_t uCwLim, uint_t uCcwLim) |
| Write to the servo configuration EEPROM to set the servo operational mode. More... | |
| virtual int | CfgWriteServoModeContinuous () |
| Write to the servo configuration EEPROM to set the servo operational mode to the full/continuous mode. More... | |
| virtual int | ReadTorqueEnable (bool *pState) |
| Read from the servo state memory the current torque enable value. More... | |
| virtual int | WriteTorqueEnable (bool bState) |
| Write to the servo state memory to set the new torque enable value. More... | |
| virtual int | ReadLed (bool *pState) |
| Read from the servo state memory the current LED on/off value. More... | |
| virtual int | WriteLed (bool bState) |
| Write to the servo state memory to turn on or off the servo LED. More... | |
| virtual int | ReadControlMethod (DynaServoCtlMethod_T *pCtlMethod) |
| Read from the servo state memory the current control method parameters. More... | |
| virtual int | WriteControlMethod (DynaServoCtlMethod_T &ctlMethod) |
| Write to the servo state memory the new control method parameters. More... | |
| virtual int | ReadGoalPos (int *pGoalPos) |
| Read from the servo state memory the current goal position. More... | |
| virtual int | WriteGoalPos (int nGoalOdPos) |
| Write to the servo state memory to set the new goal position. More... | |
| virtual int | ReadGoalSpeed (int *pGoalSpeed) |
| Read from the servo state memory the current goal speed and direction. More... | |
| virtual int | WriteGoalSpeed (int nGoalSpeed) |
| Write to the servo state memory the new goal speed and direction. More... | |
| virtual int | ReadMaxTorqueLimit (uint_t *pMaxTorqueLim) |
| Read from the servo state memory the current maximum torque limit. More... | |
| virtual int | WriteMaxTorqueLimit (uint_t uMaxTorqueLim) |
| Write to the servo state memory to set the new maximum torque limit. More... | |
| virtual int | ReloadMaxTorqueLimit () |
| Reload the maximum torque limit from the configuration. More... | |
| virtual int | ReadCurPos (int *pCurOdPos) |
| Read from the servo state memory the current servo position. More... | |
| virtual int | ReadCurSpeed (int *pCurSpeed) |
| Read from the servo state memory the current speed and direction. More... | |
| virtual int | ReadCurLoad (int *pCurLoad) |
| Read from the servo state memory the current load. More... | |
| virtual int | ReadDynamics (int *pCurPos, int *pCurSpeed, int *pCurLoad) |
| Read from the servo state memory the current servo dynamics. More... | |
| virtual int | ReadHealth (uint_t *pAlarms, int *pCurLoad, uint_t *pCurVolt, uint_t *pCurTemp) |
| Read from the servo state memory the current servo health. More... | |
| virtual int | ReadIsMoving (bool *pState) |
| Read from the servo state memory to test if the servo is currently moving. More... | |
| virtual int | Read (uint_t uAddr, uint_t *pVal) |
| virtual int | Write (uint_t uAddr, uint_t uVal) |
| virtual bool | Ping () |
| Ping this servo. More... | |
| virtual int | Reset () |
| Reset this servo back to default values. More... | |
| virtual int | SyncData () |
| Synchronize the shadowed configuration and state data to the servo control table. More... | |
| virtual int | SyncCfg () |
| Synchronize the shadowed configuration to the servo control table EEPROM configuration. More... | |
| virtual int | SyncState () |
| Synchronize the shadowed state data to the servo control table RAM state. More... | |
Public Member Functions inherited from DynaServo | |
| DynaServo (DynaComm &comm, int nServoId, uint_t uModelNum, uint_t uFwVer) | |
| Default initialization constructor. More... | |
| virtual | ~DynaServo () |
| Destructor. | |
| virtual uint_t | GetModelNumber () const |
| Get servo model number. More... | |
| virtual uint_t | GetFirmwareVersion () const |
| Get servo firmware version. More... | |
| virtual const char * | GetModelName () const |
| Get servo model name string. More... | |
| virtual uint_t | GetServoId () const |
| Get servo id. More... | |
| virtual uint_t | GetServoMode () const |
| Get the servo operational mode. More... | |
| virtual uint_t | Has360PosInfo () const |
| Test if servo has 360 ° positioning information. More... | |
| virtual const DynaServoSpec_T & | GetSpecification () const |
| Get servo specification. More... | |
| virtual const DynaServoCfg_T & | GetConfiguration () const |
| Get servo configuration. More... | |
| virtual const DynaServoState_T & | GetState () const |
| Get servo state. More... | |
| bool | IsMaster () const |
| Test if this servo is a master. More... | |
| bool | IsLinkedMaster () const |
| Test if this servo is a linked master. More... | |
| bool | IsUnlinked () const |
| Test if this servo is unlinked. More... | |
| virtual const DynaServoLink_T | GetLinkInfo () const |
| Get linked information. More... | |
| virtual void | Link (uint_t uLinkType, DynaServo *pServoMate, bool bRotReversed) |
| Link this servo to another. More... | |
| virtual void | Unlink () |
| Unlink this servo. | |
| int | GetOdometer () |
| Get the current virtual odometer value. More... | |
| int | IsOdometerEnabled () |
| Test if virtual odometer mapping is enabled. More... | |
| int | GetOdometerZeroPt () |
| Get the virtual odometer zero point. More... | |
| bool | IsOdometerReversed () |
| Test if the virtual odometer is reversed. More... | |
| int | CalcOdometerAtEncMin () |
| Calculate the odometer value at the minimum (zero) encoder value. More... | |
| int | CalcOdometerAtEncMax () |
| Calculate the odometer value at the maximum encoder value. More... | |
| int | OdometerToEncoder (int nOdPos) |
| Convert virtual odometer units to servo encoder units. More... | |
| int | CalcSpeedDir (int nOdGoalPos) |
| Calculate serve direction to goal odometer position. More... | |
| virtual int | ResetOdometer (int nEncZeroPt, bool bIsReverse) |
| Reset the servo's virtual odometer. More... | |
| virtual int | UpdateOdometer (int nEncCurPos) |
| Update the odometer from the current servo position and rotation direction. More... | |
| virtual void | DisableOdometer () |
| Disable odometer mapping. More... | |
| virtual uint_t | GetAlarms () const |
| Get the current servo alarms. More... | |
| virtual uint_t | GetCurPos () const |
| Get the current servo position. More... | |
| virtual int | GetCurSpeed () const |
| Get the current servo speed. More... | |
| virtual int | GetGoalSpeed () const |
| Get the goal servo speed. More... | |
| virtual int | GetCurLoad () const |
| Get the current servo load. More... | |
| virtual uint_t | GetCurTemp () const |
| Get the current temperature. More... | |
| virtual uint_t | GetCurVolt () const |
| Get the current voltage. More... | |
| virtual void | SetSoftTorqueThresholds (uint_t uOverTorqueTh, uint_t uClearTorqueTh) |
| Set soft torque thresholds. More... | |
| virtual void | GetSoftTorqueThresholds (uint_t &uOverTorqueTh, uint_t &uClearTorqueTh) |
| Get soft torque thresholds. More... | |
| virtual void | SetSoftTorqueOverCond (bool bNewCond) |
| Set or clear servo in soft over torque condition. More... | |
| virtual bool | HasSoftTorqueOverCond () |
| Test if servo is in a soft over torque condition. More... | |
| virtual void | RegisterAgent (DynaAgent_T *pAgent, void *pAgentArg) |
| Register servo proxy agent. More... | |
| virtual void | UnregisterAgent () |
| Unregister servo proxy agent. | |
| virtual bool | HasAgent () |
| Tests if servo has a registered agent. More... | |
Static Public Attributes | |
| static const int | DYNA_MODEL_NUM = DYNA_MODEL_NUM_MX12W |
Static Public Attributes inherited from DynaServoGeneric | |
| static const int | DYNA_MODEL_NUM = DYNA_MODEL_NUM_GENERIC |
Protected Member Functions | |
| void | Init (int nServoid, uint_t uFwVer) |
| Initialize servo class instance. More... | |
| void | InitSpec () |
| Initialize servo fixed specification data. | |
Protected Member Functions inherited from DynaServoGeneric | |
| void | Init () |
| Initialize servo class instance. | |
| void | InitSpec () |
| Initialize servo fixed specification data. | |
| void | InitCfg () |
| Initialize servo configuration data. | |
| void | InitState () |
| Initialize servo state data. | |
| virtual void | CheckData () |
| Check data for consitencies. More... | |
| void | SetServoMode () |
| Set the servo mode given the servo capabilites and the current rotation limits. More... | |
| virtual int | CalcMatesGoalPos (int nGoalOdPos, int *pGoalOdPosMate) |
| Calculate the linked mate's goal position given this servo's goal position. More... | |
| virtual int | CalcMatesGoalSpeed (int nGoalSpeed) |
| Calculate the linked mate's speed speed given this servo's goal speed. More... | |
| virtual int | ReadCtlMethodCompliance (DynaServoCtlMethod_T *pCtlMethod) |
| Read from the servo state memory the current compliance control method parameters. More... | |
| virtual int | WriteCtlMethodCompliance (DynaServoCtlMethod_T &ctlMethod) |
| Write to the servo state memory the new compliance control method parameters. More... | |
| virtual int | ReadCtlMethodPid (DynaServoCtlMethod_T *pCtlMethod) |
| Read from the servo state memory the current PID control method parameters. More... | |
| virtual int | WriteCtlMethodPid (DynaServoCtlMethod_T &ctlMethod) |
| Write to the servo state memory the new PID control method parameters. More... | |
| virtual bool | ChkComplianceSlope (uint_t uVal) |
| Check validity of compliance slope discrete values. More... | |
| virtual uint_t | PackGoalSpeed (int nGoalSpeed) |
| Pack the goal speed into the control table value. More... | |
| virtual int | UnpackGoalSpeed (uint_t uVal) |
| Unpack goal speed from the control table value. More... | |
| virtual int | UnpackCurSpeed (uint_t uVal) |
| Unpack current speed from the control table value. More... | |
| virtual int | UnpackCurLoad (uint_t uVal) |
| Unpack current load estimate from the control table value. More... | |
Protected Member Functions inherited from DynaServo | |
| void | Init (int nServoId, uint_t uModelNum, uint_t uFwVer) |
| Initialize servo class instance. More... | |
| void | DumpCtlTbl (const char *sTblName, const DynaCtlTblEntry_T tblInfo[], size_t uSize) |
| Dump the servo control tabl values to stdout. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DynaServo | |
| static DynaServo * | New (DynaComm &comm, int nServoId) |
| Archetype constructor to create a new Dynamixel servo instance. More... | |
| static int | ReadModelNumber (DynaComm &comm, int nServoId, uint_t *pModelNum) |
| Read the servo model number from the servo's EEPROM. More... | |
| static int | ReadFirmwareVersion (DynaComm &comm, int nServoId, uint_t *pFwVer) |
| Read the servo's firmware version from the servo's EEPROM. More... | |
| static int | ReadServoId (DynaComm &comm, int nServoId, int *pServoId) |
| Read the servo's id from the servo's EEPROM. More... | |
| static int | WriteServoId (DynaComm &comm, int nServoId, int nNewServoId) |
| Write the new servo id to the servo's EEPROM. More... | |
| static int | ReadBaudRate (DynaComm &comm, int nServoId, int *pBaudRate) |
| Read the servo's baud rate from the servo's EEPROM. More... | |
| static int | WriteBaudRate (DynaComm &comm, int nServoId, int nNewBaudRate) |
| Write the new baud rate to the servo's EEPROM. More... | |
| static bool | Ping (DynaComm &comm, int nServoId) |
| Ping the given servo. More... | |
| static int | Reset (DynaComm &comm, int nServoId) |
| Reset the given servo back to default values. More... | |
Protected Attributes inherited from DynaServo | |
| DynaComm & | m_comm |
| attached Dynamixel bus comm. object | |
| int | m_nServoId |
| servo id | |
| DynaServoSpec_T | m_spec |
| servo specification | |
| DynaServoCfg_T | m_cfg |
| servo shadowed EEPROM configuration | |
| DynaServoState_T | m_state |
| servo shadowed RAM state | |
| CrossLink_T | m_link |
| servo cross linkage | |
| DynaAgent_T * | m_pAgent |
| servo agent | |
| void * | m_pAgentArg |
| servo agent callback argument | |
| int | m_nErrorCode |
| class instance errored state | |
MX-12W Dynamixel Servo Class.
The DynaServoMX12W class provides the specific interface to the MX-12W Dynamixel servos.
Definition at line 77 of file DynaServoMX12W.h.
|
inline |
Bare-bones initialization constructor.
May be used be derived classes to avoid undue communication and initializaton overhead.
| comm | Dynamixel bus communication instance. |
Definition at line 92 of file DynaServoMX12W.h.
References Dump(), DYNA_FWVER_NA, DynaServoGeneric::Init(), InitSpec(), and ~DynaServoMX12W().
| DynaServoMX12W::DynaServoMX12W | ( | DynaComm & | comm, |
| int | nServoId, | ||
| uint_t | uModelNum = DYNA_MODEL_NUM, |
||
| uint_t | uFwVer = DYNA_FWVER_NA |
||
| ) |
Initialization constructor.
| comm | Dynamixel bus communication instance. |
| nServoId | Servo Id. |
| uModelNum | Servo model number. |
| uFwVer | Servo firmware version. |
Definition at line 133 of file DynaServoMX12W.cxx.
References DynaServoGeneric::CheckData(), DynaServoGeneric::Init(), and DynaServoGeneric::SyncData().
|
protected |
Initialize servo class instance.
| nServoId | Servo Id. |
| uFwVer | Servo firmware version. |
Definition at line 167 of file DynaServoMX12W.cxx.
References DYNA_MODEL_NUM, DynaServo::Init(), DynaServoGeneric::InitCfg(), InitSpec(), and DynaServoGeneric::InitState().
|
static |
Model number
Definition at line 81 of file DynaServoMX12W.h.
Referenced by Init(), and DynaServo::New().