51 #ifndef _DYNA_SERVO_GENERIC_H 52 #define _DYNA_SERVO_GENERIC_H 54 #include "rnr/rnrconfig.h" 105 uint_t uModelNum = DYNA_MODEL_NUM,
141 return (
float)uVolts / 10.0;
223 virtual int MoveTo(
int nGoalOdPos);
588 virtual int ReadLed(
bool *pState);
923 virtual int Read(uint_t uAddr, uint_t *pVal);
939 virtual int Write(uint_t uAddr, uint_t uVal);
1207 #endif // _DYNA_SERVO_GENERIC_H RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
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.
virtual void Dump()
Dump contents of the servo EEPROM and RAM control tables.
virtual int CfgReadAlarmShutdownMask(uint_t *pAlarmMask)
Read from the servo configuration EEPROM the current servo shutdown on alarms mask.
virtual int MoveTo(int nGoalOdPos)
Move to the goal postition.
#define DYNA_MODEL_NUM_GENERIC
generic, base model
virtual int ReadGoalSpeed(int *pGoalSpeed)
Read from the servo state memory the current goal speed and direction.
virtual int CfgReadServoMode(uint_t *pServoMode)
Read from the servo configuration EEPROM to determine the servo operational mode. ...
virtual int WriteCtlMethodCompliance(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new compliance control method parameters.
static const int DYNA_MODEL_NUM
virtual int UnpackCurSpeed(uint_t uVal)
Unpack current speed from the control table value.
virtual int ReadCurLoad(int *pCurLoad)
Read from the servo state memory the current load.
virtual int Reset()
Reset this servo back to default values.
virtual int CfgWriteAlarmShutdownMask(uint_t uAlarmMask)
Write to the servo configuration EEPROM the new servo shutdown on alarms mask.
#define DYNA_FWVER_NA
firmware version not available
virtual float CvtRawTempToC(uint uTemp)
Convert raw temperature coding to degrees Celsius.
virtual int MoveAtSpeed(int nGoalSpeed)
Move at speed.
void Init()
Initialize servo class instance.
virtual bool ChkComplianceSlope(uint_t uVal)
Check validity of compliance slope discrete values.
virtual int WriteGoalSpeed(int nGoalSpeed)
Write to the servo state memory the new goal speed and direction.
virtual ~DynaServoGeneric()
Destructor.
virtual float CvtRawVoltToVolts(uint uVolts)
Convert raw volts coding to volts.
virtual int AgentWriteGoalPos(int nGoalOdPos)
Agent write to the servo state memory to set the new goal position.
Dynamixel Servo Abstract Base Class.
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.
virtual int CalcMatesGoalPos(int nGoalOdPos, int *pGoalOdPosMate)
Calculate the linked mate's goal position given this servo's goal position.
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.
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 int WriteLed(bool bState)
Write to the servo state memory to turn on or off the servo LED.
DynaServoGeneric(DynaComm &comm)
Bare-bones initialization constructor.
virtual int SyncState()
Synchronize the shadowed state data to the servo control table RAM state.
void SetServoMode()
Set the servo mode given the servo capabilites and the current rotation limits.
Generic Dynamixel Servo Base Class.
virtual int MoveAtSpeedTo(int nGoalSpeed, int nGoalOdPos)
Move at speed to the goal postition.
void InitCfg()
Initialize servo configuration data.
virtual int CfgWriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo configuration EEPROM the new on power-up maximum torque limit. ...
void InitState()
Initialize servo state data.
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.
virtual int CfgReadTemperatureLimit(uint_t *pTempLim)
Read from the servo configuration EEPROM the current maximum temperature limit.
CrossLink_T m_link
servo cross linkage
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
virtual void CheckData()
Check data for consitencies.
virtual int AgentWriteGoalSpeed(int nGoalSpeed)
Agent write to the servo state memory to set the new goal speed.
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.
virtual int SyncData()
Synchronize the shadowed configuration and state data to the servo control table. ...
RoadNarrows Dynamixel Top-Level Package Header File.
virtual bool Ping()
Ping this servo.
virtual uint_t PackGoalSpeed(int nGoalSpeed)
Pack the goal speed into the control table value.
virtual int Read(uint_t uAddr, uint_t *pVal)
virtual int AgentWriteGoalSpeedPos(int nGoalSpeed, int nGoalOdPos)
Agent write to the servo state memory to set the new goal position and speed.
virtual int ReloadMaxTorqueLimit()
Reload the maximum torque limit from the configuration.
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.
virtual int WriteMaxTorqueLimit(uint_t uMaxTorqueLim)
Write to the servo state memory to set the new maximum torque limit.
#define DYNA_ID_NONE
no servo id
virtual int ReadDynamics(int *pCurPos, int *pCurSpeed, int *pCurLoad)
Read from the servo state memory the current servo dynamics.
virtual int Stop()
Stop servo.
virtual int Write(uint_t uAddr, uint_t uVal)
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.
virtual int CfgWriteServoModeContinuous()
Write to the servo configuration EEPROM to set the servo operational mode to the full/continuous mode...
virtual int CfgWriteRotationLimits(uint_t uCwLim, uint_t uCcwLim)
Write to the servo configuration EEPROM the new rotation limits.
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.
RoadNarrows Dynamixel Library Error and Logging Routines.
virtual int WriteCtlMethodPid(DynaServoCtlMethod_T &ctlMethod)
Write to the servo state memory the new PID control method parameters.
void InitSpec()
Initialize servo fixed specification data.
Dynamixel Bus Communications Abstract Base Class.
virtual int CalcMatesGoalSpeed(int nGoalSpeed)
Calculate the linked mate's speed speed given this servo's goal speed.
virtual int CfgReadVoltageLimits(uint_t *pMinVoltLim, uint_t *pMaxVoltLim)
Read from the servo configuration EEPROM the current voltage limits.