Alex exoskeleton
ALEX SoftwareDocumentation
ActuatedJoint.h
Go to the documentation of this file.
1 
12 #ifndef ACTUATEDJOINT_H_INCLUDED
13 #define ACTUATEDJOINT_H_INCLUDED
14 #include "Drive.h"
15 #include "Joint.h"
16 
22  SUCCESS = 1,
26 };
27 
32 class ActuatedJoint : public Joint {
33  protected:
40 
46 
61  virtual int toDriveUnits(double jointValue) = 0;
62 
76  virtual double fromDriveUnits(int driveValue) = 0;
77 
78  public:
86  ActuatedJoint(int jointID, double jointMin, double jointMax, Drive *drive);
87 
95  virtual ControlMode setMode(ControlMode driveMode_, motorProfile profile);
96 
103  virtual setMovementReturnCode_t setPosition(double desQ);
104 
111  virtual setMovementReturnCode_t setVelocity(double velocity);
112 
119  virtual setMovementReturnCode_t setTorque(double torque);
120 
125  virtual void readyToSwitchOn();
126 
133  bool enable();
134 };
135 
136 #endif
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
Definition: Drive.h:93
ControlMode
Definition: Drive.h:25
virtual int toDriveUnits(double jointValue)=0
Converts from the joint value to the equivalent value for the drive.
virtual double fromDriveUnits(int driveValue)=0
Converts from the drive value to the equivalent value for the joint.
virtual ControlMode setMode(ControlMode driveMode_, motorProfile profile)
Set the mode of the device (nominally, position, velocity or torque control)
virtual void readyToSwitchOn()
Set the joint ready to switch On.
virtual setMovementReturnCode_t setTorque(double torque)
Set the torque set point.
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
ActuatedJoint(int jointID, double jointMin, double jointMax, Drive *drive)
Construct a new Actuated Joint object.
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.
struct to hold desired velocity, acceleration and deceleration values for a drives motor controller p...
Definition: Drive.h:83
virtual setMovementReturnCode_t setVelocity(double velocity)
Sets a velocity set point (in joint units)
ControlMode driveMode
The current mode of the drive.
Definition: ActuatedJoint.h:45
bool enable()
Enable the joint.
Abstract class representing any joints within a Robot.
Definition: Joint.h:19