Cheetah Software  1.0
RobotRunner.h
Go to the documentation of this file.
1 
8 #ifndef PROJECT_ROBOTRUNNER_H
9 #define PROJECT_ROBOTRUNNER_H
10 
14 #include <SimUtilities/IMUTypes.h>
15 #include <gui_main_control_settings_t.hpp>
19 #include "Dynamics/Quadruped.h"
20 #include "JPosInitializer.h"
21 
24 #include "Utilities/PeriodicTask.h"
25 #include "cheetah_visualization_lcmt.hpp"
26 #include "state_estimator_lcmt.hpp"
27 #include <RobotController.h>
28 #include <lcm-cpp.hpp>
29 
30 class RobotRunner : public PeriodicTask {
31  public:
32  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
33 
34  RobotRunner(RobotController* , PeriodicTaskManager*, float, std::string);
36  void init() override;
37  void run() override;
38  void cleanup() override;
39 
40  // Initialize the state estimator with default no cheaterMode
41  void initializeStateEstimator(bool cheaterMode = false);
42  virtual ~RobotRunner();
43 
45 
57 
58  private:
59  float _ini_yaw;
60 
61  int iter = 0;
62 
63  void setupStep();
64  void finalizeStep();
65 
71  bool _cheaterModeEnabled = false;
73  lcm::LCM _lcm;
74  leg_control_command_lcmt leg_control_command_lcm;
75  state_estimator_lcmt state_estimator_lcm;
76  leg_control_data_lcmt leg_control_data_lcm;
77  // Contact Estimator to calculate estimated forces and contacts
78 
81 };
82 
83 #endif // PROJECT_ROBOTRUNNER_H
void finalizeStep()
SpiCommand * spiCommand
Definition: RobotRunner.h:51
TiBoardData * tiBoardData
Definition: RobotRunner.h:53
SpiData * spiData
Definition: RobotRunner.h:50
LegController< float > * _legController
Definition: RobotRunner.h:68
leg_control_data_lcmt leg_control_data_lcm
Definition: RobotRunner.h:76
Data structure containing parameters for quadruped robot.
VectorNavData * vectorNavData
Definition: RobotRunner.h:48
void initializeStateEstimator(bool cheaterMode=false)
Implementation of a periodic function running in a separate thread. Periodic tasks have a task manage...
void run() override
Definition: RobotRunner.cpp:67
EIGEN_MAKE_ALIGNED_OPERATOR_NEW RobotRunner(RobotController *, PeriodicTaskManager *, float, std::string)
Definition: RobotRunner.cpp:15
PeriodicTask(PeriodicTaskManager *taskManager, float period, std::string name)
TiBoardCommand * tiBoardCommand
Definition: RobotRunner.h:52
void init() override
Definition: RobotRunner.cpp:28
float _ini_yaw
Definition: RobotRunner.h:59
GamepadCommand * driverCommand
Definition: RobotRunner.h:46
CheetahVisualization * cheetahMainVisualization
Definition: RobotRunner.h:56
bool _cheaterModeEnabled
Definition: RobotRunner.h:71
RobotControlParameters * controlParameters
Definition: RobotRunner.h:54
void cleanup() override
JPosInitializer< float > * _jpos_initializer
Definition: RobotRunner.h:66
CheaterState< double > * cheaterState
Definition: RobotRunner.h:49
StateEstimate< float > _stateEstimate
Definition: RobotRunner.h:69
Common Leg Control Interface and Leg Control Algorithms.
Quadruped< float > _quadruped
Definition: RobotRunner.h:67
FloatingBaseModel< float > _model
Definition: RobotRunner.h:79
lcm::LCM _lcm
Definition: RobotRunner.h:73
The GamepadCommand type containing joystick information.
leg_control_command_lcmt leg_control_command_lcm
Definition: RobotRunner.h:74
uint64_t u64
Definition: cTypes.h:17
void setupStep()
StateEstimatorContainer< float > * _stateEstimator
Definition: RobotRunner.h:70
Types to allow remote access of control parameters, for use with LCM/Shared memory.
virtual ~RobotRunner()
RobotType
Definition: cppTypes.h:120
Data from IMUs.
VisualizationData * visualizationData
Definition: RobotRunner.h:55
u64 _iterations
Definition: RobotRunner.h:80
All Contact Estimation Algorithms.
state_estimator_lcmt state_estimator_lcm
Definition: RobotRunner.h:75
DesiredStateCommand< float > * _desiredStateCommand
Definition: RobotRunner.h:72
RobotController * _robot_ctrl
Definition: RobotRunner.h:44
RobotType robotType
Definition: RobotRunner.h:47