Alex exoskeleton
ALEX SoftwareDocumentation
CopleyDrive.cpp
Go to the documentation of this file.
1 
5 #include "CopleyDrive.h"
6 
7 #include <iostream>
8 
9 #include "DebugMacro.h"
10 
11 CopleyDrive::CopleyDrive(int NodeID) : Drive::Drive(NodeID) {
12  this->NodeID = NodeID;
13 }
15  DEBUG_OUT(" CopleyDrive Deleted ")
16 }
17 
19  return false;
20 }
21 
22 bool CopleyDrive::initPosControl(motorProfile posControlMotorProfile) {
23  DEBUG_OUT("NodeID " << NodeID << " Initialising Position Control")
24 
25  sendSDOMessages(generatePosControlConfigSDO(posControlMotorProfile));
26 
27  // \Todo set additional parameters (bit 5 in 0x6041 makes updates happen immediately)
28  return true;
29 }
30 
32  return true;
33 }
34 
36  return true;
37 }
~CopleyDrive()
Destroy the Copley Drive object.
Definition: CopleyDrive.cpp:14
CopleyDrive(int NodeID)
Construct a new Copley Drive object.
Definition: CopleyDrive.cpp:11
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
Definition: Drive.h:93
bool initVelControl()
Definition: CopleyDrive.cpp:31
int NodeID
The CAN Node ID used to address this particular drive on the CAN bus.
Definition: Drive.h:99
bool initTorqControl()
Definition: CopleyDrive.cpp:35
struct to hold desired velocity, acceleration and deceleration values for a drives motor controller p...
Definition: Drive.h:83
int sendSDOMessages(std::vector< std::string > messages)
messages Properly formatted SDO Messages
Definition: Drive.cpp:230
#define DEBUG_OUT(x)
Definition: DebugMacro.h:11
bool initPosControl(motorProfile posControlMotorProfile)
Definition: CopleyDrive.cpp:22
std::vector< std::string > generatePosControlConfigSDO(motorProfile positionProfile)
Generates the list of commands required to configure Position control in CANopen motor drive...
Definition: Drive.cpp:198