ARGoS  3
A parallel, multi-engine simulator for swarm robotics
omnidirectional_camera_equipped_entity.cpp
Go to the documentation of this file.
2 #include <argos3/core/simulator/space/space.h>
3 
4 namespace argos {
5 
6  /****************************************/
7  /****************************************/
8 
10  CEntity(pc_parent) {
11  Disable();
12  }
13 
14  /****************************************/
15  /****************************************/
16 
18  const std::string& str_id,
19  const CRadians& c_aperture,
20  const CVector3& c_offset) :
21  CEntity(pc_parent, str_id),
22  m_cAperture(c_aperture),
23  m_cOffset(c_offset) {
24  Disable();
25  }
26 
27  /****************************************/
28  /****************************************/
29 
31  try {
32  CEntity::Init(t_tree);
33  GetNodeAttribute(t_tree, "aperture", m_cAperture);
34  GetNodeAttribute(t_tree, "offset", m_cOffset);
35  }
36  catch(CARGoSException& ex) {
37  THROW_ARGOSEXCEPTION_NESTED("Error initializing the omnidirectional camera equipped entity \"" << GetId() << "\"", ex);
38  }
39  }
40 
41  /****************************************/
42  /****************************************/
43 
45 
46  /****************************************/
47  /****************************************/
48 
49 }
argos::CEntity::GetId
const std::string & GetId() const
Returns the id of this entity.
Definition: entity.h:157
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CVector3
A 3D vector class.
Definition: vector3.h:29
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
argos::CComposableEntity
Basic class for an entity that contains other entities.
Definition: composable_entity.h:32
argos::CARGoSException
The exception that wraps all errors in ARGoS.
Definition: argos_exception.h:61
argos::COmnidirectionalCameraEquippedEntity::Init
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
Definition: omnidirectional_camera_equipped_entity.cpp:30
argos::REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY
REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(CEntity)
argos::COmnidirectionalCameraEquippedEntity
Definition: omnidirectional_camera_equipped_entity.h:21
argos::TConfigurationNode
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Definition: argos_configuration.h:27
argos::COmnidirectionalCameraEquippedEntity::COmnidirectionalCameraEquippedEntity
COmnidirectionalCameraEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
Definition: omnidirectional_camera_equipped_entity.cpp:9
THROW_ARGOSEXCEPTION_NESTED
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
Definition: argos_exception.h:115
argos::CEntity
The basic entity type.
Definition: entity.h:89
argos::CEntity::Disable
void Disable()
Disables the entity.
Definition: entity.h:249
argos::GetNodeAttribute
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
Definition: argos_configuration.h:208
omnidirectional_camera_equipped_entity.h
argos::CEntity::Init
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
Definition: entity.cpp:36