ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
7 #ifndef CONTROLLABLE_ENTITY_H
8 #define CONTROLLABLE_ENTITY_H
11 class CControllableEntity;
12 class CSimulatedActuator;
13 class CSimulatedSensor;
16 #include <argos3/core/simulator/entity/entity.h>
17 #include <argos3/core/control_interface/ci_controller.h>
18 #include <argos3/core/utility/math/ray3.h>
33 typedef std::vector<CControllableEntity*>
TVector;
36 typedef std::map<std::string, CControllableEntity*>
TMap;
62 const std::string& str_id);
148 virtual void Sense();
179 const CRay3& c_ray) {
void GetPoint(CVector3 &c_point, Real f_t) const
virtual void ControlStep()
Executes CCI_Controller::ControlStep().
void AddIntersectionPoint(const CRay3 &c_ray, Real f_t_on_ray)
Adds an intersection point to the list.
The namespace containing all the ARGoS related code.
std::vector< std::pair< bool, CRay3 > > & GetCheckedRays()
Returns the list of checked rays.
Basic class for an entity that contains other entities.
std::map< std::string, CSimulatedActuator * > m_mapActuators
The map of actuators, indexed by actuator type (not implementation!)
virtual std::string GetTypeDescription() const
Returns a string label for this class.
CCI_Controller * m_pcController
The pointer to the associated controller.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
void AddCheckedRay(bool b_obstructed, const CRay3 &c_ray)
Adds a ray to the list of checked rays.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
std::vector< CVector3 > m_vecIntersectionPoints
The list of intersection points.
virtual void Act()
Executes the CSimulatedActuator::Update() method for all associated actuators.
virtual ~CControllableEntity()
Class destructor.
std::map< std::string, CSimulatedSensor * > m_mapSensors
The map of sensors, indexed by sensor type (not implementation!)
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or one of the standalone constructors ...
void SetController(const std::string &str_controller_id)
Creates and assigns a controller with the given id.
const CCI_Controller & GetController() const
Returns a reference to the associated controller.
std::vector< std::pair< bool, CRay3 > > m_vecCheckedRays
The list of checked rays.
CControllableEntity(CComposableEntity *pc_parent)
Class constructor.
virtual void Sense()
Executes the CSimulatedSensor::Update() method for all associated sensors.
std::vector< CVector3 > & GetIntersectionPoints()
Returns the list of intersection points.
An entity that contains a pointer to the user-defined controller.
float Real
Collects all ARGoS code.
std::map< std::string, CControllableEntity * > TMap
A map of controllable entities, indexed by id.
virtual void Destroy()
Destroys the entity, undoing whatever was done by Init() or by the standalone constructor.
The basic interface for a robot controller.
std::vector< CControllableEntity * > TVector
A vector of controllable entities.