Alex exoskeleton
ALEX SoftwareDocumentation
DummyActJoint.cpp
Go to the documentation of this file.
1 
11 #include "DummyActJoint.h"
12 
13 #include <iostream>
14 
15 #include "DebugMacro.h"
16 
17 DummyActJoint::DummyActJoint(int jointID, double jointMin, double jointMax, Drive *drive) : ActuatedJoint(jointID, jointMin, jointMax, drive) {
18  DEBUG_OUT("MY JOINT ID: " << this->id)
19  // Do nothing else
20 }
21 
23  drive->getPos();
24  q = lastQCommand;
25  return true;
26 }
27 
29  lastQCommand = desQ;
30  return ActuatedJoint::setPosition(desQ);
31 }
32 
34  DEBUG_OUT("Joint::initNetwork()")
35  if (drive->initPDOs()) {
36  return true;
37  } else {
38  return false;
39  }
40 }
42  return q;
43 }
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
Definition: Drive.h:93
bool initNetwork()
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO message...
A dummy class to test whether the actuated joint inheritence stuff works.
double q
Definition: Joint.h:29
double lastQCommand
Definition: DummyActJoint.h:24
virtual bool initPDOs()
Initialises a standard set of PDOs for the use of the drive. These are:
Definition: Drive.cpp:84
virtual int getPos()
Definition: Drive.cpp:37
setMovementReturnCode_t
Definition: ActuatedJoint.h:21
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive ob...
Definition: ActuatedJoint.h:32
DummyActJoint(int jointID, double jointMin, double jointMax, Drive *drive)
Drive * drive
Contains a Drive object, which is a CANOpen device which is used to control the physical hardware...
Definition: ActuatedJoint.h:39
virtual setMovementReturnCode_t setPosition(double desQ)
Set the Position object.
bool updateValue()
Updates the value of the joint. This will read the value from hardware, and update the software&#39;s cur...
#define DEBUG_OUT(x)
Definition: DebugMacro.h:11
setMovementReturnCode_t setPosition(double desQ)
Set the Position object.