Alex exoskeleton
ALEX SoftwareDocumentation
Public Member Functions | Protected Attributes | List of all members
Joint Class Referenceabstract

Abstract class representing any joints within a Robot. More...

#include <Joint.h>

Inheritance diagram for Joint:
Inheritance graph
Collaboration diagram for Joint:
Collaboration graph

Public Member Functions

 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 Attributes

const int id
 
double q
 
const double qMin
 
const double qMax
 

Detailed Description

Abstract class representing any joints within a Robot.

The Joint class is a abstract class which represents a joint in a Robot objec. This class can be used to represent all types of joints, including actuated, non-actuated, revolute, prismatic, etc.

Version 0.1 Date: 07/04/2020

Definition at line 19 of file Joint.h.

Constructor & Destructor Documentation

Joint::Joint ( int  jointID,
double  jointMin,
double  jointMax 
)

Construct a new Joint object.

Parameters
jointIDThe joint ID for this object
jointMinThe minimum allowable value for this joint (below this will cause an error)
jointMaxThe maximum allowable value for this joint (above this will cause an error)

The Joint class is a abstract class which represents a joint in a Robot objec. This class can be used to represent all types of joints, including actuated, non-actuated, revolute, prismatic, etc.

Version 0.1 Date: 07/04/2020

Definition at line 16 of file Joint.cpp.

Joint::Joint ( int  jointID,
double  jointMin,
double  jointMax,
double  q0 
)

Construct a new Joint object with initial value for the joint.

Parameters
jointIDThe joint ID for this object
jointMinThe minimum allowable value for this joint (below this will cause an error)
jointMaxThe maximum allowable value for this joint (above this will cause an error)
q0Initial value of this joint

Definition at line 20 of file Joint.cpp.

Joint::~Joint ( )

Destroy the Joint object.

Definition at line 23 of file Joint.cpp.

Member Function Documentation

int Joint::getId ( )

Get the Id object.

Returns
int The ID used for the joint.

Definition at line 26 of file Joint.cpp.

double Joint::getQ ( )

Returns the internal value of the joint (e.g. Angle, length, depending on joint type)

NOTES:

  • This returns only a single double value. Implementations of this joint may choose to include other methods to return other states of the joint.
  • This does not necessarily reflect the actual value of the joint, it will only return the last value called by the updateValue() function. This allows for the update and use of the value to be updated independently (and potentially at different rates) such that the same value can be called multiple times in parallel.
Returns
double The current internal representation of the value of the joint

Definition at line 30 of file Joint.cpp.

void Joint::getStatus ( )

prints out the status of the joints current position in degrees

Definition at line 34 of file Joint.cpp.

virtual bool Joint::initNetwork ( )
pure virtual

Pure virtual function for initialising the underlying CANopen Network to send and recieve PDO messages for this joint.

Returns
true if successful
false if unsuccessful

Implemented in DummyActJoint.

virtual bool Joint::updateValue ( )
pure virtual

Updates the value of the joint. This will read the value from hardware, and update the software's current representation of the value.

Returns
true if successful
false if unsuccessful

Implemented in DummyActJoint.

Member Data Documentation

const int Joint::id
protected

An identifier for this joint. Note that this identifier is designed to be unique, but this is not managed by the joint class.

Definition at line 25 of file Joint.h.

double Joint::q
protected

The current state of the joint (i.e. the value), to be returned in SI units.

Definition at line 29 of file Joint.h.

const double Joint::qMax
protected

Definition at line 34 of file Joint.h.

const double Joint::qMin
protected

The allowable limits of the joint. This should represent the theoretical limits of the joint. Should these be exceeded, an error should be thrown.

Definition at line 34 of file Joint.h.


The documentation for this class was generated from the following files: