17 DEBUG_OUT(
"Initialising Position Control on all joints ")
18 bool returnValue =
true;
31 for (
auto p : joints) {
42 clock_gettime(CLOCK_MONOTONIC, &
prevTime);
46 bool returnValue =
true;
49 clock_gettime(CLOCK_MONOTONIC, &currTime);
51 double elapsedSec = currTime.tv_sec -
prevTime.tv_sec + (currTime.tv_nsec -
prevTime.tv_nsec) / 1e9;
64 std::cout <<
"Joint ID " << p->getId() <<
": is not in Position Control " << std::endl;
66 }
else if (setPosCode !=
SUCCESS) {
68 std::cout <<
"Joint " << p->getId() <<
": Unknown Error " << std::endl;
89 DEBUG_OUT(
"ExoRobot::initialiseNetwork()");
92 for (
auto joint :
joints) {
93 status = joint->initNetwork();
107 DEBUG_OUT(
"Delete Joint ID: " << p->getId())
111 DEBUG_OUT(
"Delete Drive Node: " << p->getNodeID())
void freeMemory()
Free robot objects vector pointer memory.
bool initPositionControl()
Initialises all joints to position control mode.
TrajectoryGenerator * trajectoryGenerator
Trajectory Generator.
vector< CopleyDrive * > copleyDrives
virtual std::vector< double > getSetPoint(double time)=0
Get the next step point in the trajectory.
void updateInput()
defintion of <class>Input</class> pure virtual function. Updates the keyboard input devices memory st...
Abstract Class representing a robot. Includes vectors of Joint and InputDevice.
bool initialiseNetwork()
Implementation of Pure Virtual function from Robot Base class. Initialize each Drive Objects underlyi...
Example implementation of the ActuatedJoints class.
Example InputDevice which takes input in from a keyboard. Useful for testing without any other input ...
bool initialiseJoints()
Implementation of Pure Virtual function from Robot Base class. Create designed Joint and Driver objec...
vector< Joint * > joints
Vector of pointers to Abstract <class>Joint<class> Objects, number and type must be specified by Soft...
bool moveThroughTraj()
For each joint, move through(send appropriate commands to joints) the Currently generated trajectory ...
Abstract class representing an actuated joint in a Robot Class (extending joint). Requires a Drive ob...
motorProfile posControlMotorProfile
motor drive position control profile paramaters
An implementation of the Drive Object, specifically for Copley-branded devices (currently used on the...
ExoRobot(TrajectoryGenerator *tj)
Default ExoRobot constructor. Initialize memory for the Exoskelton Joint + sensors. Load in exoskeleton paramaters to TrajectoryGenerator..
Abstract class which is used to generate trajectorys for a Robot to follow.
vector< InputDevice * > inputs
void startNewTraj()
Begin a new trajectory with the currently loaded trajectory paramaters. Using the ExoRobot current co...
virtual void updateRobot()
Update all of this Robot software joint positions from object dictionary entries. ...
std::map< int, double > jointMaxMap
Joint Limit Map between Joint value and max Degrees possible.
void updateRobot()
update current state of the robot, including input and output devices. Overloaded Method from the Rob...
bool initialiseInputs()
Implementation of Pure Virtual function from Robot Base class. Initialize each Input Object...
std::map< int, double > jointMinMap
Joint Limit Map between Joint value and min Degrees possible.