#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 ()=0
 Collect data from the sensors. More...
 
virtual void Control ()
 Execute the robot controller. More...
 
virtual void Act ()=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 ( )

Class constructor.

Definition at line 18 of file real_robot.cpp.

CRealRobot::~CRealRobot ( )
virtual

Class destructor.

Definition at line 118 of file real_robot.cpp.

Member Function Documentation

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

Send data to the actuators.

void CRealRobot::Cleanup ( int  )
static

Cleanup function called when the controller is stopped.

Definition at line 151 of file real_robot.cpp.

void CRealRobot::Control ( )
virtual

Execute the robot controller.

Definition at line 126 of file real_robot.cpp.

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

Put your robot cleanup code here.

void CRealRobot::Execute ( )
virtual

Performs the main loop.

Definition at line 133 of file real_robot.cpp.

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.

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

Put your robot initialization code here.

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.

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.

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

Collect data from the sensors.

Member Data Documentation

Real argos::CRealRobot::m_fRate
protected

Definition at line 83 of file real_robot.h.

CCI_Controller* argos::CRealRobot::m_pcController
protected

Definition at line 79 of file real_robot.h.

CRealRobot * CRealRobot::m_pcInstance = NULL
staticprotected

Definition at line 84 of file real_robot.h.

TConfigurationNode* argos::CRealRobot::m_ptControllerConfRoot
protected

Definition at line 82 of file real_robot.h.

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

Definition at line 80 of file real_robot.h.

TConfigurationNode argos::CRealRobot::m_tConfRoot
protected

Definition at line 81 of file real_robot.h.