8 #include <argos3/plugins/simulator/entities/rotor_equipped_entity.h>
9 #include <argos3/core/utility/logging/argos_log.h>
10 #include <argos3/core/utility/plugins/factory.h>
18 m_pcRotorEquippedEntity(NULL),
20 m_fNoiseStdDeviation(0.0f) {
30 THROW_ARGOSEXCEPTION(
"The mini-quadrotor rotor actuator can be associated only to a mini-quadrotor");
96 "miniquadrotor_rotor",
"default",
97 "Carlo Pinciroli [ilpincy@gmail.com]",
99 "The mini-quadrotor rotor actuator.",
100 "This actuator controls the four rotors of a mini-quadrotor robot. For a\n"
101 "complete description of its usage, refer to the\n"
102 "ci_miniquadrotor_rotor_actuator.h file.\n\n"
103 "REQUIRED XML CONFIGURATION\n\n"
106 " <my_controller ...>\n"
110 " <miniquadrotor_rotor implementation=\"default\" />\n"
114 " </my_controller>\n"
116 " </controllers>\n\n"
117 "OPTIONAL XML CONFIGURATION\n\n"
118 "It is possible to specify noisy speed in order to match the characteristics\n"
119 "of the real robot. This can be done with the attribute: 'noise_std_dev',\n"
120 "which indicates the standard deviation of a gaussian noise applied to the\n"
121 "desired velocity of the rotor:\n\n"
124 " <my_controller ...>\n"
128 " <miniquadrotor_rotor implementation=\"default\"\n"
129 " noise_std_dev=\"1\" />\n"
133 " </my_controller>\n"
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
REGISTER_ACTUATOR(CMiniQuadrotorRotorDefaultActuator, "miniquadrotor_rotor", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The mini-quadrotor rotor actuator.", "This actuator controls the four rotors of a mini-quadrotor robot. For a\n" "complete description of its usage, refer to the\n" "ci_miniquadrotor_rotor_actuator.h file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <miniquadrotor_rotor implementation=\"default\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n\n" "OPTIONAL XML CONFIGURATION\n\n" "It is possible to specify noisy speed in order to match the characteristics\n" "of the real robot. This can be done with the attribute: 'noise_std_dev',\n" "which indicates the standard deviation of a gaussian noise applied to the\n" "desired velocity of the rotor:\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <miniquadrotor_rotor implementation=\"default\"\n" " noise_std_dev=\"1\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n", "Usable")
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.
const std::string & GetId() const
Returns the id of this entity.
The exception that wraps all errors in ARGoS.
static CRNG * CreateRNG(const std::string &str_category)
Creates a new RNG inside the given category.
Real Gaussian(Real f_std_dev, Real f_mean=0.0f)
Returns a random value from a Gaussian distribution.
SVelocities m_sCurrentVelocities
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.
CRandom::CRNG * m_pcRNG
Random number generator.
virtual void SetRotorVelocities(const CCI_MiniQuadrotorRotorActuator::SVelocities &s_velocities)
CRotorEquippedEntity * m_pcRotorEquippedEntity
The rotor equipped entity.
Real m_fNoiseStdDeviation
Noise parameters, at the moment noise is Gaussian.
virtual void AddGaussianNoise()
Adds noise to the rotor velocity.
CMiniQuadrotorRotorDefaultActuator()
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.
size_t GetNumRotors() const
void SetVelocities(Real *pf_velocities)