Alex exoskeleton
ALEX SoftwareDocumentation
Joint.cpp
Go to the documentation of this file.
1 
11 #include "Joint.h"
12 
13 #include <iostream>
14 
15 #include "DebugMacro.h"
16 Joint::Joint(int jointID, double jointMin, double jointMax) : id(jointID), qMin(jointMin), qMax(jointMax) {
17  q = 0;
18 }
19 
20 Joint::Joint(int jointID, double jointMin, double jointMax, double q0) : id(jointID), qMin(jointMin), qMax(jointMax) {
21  q = q0;
22 }
24  DEBUG_OUT(" Joint object deleted")
25 }
26 int Joint::getId() {
27  return id;
28 }
29 
30 double Joint::getQ() {
31  return q;
32 }
33 
35  std::cout << "Joint ID " << id << " @ pos " << getQ() << " deg" << std::endl;
36 }
~Joint()
Destroy the Joint object.
Definition: Joint.cpp:23
const double qMin
Definition: Joint.h:34
Joint(int jointID, double jointMin, double jointMax)
Construct a new Joint object.
Definition: Joint.cpp:16
double q
Definition: Joint.h:29
double getQ()
Returns the internal value of the joint (e.g. Angle, length, depending on joint type) ...
Definition: Joint.cpp:30
void getStatus()
prints out the status of the joints current position in degrees
Definition: Joint.cpp:34
const int id
Definition: Joint.h:25
#define DEBUG_OUT(x)
Definition: DebugMacro.h:11
int getId()
Get the Id object.
Definition: Joint.cpp:26
const double qMax
Definition: Joint.h:34