Alex exoskeleton
ALEX SoftwareDocumentation
Public Member Functions | Public Attributes | Private Attributes | List of all members
ExoRobot Class Reference

Example implementation of the Robot class, representing an X2 Exoskeleton, using DummyActuatedJoint and DummyTrajectoryGenerator. More...

#include <ExoRobot.h>

Inheritance diagram for ExoRobot:
Inheritance graph
Collaboration diagram for ExoRobot:
Collaboration graph

Public Member Functions

 ExoRobot (TrajectoryGenerator *tj)
 Default ExoRobot constructor. Initialize memory for the Exoskelton Joint + sensors. Load in exoskeleton paramaters to TrajectoryGenerator.. More...
 
 ~ExoRobot ()
 
bool initPositionControl ()
 Initialises all joints to position control mode. More...
 
bool moveThroughTraj ()
 For each joint, move through(send appropriate commands to joints) the Currently generated trajectory of the TrajectoryGenerator object. More...
 
void startNewTraj ()
 Begin a new trajectory with the currently loaded trajectory paramaters. Using the ExoRobot current configuration (read in from joint objects) and the trajecotry generator object, generate and save a spline to move from current to desired position. More...
 
bool isTrajFinished ()
 
bool initialiseJoints ()
 Implementation of Pure Virtual function from Robot Base class. Create designed Joint and Driver objects and load into Robot joint vector. More...
 
bool initialiseNetwork ()
 Implementation of Pure Virtual function from Robot Base class. Initialize each Drive Objects underlying CANOpen Networking. More...
 
bool initialiseInputs ()
 Implementation of Pure Virtual function from Robot Base class. Initialize each Input Object. More...
 
void freeMemory ()
 Free robot objects vector pointer memory. More...
 
void updateRobot ()
 update current state of the robot, including input and output devices. Overloaded Method from the Robot Class. Example. for a keyboard input this would poll the keyboard for any button presses at this moment in time. More...
 
- Public Member Functions inherited from Robot
 Robot (TrajectoryGenerator *tj)
 Default Robot constructor. More...
 
 ~Robot ()
 
bool initialise ()
 Initialize memory for the designed Robot classes specific Joint objects + sensors (if available) using the pure virtual initialiseJoints() implemented by the robot designer. Based on the given Joints, initNetwork() will configure these joints for CAN PDO messaging and Load the specififed Controller, by default set to Positio. More...
 
void printStatus ()
 print out status of robot and all of its joints More...
 
void getJointStatus (int J_i)
 print out status of Joint J_i More...
 
void initialiseLog ()
 Initialises Logging to specified file. More...
 
void logDataPoint (std::string data)
 Log input data point to currently open log file. More...
 
bool closeLog ()
 Save and close any currently open logging files. More...
 

Public Attributes

Keyboard keyboard
 
vector< CopleyDrive * > copleyDrives
 
struct timeval tv tv_diff moving_tv tv_changed stationary_tv start_traj last_tv
 Timer Variables for moving through trajectories. More...
 
std::map< int, double > jointMinMap
 Joint Limit Map between Joint value and min Degrees possible. More...
 
std::map< int, double > jointMaxMap
 Joint Limit Map between Joint value and max Degrees possible. More...
 

Private Attributes

double currTrajProgress = 0
 
timespec prevTime
 
motorProfile posControlMotorProfile {4000000, 240000, 240000}
 motor drive position control profile paramaters More...
 

Additional Inherited Members

- Protected Attributes inherited from Robot
vector< Joint * > joints
 Vector of pointers to Abstract <class>Joint<class> Objects, number and type must be specified by Software design in <class>Robot<class> Implementation. Note: Use pointers to the joint objects here, so that the derived objects are not cast to Joint, truncating any of their explicit implementations. More...
 
vector< InputDevice * > inputs
 
TrajectoryGeneratortrajectoryGenerator
 Trajectory Generator. More...
 

Detailed Description

Example implementation of the Robot class, representing an X2 Exoskeleton, using DummyActuatedJoint and DummyTrajectoryGenerator.

The ExoRobot class represents an ExoSkeleton Robot in terms of its representation of the Alex exoskeleton hardware whose memory is managed in this class.

Version 0.1 Date: 07/04/2020

