Khangai Robot Play - Naive  01
THe naive play of the Khangai Robot
Robot Class Referencefinal

A Singleton class that handles all the robot's sequence. More...

#include <robot.h>

Collaboration diagram for Robot:

Public Member Functions

 Robot (Robot &&)=default
 
 Robot (const Robot &)=default
 
Robotoperator= (Robot &&)=default
 
Robotoperator= (const Robot &)=default
 
 ~Robot ()
 
void read_Field ()
 
int init (uint32_t dt_millis)
 
void update (uint32_t dt_millis)
 
void run (uint32_t dt_millis)
 
bool is_Initiated () const
 
void profile_Actuators (Vec3< float > vel, uint32_t dt_millis)
 
void check_Actuators ()
 

Static Public Member Functions

static Robotget_Instance ()
 

Private Member Functions

 Robot ()
 

Private Attributes

State_Sensorsensor_
 
Processorcpu_
 
Actuatorbase_
 
State_Varsrobot_state_vars_
 
Vec3< float > state_
 
Vec3< float > state_from_base_
 
Vec3< float > velocities_
 
Vec3< float > psis_
 
bool initiated_
 

Detailed Description

A Singleton class that handles all the robot's sequence.

Robot class is responsible for handling all the sequence to be taken by the Khangai Robot in the game field.

Tasks that can be delegated to the Robot class :
1) Read the robot's state, i.e, the position and orientation of the robot
   using the available OrientationSensor and PositionSensor.
2) Determine the next action to be taken by the robot.
3) Give motor commands and tune the motors.
4) Stop the robot using the appropriate ramping.

Constructor & Destructor Documentation

◆ Robot() [1/3]

Robot::Robot ( Robot &&  )
default

◆ Robot() [2/3]

Robot::Robot ( const Robot )
default

◆ ~Robot()

Robot::~Robot ( )
inline

◆ Robot() [3/3]

Robot::Robot ( )
inlineprivate

Member Function Documentation

◆ check_Actuators()

void Robot::check_Actuators ( )
Here is the call graph for this function:

◆ get_Instance()

Robot & Robot::get_Instance ( )
static
Here is the call graph for this function:

◆ init()

int Robot::init ( uint32_t  dt_millis)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_Initiated()

bool Robot::is_Initiated ( ) const
Here is the caller graph for this function:

◆ operator=() [1/2]

Robot& Robot::operator= ( Robot &&  )
default

◆ operator=() [2/2]

Robot& Robot::operator= ( const Robot )
default

◆ profile_Actuators()

void Robot::profile_Actuators ( Vec3< float >  vel,
uint32_t  dt_millis 
)
Here is the call graph for this function:

◆ read_Field()

void Robot::read_Field ( )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void Robot::run ( uint32_t  dt_millis)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update()

void Robot::update ( uint32_t  dt_millis)
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ base_

Actuator* Robot::base_
private

◆ cpu_

Processor* Robot::cpu_
private

◆ initiated_

bool Robot::initiated_
private

◆ psis_

Vec3<float> Robot::psis_
private

◆ robot_state_vars_

State_Vars* Robot::robot_state_vars_
private

◆ sensor_

State_Sensor* Robot::sensor_
private

◆ state_

Vec3<float> Robot::state_
private

◆ state_from_base_

Vec3<float> Robot::state_from_base_
private

◆ velocities_

Vec3<float> Robot::velocities_
private

The documentation for this class was generated from the following files: