CORC Project
CANOpen Robot Controller Software Documentation
ActuatedJoint.h
Go to the documentation of this file.
1 
26 #ifndef ACTUATEDJOINT_H_INCLUDED
27 #define ACTUATEDJOINT_H_INCLUDED
28 #include "Drive.h"
29 #include "Joint.h"
30 
36  SUCCESS = 1,
40 };
41 
47 class ActuatedJoint : public Joint {
48  protected:
55 
61 
76  virtual int toDriveUnits(double jointValue) = 0;
77 
91  virtual double fromDriveUnits(int driveValue) = 0;
92 
93  public:
101  ActuatedJoint(int jointID, double jointMin, double jointMax, Drive *drive);
102 
110  virtual ControlMode setMode(ControlMode driveMode_, motorProfile profile);
111 
118  virtual setMovementReturnCode_t setPosition(double desQ);
119 
126  virtual setMovementReturnCode_t setVelocity(double velocity);
127 
134  virtual setMovementReturnCode_t setTorque(double torque);
135 
140  virtual void readyToSwitchOn();
141 
148  bool enable();
149 };
150 
151 #endif
Abstract class describing a Drive used to communicate with a CANbus device. Note that many functions ...
Definition: Drive.h:105
ControlMode
Definition: Drive.h:32
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:35
The Joint class is a abstract class which represents a joint in a Robot objec. This class can be used...
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive ob...
Definition: ActuatedJoint.h:47
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:54
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:94
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:60
The Drive class is used to interface with a CANOpen motor drive. According to the CiA402 standard...
bool enable()
Enable the joint.
Abstract class representing any joints within a Robot.
Definition: Joint.h:23