#ifndef FSM_STATE_LOCOMOTION_H #define FSM_STATE_LOCOMOTION_H #include #include "FSM_State.h" template class WBC_Ctrl; template class LocomotionCtrlData; /** * */ template class FSM_State_Locomotion : public FSM_State { public: EIGEN_MAKE_ALIGNED_OPERATOR_NEW FSM_State_Locomotion(ControlFSMData* _controlFSMData); // Behavior to be carried out when entering a state void onEnter(); // Run the normal behavior for the state void run(); // Checks for any transition triggers FSM_StateName checkTransition(); // Manages state specific transitions TransitionData transition(); // Behavior to be carried out when exiting a state void onExit(); private: // Keep track of the control iterations int iter = 0; ConvexMPCLocomotion* cMPCOld; WBC_Ctrl * _wbc_ctrl; LocomotionCtrlData * _wbc_data; // Parses contact specific controls to the leg controller void LocomotionControlStep(); bool locomotionSafe(); // Impedance control for the stance legs during locomotion void StanceLegImpedanceControl(int leg); }; #endif // FSM_STATE_LOCOMOTION_H