Alex exoskeleton
ALEX SoftwareDocumentation
|
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive object through which commands are sent. More...
#include <ActuatedJoint.h>
Public Member Functions | |
ActuatedJoint (int jointID, double jointMin, double jointMax, Drive *drive) | |
Construct a new Actuated Joint object. More... | |
virtual ControlMode | setMode (ControlMode driveMode_, motorProfile profile) |
Set the mode of the device (nominally, position, velocity or torque control) More... | |
virtual setMovementReturnCode_t | setPosition (double desQ) |
Set the Position object. More... | |
virtual setMovementReturnCode_t | setVelocity (double velocity) |
Sets a velocity set point (in joint units) More... | |
virtual setMovementReturnCode_t | setTorque (double torque) |
Set the torque set point. More... | |
virtual void | readyToSwitchOn () |
Set the joint ready to switch On. More... | |
bool | enable () |
Enable the joint. More... | |
![]() | |
Joint (int jointID, double jointMin, double jointMax) | |
Construct a new Joint object. More... | |
Joint (int jointID, double jointMin, double jointMax, double q0) | |
Construct a new Joint object with initial value for the joint. More... | |
~Joint () | |
Destroy the Joint object. More... | |
int | getId () |
Get the Id object. More... | |
double | getQ () |
Returns the internal value of the joint (e.g. Angle, length, depending on joint type) More... | |
void | getStatus () |
prints out the status of the joints current position in degrees More... | |
virtual bool | updateValue ()=0 |
Updates the value of the joint. This will read the value from hardware, and update the software's current representation of the value. More... | |
virtual bool | initNetwork ()=0 |
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO messages for this joint. More... | |
Protected Member Functions | |
virtual int | toDriveUnits (double jointValue)=0 |
Converts from the joint value to the equivalent value for the drive. More... | |
virtual double | fromDriveUnits (int driveValue)=0 |
Converts from the drive value to the equivalent value for the joint. More... | |
Protected Attributes | |
Drive * | drive |
Contains a Drive object, which is a CANOpen device which is used to control the physical hardware. More... | |
ControlMode | driveMode = UNCONFIGURED |
The current mode of the drive. More... | |
![]() | |
const int | id |
double | q |
const double | qMin |
const double | qMax |
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive object through which commands are sent.
Definition at line 32 of file ActuatedJoint.h.
ActuatedJoint::ActuatedJoint | ( | int | jointID, |
double | jointMin, | ||
double | jointMax, | ||
Drive * | drive | ||
) |
Construct a new Actuated Joint object.
jointID | Unique ID representing the joint (not checked in this class) |
jointMin | Minimum allowable value for the joint |
jointMax | Maximum allowable value for the joint |
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.
Version 0.1 Date: 09/04/2020
Definition at line 16 of file ActuatedJoint.cpp.
bool ActuatedJoint::enable | ( | ) |
Enable the joint.
Definition at line 61 of file ActuatedJoint.cpp.
|
protectedpure virtual |
Converts from the drive value to the equivalent value for the joint.
Notes:
driveValue | The drive value to be converted |
Implemented in DummyActJoint.
|
virtual |
Set the joint ready to switch On.
Definition at line 57 of file ActuatedJoint.cpp.
|
virtual |
Set the mode of the device (nominally, position, velocity or torque control)
driveMode | The mode to be used if possible |
motorProfile | variables for desired mode, e.g. postion: v,a and deceleration. |
Definition at line 20 of file ActuatedJoint.cpp.
|
virtual |
Set the Position object.
desQ | The desired set position |
Reimplemented in DummyActJoint.
Definition at line 31 of file ActuatedJoint.cpp.
|
virtual |
Set the torque set point.
torque | The desired set position |
Definition at line 52 of file ActuatedJoint.cpp.
|
virtual |
Sets a velocity set point (in joint units)
velocity | The desired set position |
Definition at line 42 of file ActuatedJoint.cpp.
|
protectedpure virtual |
Converts from the joint value to the equivalent value for the drive.
Notes:
jointValue | The joint value to be converted |
Implemented in DummyActJoint.
|
protected |
Contains a Drive object, which is a CANOpen device which is used to control the physical hardware.
Definition at line 39 of file ActuatedJoint.h.
|
protected |
The current mode of the drive.
Definition at line 45 of file ActuatedJoint.h.