#include <real_robot.h>

Collaboration diagram for argos::CRealRobot:

Public Member Functions

 CRealRobot ()
 Class constructor. More...
 
virtual ~CRealRobot ()
 Class destructor. More...
 
virtual void Init (const std::string &str_conf_fname, const std::string &str_controller_id)
 Initializes the robot and the controller. More...
 
virtual void InitRobot ()=0
 Put your robot initialization code here. More...
 
virtual void Destroy ()=0
 Put your robot cleanup code here. More...
 
virtual CCI_ActuatorMakeActuator (const std::string &str_name)=0
 Creates an actuator given its name. More...
 
virtual CCI_SensorMakeSensor (const std::string &str_name)=0
 Creates a sensor given its name. More...
 
virtual void Sense (Real f_elapsed_time)=0
 Collect data from the sensors. More...
 
virtual void Control ()
 Execute the robot controller. More...
 
virtual void Act (Real f_elapsed_time)=0
 Send data to the actuators. More...
 
virtual void Execute ()
 Performs the main loop. More...
 

Static Public Member Functions

static void Cleanup (int)
 Cleanup function called when the controller is stopped. More...
 

Protected Attributes

CCI_Controllerm_pcController
 
ticpp::Document m_tConfiguration
 
TConfigurationNode m_tConfRoot
 
TConfigurationNodem_ptControllerConfRoot
 
Real m_fRate
 

Static Protected Attributes

static CRealRobotm_pcInstance = NULL
 

Detailed Description

Definition at line 9 of file real_robot.h.

Constructor & Destructor Documentation

◆ CRealRobot()

CRealRobot::CRealRobot ( )

Class constructor.

Definition at line 18 of file real_robot.cpp.

◆ ~CRealRobot()

CRealRobot::~CRealRobot ( )
virtual

Class destructor.

Definition at line 122 of file real_robot.cpp.

Member Function Documentation

◆ Act()

virtual void argos::CRealRobot::Act ( Real  f_elapsed_time)
pure virtual

Send data to the actuators.

◆ Cleanup()

void CRealRobot::Cleanup ( int  )
static

Cleanup function called when the controller is stopped.

Definition at line 164 of file real_robot.cpp.

◆ Control()

void CRealRobot::Control ( )
virtual

Execute the robot controller.

Definition at line 130 of file real_robot.cpp.

◆ Destroy()

virtual void argos::CRealRobot::Destroy ( )
pure virtual

Put your robot cleanup code here.

◆ Execute()

void CRealRobot::Execute ( )
virtual

Performs the main loop.

Definition at line 137 of file real_robot.cpp.

◆ Init()

void CRealRobot::Init ( const std::string &  str_conf_fname,
const std::string &  str_controller_id 
)
virtual

Initializes the robot and the controller.

Internally calls InitRobot() and InitController() in this order.

Definition at line 27 of file real_robot.cpp.

◆ InitRobot()

virtual void argos::CRealRobot::InitRobot ( )
pure virtual

Put your robot initialization code here.

◆ MakeActuator()

virtual CCI_Actuator* argos::CRealRobot::MakeActuator ( const std::string &  str_name)
pure virtual

Creates an actuator given its name.

Returns NULL if no actuator corresponds to that name.

◆ MakeSensor()

virtual CCI_Sensor* argos::CRealRobot::MakeSensor ( const std::string &  str_name)
pure virtual

Creates a sensor given its name.

Returns NULL if no sensor corresponds to that name.

◆ Sense()

virtual void argos::CRealRobot::Sense ( Real  f_elapsed_time)
pure virtual

Collect data from the sensors.

Member Data Documentation

◆ m_fRate

Real argos::CRealRobot::m_fRate
protected

Definition at line 83 of file real_robot.h.

◆ m_pcController

CCI_Controller* argos::CRealRobot::m_pcController
protected

Definition at line 79 of file real_robot.h.

◆ m_pcInstance

CRealRobot * CRealRobot::m_pcInstance = NULL
staticprotected

Definition at line 84 of file real_robot.h.

◆ m_ptControllerConfRoot

TConfigurationNode* argos::CRealRobot::m_ptControllerConfRoot
protected

Definition at line 82 of file real_robot.h.

◆ m_tConfiguration

ticpp::Document argos::CRealRobot::m_tConfiguration
protected

Definition at line 80 of file real_robot.h.

◆ m_tConfRoot

TConfigurationNode argos::CRealRobot::m_tConfRoot
protected

Definition at line 81 of file real_robot.h.