4 #define OWNER ((ExoTestMachine *)owner) 11 isAPressed =
new IsAPressed(
this);
12 endTraj =
new EndTraj(
this);
13 startButtonsPressed =
new StartButtonsPressed(
this);
14 startExo =
new StartExo(
this);
15 startSit =
new StartSit(
this);
16 startStand =
new StartStand(
this);
55 bool ExoTestMachine::EndTraj::check() {
56 return OWNER->trajectoryGenerator->isTrajectoryFinished();
58 bool ExoTestMachine::IsAPressed::check(
void) {
59 if (
OWNER->robot->keyboard.getA() ==
true) {
64 bool ExoTestMachine::StartButtonsPressed::check(
void) {
65 if (
OWNER->robot->keyboard.getW() ==
true) {
70 bool ExoTestMachine::StartExo::check(
void) {
71 if (
OWNER->robot->keyboard.getS() ==
true) {
72 std::cout <<
"LEAVING INIT and entering Sitting" << endl;
77 bool ExoTestMachine::StartStand::check(
void) {
78 if (
OWNER->robot->keyboard.getW() ==
true) {
84 bool ExoTestMachine::StartSit::check(
void) {
85 if (
OWNER->robot->keyboard.getW()) {
Example implementation of the Robot class, representing an X2 Exoskeleton, using DummyActuatedJoint a...
State for the ExoTestMachine (implementing ExoTestState) - representing when the exo is standing up (...
Example Implementation of TrajectoryGenerator. Includes only two trajectories (Sit-to-Stand and Stand...
void init()
start function for running any designed statemachine specific functions for example initialising robo...
State for the ExoTestMachine (implementing ExoTestState) - representing when the exoskeleton is sitti...
void hwStateUpdate()
Statemachine to hardware interface method. Run any hardware update methods that need to run every pro...
Initialisation State for the ExoTestMachine (implementing ExoTestState)
DummyTrajectoryGenerator * trajectoryGenerator
State for the ExoTestMachine (implementing ExoTestState) - representing when the exoskeleton is stand...
#define NewTransition(_from_, _event_, _to_)
Macro to create statemachine transitions. Add a tranition object to the from states arch list to a sp...
State for the ExoTestMachine (implementing ExoTestState) - representing when the exo is sitting down ...
void updateRobot()
update current state of the robot, including input and output devices. Overloaded Method from the Rob...
void initialize(State *i)
Sets the current state. Note: No check made.
bool initialise()
Initialize memory for the designed Robot classes specific Joint objects + sensors (if available) usin...