Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
robot.h
Go to the documentation of this file.
1 /*
2  * robot.h
3  *
4  * Created : 12/31/2018
5  * Author : n-is
6  * email : 073bex422.nischal@pcampus.edu.np
7  */
8 
9 #ifndef _ROBOT_H_
10 #define _ROBOT_H_
11 
12 #include "wheel.h"
13 #include "vec3.h"
14 
15 #include "actuator.h"
16 #include "processor.h"
17 #include "state_sensor.h"
18 
34 class Robot final
35 {
36 public:
37  Robot(Robot &&) = default;
38  Robot(const Robot &) = default;
39  Robot &operator=(Robot &&) = default;
40  Robot &operator=(const Robot &) = default;
41 
42  ~Robot() { }
43  static Robot& get_Instance();
44 
45  void read_Field();
46  int init(uint32_t dt_millis);
47  void update(uint32_t dt_millis);
48  void run(uint32_t dt_millis);
49  bool is_Initiated() const;
50 
51  void profile_Actuators(Vec3<float> vel, uint32_t dt_millis);
52  void check_Actuators();
53 
54 private:
58 
59  // Robot class makes sure that this variable is not modified by any other
60  // entity except the Processor
62 
67 
68  bool initiated_;
69  Robot() {
70  initiated_ = false;
71  }
72 };
73 
74 #endif // !_ROBOT_H_
void check_Actuators()
Definition: robot.cpp:182
bool is_Initiated() const
Definition: robot.cpp:172
Definition: processor.h:18
Vec3< float > state_
Definition: robot.h:63
void run(uint32_t dt_millis)
Definition: robot.cpp:164
int init(uint32_t dt_millis)
Definition: robot.cpp:56
void update(uint32_t dt_millis)
Definition: robot.cpp:140
Actuator * base_
Definition: robot.h:57
A Singleton class that handles all the robot's sequence.
Definition: robot.h:34
Robot & operator=(Robot &&)=default
bool initiated_
Definition: robot.h:68
Vec3< float > velocities_
Definition: robot.h:65
State_Sensor * sensor_
Definition: robot.h:55
Processor * cpu_
Definition: robot.h:56
State_Vars * robot_state_vars_
Definition: robot.h:61
Definition: state_sensor.h:20
void read_Field()
Definition: robot.cpp:47
Robot()
Definition: robot.h:69
Definition: robo_states.h:43
void profile_Actuators(Vec3< float > vel, uint32_t dt_millis)
Definition: robot.cpp:177
~Robot()
Definition: robot.h:42
Vec3< float > state_from_base_
Definition: robot.h:64
Vec3< float > psis_
Definition: robot.h:66
static Robot & get_Instance()
Definition: robot.cpp:29
Definition: actuator.h:15