Definition at line 30 of file RobotRunner.h.
void RobotRunner::init |
( |
| ) |
|
|
overridevirtual |
Initializes the robot model, state estimator, leg controller, robot data, and any control logic specific data.
Implements PeriodicTask.
Definition at line 28 of file RobotRunner.cpp.
References RobotController::_controlParameters, RobotController::_driverCommand, _jpos_initializer, RobotController::_legController, _legController, RobotController::_model, _model, RobotController::_quadruped, _quadruped, _robot_ctrl, RobotController::_robotType, RobotController::_stateEstimate, _stateEstimate, RobotController::_stateEstimator, _stateEstimator, RobotController::_visualizationData, Quadruped< T >::buildModel(), cheaterState, controlParameters, LegController< T >::datas, driverCommand, RobotController::initializeController(), initializeStateEstimator(), MINI_CHEETAH, robotType, vectorNavData, and visualizationData.
29 printf(
"[RobotRunner] initialize\n");
LegController< float > * _legController
VisualizationData * _visualizationData
LegController< float > * _legController
VectorNavData * vectorNavData
void initializeStateEstimator(bool cheaterMode=false)
LegControllerData< T > datas[4]
GamepadCommand * driverCommand
StateEstimate< float > * _stateEstimate
RobotControlParameters * controlParameters
GamepadCommand * _driverCommand
RobotControlParameters * _controlParameters
JPosInitializer< float > * _jpos_initializer
CheaterState< double > * cheaterState
StateEstimatorContainer< float > * _stateEstimator
StateEstimate< float > _stateEstimate
FloatingBaseModel< float > * _model
Quadruped< float > _quadruped
FloatingBaseModel< float > _model
virtual void initializeController()=0
StateEstimatorContainer< float > * _stateEstimator
VisualizationData * visualizationData
Quadruped< float > * _quadruped
FloatingBaseModel< T > buildModel()
RobotController * _robot_ctrl
void RobotRunner::run |
( |
| ) |
|
|
overridevirtual |
Runs the overall robot control system by calling each of the major components to run each of their respective steps.
Implements PeriodicTask.
Definition at line 67 of file RobotRunner.cpp.
References _jpos_initializer, _legController, _robot_ctrl, _stateEstimate, _stateEstimator, cheetahMainVisualization, VisualizationData::clear(), LegController< T >::commands, LegController< T >::datas, finalizeStep(), JPosInitializer< T >::IsInitialized(), LegControllerCommand< T >::kdJoint, LegControllerCommand< T >::kpJoint, CheetahVisualization::p, StateEstimate< T >::position, CheetahVisualization::q, LegControllerData< T >::q, StateEstimatorContainer< T >::run(), RobotController::runController(), LegController< T >::setEnabled(), setupStep(), RobotController::updateVisualization(), and visualizationData.
76 static int count_ini(0);
80 }
else if (20 < count_ini && count_ini < 30) {
82 }
else if (40 < count_ini && count_ini < 50) {
91 kpMat << 5, 0, 0, 0, 5, 0, 0, 0, 5;
92 kdMat << 0.1, 0, 0, 0, 0.1, 0, 0, 0, 0.1;
94 for (
int leg = 0; leg < 4; leg++) {
110 for (
int leg = 0; leg < 4; leg++) {
111 for (
int joint = 0; joint < 3; joint++) {
bool IsInitialized(LegController< T > *)
LegController< float > * _legController
typename Eigen::Matrix< T, 3, 3 > Mat3
LegControllerData< T > datas[4]
virtual void runController()=0
CheetahVisualization * cheetahMainVisualization
void setEnabled(bool enabled)
JPosInitializer< float > * _jpos_initializer
virtual void updateVisualization()=0
void run(CheetahVisualization *visualization=nullptr)
StateEstimate< float > _stateEstimate
StateEstimatorContainer< float > * _stateEstimator
VisualizationData * visualizationData
RobotController * _robot_ctrl
LegControllerCommand< T > commands[4]