53 #include "rnr/rnrconfig.h" 117 (
m_pChain[nServoId] != NULL))?
true:
false;
339 virtual int MoveTo(
int nServoId,
int nGoalOdPos);
408 virtual int MoveAtSpeedTo(
int nServoId,
int nGoalSpeed,
int nGoalOdPos);
472 virtual int MoveAtSpeed(
int nServoId,
int nGoalSpeed);
770 #endif // _DYNA_CHAIN_H RoadNarrows Dynamixel Bus Communications Abstract Base Class Interface.
int m_nServoIdMate
linked mate's servo id
Synchronous Write Speed Tuple Structure.
Synchronous Write Speed-Position Tuple Structure.
virtual int SyncWriteGoalSpeed(DynaSpeedTuple_T tuplesSpeed[], uint_t uCount)
Synchronous write new goal speed for servos.
virtual int SyncMoveTo(DynaPosTuple_T tuplesPos[], uint_t uCount)
Synchronous move servos to new goal positions in tuple list.
virtual ~DynaChain()
Destructor.
int GetLinkedMateId(int nServoId) const
Get linked mate.
virtual int Freeze()
Freeze all servos at current position.
virtual int MoveAtSpeedTo(int nServoId, int nGoalSpeed, int nGoalOdPos)
Move at speed to the goal postition.
virtual int vSyncMoveTo(uint_t uCount,...)
Synchronous move servos to new goal positions.
virtual int MoveAtSpeed(int nServoId, int nGoalSpeed)
Move at speed.
#define DYNA_LINK_MASTER
servo is linked, serving as the master
int m_nIIdx[DYNA_ID_NUMOF]
indirect index
const DynaServo * operator[](int nServoId)
Subscript operator.
DynaComm & m_comm
bus communication instance
void Init()
Initialize chain class instance.
bool IsUnlinked(int nServoId) const
Test if this servo is unlinked.
virtual uint_t GetNumberOfMastersInChain()
Get the number of servos currently in chain.
virtual int vSyncWriteGoalPos(uint_t uCount,...)
Synchronous write new goal positions for servos.
virtual int vSyncMoveAtSpeed(uint_t uCount,...)
Synchronous move servos at the given speeds.
virtual int MoveTo(int nServoId, int nGoalOdPos)
Move to the goal postition.
virtual int ChainEntryDelete(int nServoId)
Remove servo from chain and delete.
uint_t m_uNumInChain
number of servos in chain
bool IsLinkedMaster(int nServoId) const
Test if this servo is a linked master.
#define DYNA_ID_MIN
minimum servo id
virtual int vSyncWriteGoalSpeed(uint_t uCount,...)
Synchronous write new goal speed for for servos.
virtual int IterStartMaster(int *pIter)
Start iteration master servos over of entire servo chain.
#define DYNA_ID_NUMOF
number of unique servo id's
virtual int ChainEntryNew(int nServoId)
Create new dervied DyanServo object and insert into chain.
virtual int IterNextMaster(int *pIter)
Next iteration of master servos over of entire servo chain.
virtual uint_t GetNumberInChain() const
Get the number of servos currently in chain.
virtual int LinkServos(int nServoIdMaster, int nServoIdSlave, bool bIsReversed)
Software link two unlinked servos in a master-slave configuration.
#define DYNA_LINK_NONE
servo is not linked to another servo
DynaServoLink_T m_links[DYNA_ID_NUMOF]
servo linked info
Dynamixel Servo Abstract Base Class.
virtual void ClearLinkData(int nServoId)
Clear local link data for the given servo.
virtual int AddNewServosByScan()
Scan and add all discovered and created servos to the Dynamixel chain.
virtual int AddNewServoForced(int nServoId, uint_t uModelNum)
Force create and add a servo to the Dynamixel chain.
#define DYNA_ID_MAX
maximum servo id
virtual int SyncMoveAtSpeed(DynaSpeedTuple_T tuplesSpeed[], uint_t uCount)
Synchronous move servos at the given speeds.
virtual int SyncWriteTorqueEnable(bool bState)
Synchronous write to all of the servos in the chain to enable/disable applied torque.
virtual int Stop()
Stop all servos.
virtual int vSyncMoveAtSpeedTo(uint_t uCount,...)
Synchronous move servos to new goal positions at the given speeds.
virtual int Release()
Release all servos from any applied torque.
virtual int RemoveAllServos()
Remove all servos from chain and delete.
DynaServo * m_pChain[DYNA_ID_NUMOF]
chain of servos
virtual int IterStart(int *pIter)
Start iteration over of entire servo chain.
virtual DynaServo * GetServo(int nServoId)
Dynamixel Chain Container Base Class.
RoadNarrows Dynamixel Fundatmental Types.
#define DYNA_LINK_SLAVE
servo is linked, serving as the slave
virtual int SyncWriteGoalPos(DynaPosTuple_T tuplesPos[], uint_t uCount)
Synchronous write new goal positions for servos.
virtual bool HasServo(int nServoId) const
virtual void AuditLinks()
Audit servo links and repair or delete.
RoadNarrows Dynamixel Archetype Servo Abstract Base Class.
virtual int RemoveServo(int nServoId)
Remove from chain and delete.
bool IsLinkedSlave(int nServoId) const
Test if this servo is a linked slave.
RoadNarrows Dynamixel Top-Level Package Header File.
DynaChain(DynaComm &comm)
Default initialization constructor.
virtual bool IsMaster(int nServoId) const
Test if the servo is a master.
uint_t m_uNumMastersInChain
num of master servos in chain
#define DYNA_ID_NONE
no servo id
virtual int AddNewServo(int nServoId)
Create a new servo and add it to the Dynamixel chain.
virtual int EStop()
Emergency stop all servos.
virtual int UnlinkServos(int nServoIdMaster)
Unlink two software linked servos.
virtual int IterNext(int *pIter)
Next iteration over of entire servo chain.
virtual void SetLinkData(int nServoId, uint_t uLinkType, int nServoIdMate, bool bRotReversed)
Set local link data for the given servo.
Position Tuple Structure.
Linked Servos Configuration Info Structure.
virtual int SyncMoveAtSpeedTo(DynaSpeedPosTuple_T tuplesSpeedPos[], uint_t uCount)
Synchronous move servos to new goal positions at the given speeds.
RoadNarrows Dynamixel Library Error and Logging Routines.
Dynamixel Bus Communications Abstract Base Class.