/*============================= FSM State =============================*/ #ifndef TRANSITIONDATA_H #define TRANSITIONDATA_H /** * Struct of relevant data that can be used during transition to pass * data between states. */ template struct TransitionData { EIGEN_MAKE_ALIGNED_OPERATOR_NEW TransitionData() { zero(); } // Zero out all of the data void zero() { // Flag to mark when transition is done done = false; // Timing parameters t0 = 0.0; // time that transition started tCurrent = 0.0; // current time since transition started tDuration = 0.0; // overall transition duration // Robot state at the beginning of transition comState0 = Vec12::Zero(); // center of mass state qJoints0 = Vec12::Zero(); // joint positions pFoot0 = Mat34::Zero(); // foot positions // Current robot state comState = Vec12::Zero(); // center of mass state qJoints = Vec12::Zero(); // joint positions pFoot = Mat34::Zero(); // foot positions } // Flag to mark when transition is done bool done = false; // Timing parameters T t0; // time that transition started T tCurrent; // current time since transition started T tDuration; // overall transition duration // Robot state at the beginning of transition Vec12 comState0; // center of mass state Vec12 qJoints0; // joint positions Mat34 pFoot0; // foot positions // Current robot state Vec12 comState; // center of mass state Vec12 qJoints; // joint positions Mat34 pFoot; // foot positions }; template struct TransitionData; template struct TransitionData; #endif // CONTROLFSM_H