16 #ifndef DRIVE_H_INCLUDED 17 #define DRIVE_H_INCLUDED 68 static std::map<OD_Entry_t, int> OD_Addresses = {
82 static std::map<OD_Entry_t, int> OD_Data_Size = {
121 std::vector<std::string> generateTPDOConfigSDO(std::vector<OD_Entry_t> items,
int PDO_Num,
int SyncRate);
131 std::vector<std::string> generateRPDOConfigSDO(std::vector<OD_Entry_t> items,
int PDO_Num,
int UpdateTiming);
147 std::vector<std::string> generatePosControlConfigSDO(
motorProfile positionProfile);
163 std::vector<std::string> generateVelControlConfigSDO(
motorProfile velocityProfile);
171 sendSDOMessages(std::vector<std::string> messages);
223 virtual bool Init() = 0;
238 virtual bool initPDOs();
250 virtual bool initPosControl(
motorProfile posControlMotorProfile) = 0;
260 virtual bool initVelControl(
motorProfile velControlMotorProfile) = 0;
270 virtual bool initTorqControl() = 0;
277 virtual int updateDriveStatus();
285 virtual bool setPos(
int position);
293 virtual bool setVel(
int velocity);
301 virtual bool setTorque(
int torque);
308 virtual int getPos();
315 virtual int getVel();
322 virtual int getTorque();
334 virtual bool readyToSwitchOn();
345 virtual bool enable();
356 virtual bool disable();
364 virtual bool posControlConfirmSP();
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
int error
Current error state of the drive.
int NodeID
The CAN Node ID used to address this particular drive on the CAN bus.
struct to hold desired velocity, acceleration and deceleration values for a drives motor controller p...
virtual ~Drive()
Destroy the Drive object.
int statusWord
Current status word of the drive.