8#include <argos3/core/simulator/simulator.h>
9#include <argos3/core/simulator/space/space.h>
10#include <argos3/plugins/simulator/media/led_medium.h>
32 m_fIntensity(f_intensity) {}
43 std::string strMedium;
58 "Carlo Pinciroli [ilpincy@gmail.com]",
61 "The light entity is an entity that emits a light detectable by a robot camera\n"
62 "(as a normal LED) or by light sensors. A light is bodyless, therefore it must\n"
63 "not be added to physics engines.\n"
64 "A light is characterized by a color and an intensity. The color of the light\n"
65 "is perceived by cameras. The intensity modifies the reading of the light\n"
66 "sensors. The higher the intensity, the closer the light is perceived.\n\n"
67 "REQUIRED XML CONFIGURATION\n\n"
70 " <light id=\"light0\"\n"
71 " position=\"0.4,2.3,0.25\"\n"
72 " orientation=\"0,0,0\"\n"
74 " intensity=\"1.0\"\n"
75 " medium=\"leds\"/>\n"
78 "The 'id' attribute is necessary and must be unique among the entities. If two\n"
79 "entities share the same id, initialization aborts.\n"
80 "The 'position' attribute specifies the position of the center of the light.\n"
81 "The attribute values are in the X,Y,Z order.\n"
82 "The 'orientation' attribute specifies the orientation of the light. At the\n"
83 "moment this attribute is mandatory but its value is ignored. In the future,\n"
84 "it will be used to implement a directional light.\n"
85 "The 'color' attribute specifies the color of the light.\n"
86 "The 'intensity' attribute sets the intensity of the light. When the value is\n"
87 "1.0, the light emits a normal amount of light. When it is 0.5 the amount of\n"
88 "light is half, and when the value is 2.0 the emission is doubled. The\n"
89 "intensity of the light affects the readings of the light sensors but not\n"
90 "those of the cameras.\n"
91 "The 'medium' attribute is used to add the light the corresponding LED medium.\n\n"
92 "OPTIONAL XML CONFIGURATION\n\n"
float Real
Collects all ARGoS code.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define REGISTER_STANDARD_SPACE_OPERATIONS_ON_ENTITY(ENTITY)
#define REGISTER_ENTITY(CLASSNAME, LABEL, AUTHOR, VERSION, BRIEF_DESCRIPTION, LONG_DESCRIPTION, STATUS)
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
static CSimulator & GetInstance()
Returns the instance to the CSimulator class.
T & GetMedium(const std::string &str_id)
Returns a reference to a medium.
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
void AddEntity(CLEDEntity &c_entity)
Adds the specified entity to the list of managed entities.