Alex exoskeleton
ALEX SoftwareDocumentation
|
Example implementation of the ActuatedJoints class. More...
#include <DummyActJoint.h>
Public Member Functions | |
DummyActJoint (int jointID, double jointMin, double jointMax, Drive *drive) | |
bool | updateValue () |
Updates the value of the joint. This will read the value from hardware, and update the software's current representation of the value. More... | |
setMovementReturnCode_t | setPosition (double desQ) |
Set the Position object. More... | |
bool | initNetwork () |
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO messages for this joint. More... | |
double | getQ () |
![]() | |
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 | 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... | |
Private Member Functions | |
double | fromDriveUnits (int driveValue) |
Converts from the drive value to the equivalent value for the joint. More... | |
int | toDriveUnits (double jointValue) |
Converts from the joint value to the equivalent value for the drive. More... | |
Private Attributes | |
double | lastQCommand = 0 |
Additional Inherited Members | |
![]() | |
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 |
Example implementation of the ActuatedJoints class.
Important to note the simple implementation between the driveValue and jointValue
Definition at line 22 of file DummyActJoint.h.
DummyActJoint::DummyActJoint | ( | int | jointID, |
double | jointMin, | ||
double | jointMax, | ||
Drive * | drive | ||
) |
Definition at line 17 of file DummyActJoint.cpp.
|
privatevirtual |
Converts from the drive value to the equivalent value for the joint.
Notes:
driveValue | The drive value to be converted |
Implements ActuatedJoint.
Definition at line 27 of file DummyActJoint.h.
double DummyActJoint::getQ | ( | ) |
Definition at line 41 of file DummyActJoint.cpp.
|
virtual |
Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO messages for this joint.
Implements Joint.
Definition at line 33 of file DummyActJoint.cpp.
|
virtual |
Set the Position object.
desQ | The desired set position |
Reimplemented from ActuatedJoint.
Definition at line 28 of file DummyActJoint.cpp.
|
privatevirtual |
Converts from the joint value to the equivalent value for the drive.
Notes:
jointValue | The joint value to be converted |
Implements ActuatedJoint.
Definition at line 28 of file DummyActJoint.h.
|
virtual |
Updates the value of the joint. This will read the value from hardware, and update the software's current representation of the value.
Implements Joint.
Definition at line 22 of file DummyActJoint.cpp.
|
private |
Definition at line 24 of file DummyActJoint.h.