CORC Project
CANOpen Robot Controller Software Documentation
Joint.h
Go to the documentation of this file.
1 
11 #ifndef JOINT_H_INCLUDED
12 #define JOINT_H_INCLUDED
13 #include <iostream>
23 class Joint {
24  protected:
29  const int id;
33  double q;
37  double qd;
42  const double qMin, qMax;
43 
44  public:
52  Joint(int jointID, double jointMin, double jointMax);
53 
62  Joint(int jointID, double jointMin, double jointMax, double q0);
63 
68  ~Joint();
69 
75  int getId();
76 
90  double getQ();
104  double getQd();
109  void getStatus();
117  virtual bool updateValue() = 0;
125  virtual bool initNetwork() = 0;
126 };
127 
128 #endif
~Joint()
Destroy the Joint object.
Definition: Joint.cpp:23
const double qMin
Definition: Joint.h:42
Joint(int jointID, double jointMin, double jointMax)
Construct a new Joint object.
Definition: Joint.cpp:16
double q
Definition: Joint.h:33
double getQ()
Returns the internal value of the joint (e.g. Angle, length, depending on joint type) ...
Definition: Joint.cpp:30
double qd
Definition: Joint.h:37
void getStatus()
prints out the status of the joints current position in degrees
Definition: Joint.cpp:34
const int id
Definition: Joint.h:29
virtual bool updateValue()=0
Updates the value of the joint. This will read the value from hardware, and update the software&#39;s cur...
Abstract class representing any joints within a Robot.
Definition: Joint.h:23
virtual bool initNetwork()=0
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO message...
int getId()
Get the Id object.
Definition: Joint.cpp:26
double getQd()
Returns the internal value of the joint (e.g. del Angle, del length, depending on joint type) ...
const double qMax
Definition: Joint.h:42