CORC Project
CANOpen Robot Controller Software Documentation
DummyActJoint.h
Go to the documentation of this file.
1 
11 #ifndef DUMMYACTJOINT_H_INCLUDED
12 #define DUMMYACTJOINT_H_INCLUDED
13 
14 #include "ActuatedJoint.h"
15 
22 class DummyActJoint : public ActuatedJoint {
23  private:
24  double lastQCommand = 0;
25 
31  double fromDriveUnits(int driveValue) { return driveValue / 10000; };
32  int toDriveUnits(double jointValue) { return jointValue * 10000; };
33 
34  public:
35  DummyActJoint(int jointID, double jointMin, double jointMax, Drive *drive);
36  bool updateValue();
38  bool initNetwork();
39  double getQ();
40 };
41 
42 #endif
int toDriveUnits(double jointValue)
Converts from the joint value to the equivalent value for the drive.
Definition: DummyActJoint.h:32
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
Definition: Drive.h:105
bool initNetwork()
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO message...
Example implementation of the ActuatedJoints class.
Definition: DummyActJoint.h:22
The ActuatedJoint class is a abstract class which represents a joint in a Robot objec. This class implements the Joint class, and specifically represents a joint which is actuated. This therefore requires a Drive object which will be used to interact with the physical hardware.
double fromDriveUnits(int driveValue)
These functions are defined here for example In this implementation they do essentially nothing...
Definition: DummyActJoint.h:31
double lastQCommand
Definition: DummyActJoint.h:24
setMovementReturnCode_t
Definition: ActuatedJoint.h:35
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive ob...
Definition: ActuatedJoint.h:47
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:54
bool updateValue()
Updates the value of the joint. This will read the value from hardware, and update the software's cur...
setMovementReturnCode_t setPosition(double desQ)
Set the Position object.