/*! * @file RobotController.h * @brief Parent class of user robot controllers. * This is an interface between the control code and the common hardware code */ #ifndef ROBOT_CONTROLLER_H #define ROBOT_CONTROLLER_H #include "Controllers/LegController.h" #include "Dynamics/FloatingBaseModel.h" #include "Controllers/StateEstimatorContainer.h" #include "Controllers/DesiredStateCommand.h" #include "SimUtilities/VisualizationData.h" #include "SimUtilities/GamepadCommand.h" /*! * Parent class of user robot controllers */ class RobotController{ friend class RobotRunner; public: RobotController(){} virtual ~RobotController(){} virtual void initializeController() = 0; /** * Called one time every control loop */ virtual void runController() = 0; virtual void updateVisualization() = 0; virtual ControlParameters* getUserControlParameters() = 0; virtual void Estop() {} protected: Quadruped* _quadruped = nullptr; FloatingBaseModel* _model = nullptr; LegController* _legController = nullptr; StateEstimatorContainer* _stateEstimator = nullptr; StateEstimate* _stateEstimate = nullptr; GamepadCommand* _driverCommand = nullptr; RobotControlParameters* _controlParameters = nullptr; DesiredStateCommand* _desiredStateCommand = nullptr; VisualizationData* _visualizationData = nullptr; RobotType _robotType; }; #endif