8#include <argos3/plugins/simulator/entities/magnet_equipped_entity.h>
16 m_pcMagnetEquippedEntity(nullptr) {
69 s_interface.Current = 0.0f;
78 "Michael Allwright [allsey87@gmail.com]",
80 "The (electro)magnet actuator.",
82 "This actuator is used to modify the magnetic field of a magnet entity in the\n"
83 "simulation. A magnetic entity has a passive and an active field. The overall\n"
84 "field of a magnetic entity is calculated as:\n\n"
85 " field = passive_field + (current x active_field)\n\n"
86 "This actuator allows you to set the current, a scalar multiplier of the active\n"
89 "REQUIRED XML CONFIGURATION\n\n"
93 " <my_controller ...>\n"
97 " <magnets implementation=\"default\"/>\n"
101 " </my_controller>\n"
103 " </controllers>\n\n"
105 "OPTIONAL XML CONFIGURATION\n\n"
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define REGISTER_ACTUATOR(CLASSNAME, LABEL, IMPLEMENTATION, AUTHOR, VERSION, BRIEF_DESCRIPTION, LONG_DESCRIPTION, STATUS)
Registers a new actuator model inside ARGoS.
The namespace containing all the ARGoS related code.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
virtual void Init(TConfigurationNode &t_node)
Initializes the actuator from the XML configuration tree.
Basic class for an entity that contains other entities.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
The exception that wraps all errors in ARGoS.
SInterface::TVector m_vecInterfaces
virtual void Reset()
Resets the actuator to the state it had just after Init().
virtual void Init(TConfigurationNode &t_tree)
Initializes the actuator from the XML configuration tree.
virtual void Update()
Updates the state of the entity associated to this actuator.
CMagnetsDefaultActuator()
CMagnetEquippedEntity * m_pcMagnetEquippedEntity
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
void SetCurrent(Real f_current)
Sets the current field of the magnet.
A container of CMagnetEntity.
CMagnetEntity & GetMagnet(UInt32 un_index)
Returns an magnet by numeric index.
SInstance::TVector & GetInstances()