Definition at line 27 of file ExoRobot.h.

Constructor & Destructor Documentation

ExoRobot::ExoRobot ( TrajectoryGenerator tj)

Default ExoRobot constructor. Initialize memory for the Exoskelton Joint + sensors. Load in exoskeleton paramaters to TrajectoryGenerator..

Definition at line 5 of file ExoRobot.cpp.

ExoRobot::~ExoRobot ( )

Definition at line 8 of file ExoRobot.cpp.

Member Function Documentation

void ExoRobot::freeMemory ( )

Free robot objects vector pointer memory.

Definition at line 104 of file ExoRobot.cpp.

bool ExoRobot::initialiseInputs ( )
virtual

Implementation of Pure Virtual function from Robot Base class. Initialize each Input Object.

Implements Robot.

Definition at line 100 of file ExoRobot.cpp.

bool ExoRobot::initialiseJoints ( )
virtual

Implementation of Pure Virtual function from Robot Base class. Create designed Joint and Driver objects and load into Robot joint vector.

Implements Robot.

Definition at line 80 of file ExoRobot.cpp.

bool ExoRobot::initialiseNetwork ( )
virtual

Implementation of Pure Virtual function from Robot Base class. Initialize each Drive Objects underlying CANOpen Networking.

Implements Robot.

Definition at line 88 of file ExoRobot.cpp.

bool ExoRobot::initPositionControl ( )

Initialises all joints to position control mode.

Returns
true If all joints are successfully configured
false If some or all joints fail the configuration

Definition at line 16 of file ExoRobot.cpp.

bool ExoRobot::isTrajFinished ( )

Determine if the currently generated trajectory is complete.

Returns
bool
bool ExoRobot::moveThroughTraj ( )

For each joint, move through(send appropriate commands to joints) the Currently generated trajectory of the TrajectoryGenerator object.

Definition at line 45 of file ExoRobot.cpp.

void ExoRobot::startNewTraj ( )

Begin a new trajectory with the currently loaded trajectory paramaters. Using the ExoRobot current configuration (read in from joint objects) and the trajecotry generator object, generate and save a spline to move from current to desired position.

Definition at line 37 of file ExoRobot.cpp.

void ExoRobot::updateRobot ( )
virtual

update current state of the robot, including input and output devices. Overloaded Method from the Robot Class. Example. for a keyboard input this would poll the keyboard for any button presses at this moment in time.

Reimplemented from Robot.

Definition at line 115 of file ExoRobot.cpp.

Member Data Documentation

vector<CopleyDrive *> ExoRobot::copleyDrives

Definition at line 49 of file ExoRobot.h.

double ExoRobot::currTrajProgress = 0
private

Parameters associated with Trajectory Progression

Definition at line 32 of file ExoRobot.h.

std::map<int, double> ExoRobot::jointMaxMap
Initial value:
= {{LEFT_HIP, (HIP_MOTOR_POS1 * 1.5)},
{LEFT_ANKLE, -800000},
{RIGHT_ANKLE, -800000}}

Joint Limit Map between Joint value and max Degrees possible.

Parameters
intJoint value
Returns
int maxDeg

Definition at line 134 of file ExoRobot.h.

std::map<int, double> ExoRobot::jointMinMap
Initial value:
= {{LEFT_HIP, 0.0},
{RIGHT_HIP, 0.0},
{LEFT_KNEE, 0.0},
{RIGHT_KNEE, 0.0},
{LEFT_ANKLE, -800000},
{RIGHT_ANKLE, -800000}}

Joint Limit Map between Joint value and min Degrees possible.

Parameters
intJoint value
Returns
double minDeg

Definition at line 123 of file ExoRobot.h.

Keyboard ExoRobot::keyboard

Definition at line 48 of file ExoRobot.h.

struct timeval tv tv_diff moving_tv tv_changed stationary_tv start_traj ExoRobot::last_tv

Timer Variables for moving through trajectories.

Definition at line 55 of file ExoRobot.h.

motorProfile ExoRobot::posControlMotorProfile {4000000, 240000, 240000}
private

motor drive position control profile paramaters

Definition at line 38 of file ExoRobot.h.

timespec ExoRobot::prevTime
private

Definition at line 33 of file ExoRobot.h.


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