ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
7 #ifndef LED_EQUIPPED_ENTITY_H
8 #define LED_EQUIPPED_ENTITY_H
11 class CLEDEquippedEntity;
15 #include <argos3/core/simulator/entity/composable_entity.h>
16 #include <argos3/plugins/simulator/entities/led_entity.h>
42 typedef std::map<std::string, CLEDEquippedEntity*>
TMap;
47 typedef std::vector<SActuator*>
TList;
72 const std::string& str_id);
138 "CLEDEquippedEntity::GetLEDOffset() : index " <<
140 " out of bounds [0:" <<
143 return m_tLEDs[un_idx]->Offset;
void AddLEDRing(const CVector3 &c_center, Real f_radius, const CRadians &c_start_angle, UInt32 un_num_leds, SAnchor &s_anchor, const CColor &c_color=CColor::BLACK)
Adds a ring of LEDs to this entity.
CLEDEntity & GetLED(UInt32 un_index)
Returns an LED by numeric index.
CLEDEquippedEntity(CComposableEntity *pc_parent)
Class constructor.
The namespace containing all the ARGoS related code.
SActuator::TList m_tLEDs
List of the LEDs managed by this entity.
void SetAllLEDsColors(const CColor &c_color)
Sets the color of all the LEDs to the same value.
It defines the basic type CRadians, used to store an angle value in radians.
Basic class for an entity that contains other entities.
virtual void Reset()
Resets the state of the entity to whatever it was after Init() or the standalone constructor was call...
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
A container of CLEDEntity.
std::map< std::string, CLEDEquippedEntity * > TMap
SActuator(CLEDEntity &c_led, const CVector3 &c_offset, SAnchor &s_anchor)
An anchor related to the body of an entity.
~CLEDEquippedEntity()
Class destructor.
void AddToMedium(CLEDMedium &c_medium)
Adds the LEDs to the wanted LED medium.
SActuator::TList & GetLEDs()
Returns all the LEDs.
std::vector< SActuator * > TList
void SetLEDColor(UInt32 un_index, const CColor &c_color)
Sets the color of an LED.
virtual void UpdateComponents()
Calls the Update() method on all the components.
const CVector3 & GetLEDOffset(size_t un_idx) const
Returns the offset position of the given LED.
#define ARGOS_ASSERT(condition, message)
When code is compiled in debug, this macro throws an ARGoS exception with the passed message if the s...
void SetLEDOffset(UInt32 un_index, const CVector3 &c_offset)
Sets the position of an LED.
unsigned int UInt32
32-bit unsigned integer.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
float Real
Collects all ARGoS code.
virtual std::string GetTypeDescription() const
Returns a string label for this class.
void AddLED(const CVector3 &c_offset, SAnchor &s_anchor, const CColor &c_color=CColor::BLACK)
Adds an LED to this entity.
void RemoveFromMedium()
Removes the LEDs from the associated LED medium.