ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
8 #include <argos3/core/utility/logging/argos_log.h>
9 #include <argos3/core/utility/plugins/factory.h>
17 m_pcWheeledEntity(NULL),
19 m_fNoiseStdDeviation(0.0f) {
31 THROW_ARGOSEXCEPTION(
"The differential steering actuator can be associated only to a robot with 2 wheels");
60 Real f_right_velocity) {
99 "differential_steering",
"default",
100 "Carlo Pinciroli [ilpincy@gmail.com]",
102 "The differential steering actuator.",
103 "This actuator controls the two wheels a differential steering robot. For a\n"
104 "complete description of its usage, refer to the\n"
105 "ci_differential_steering_actuator.h file.\n\n"
106 "REQUIRED XML CONFIGURATION\n\n"
109 " <my_controller ...>\n"
113 " <differential_steering implementation=\"default\" />\n"
117 " </my_controller>\n"
119 " </controllers>\n\n"
120 "OPTIONAL XML CONFIGURATION\n\n"
121 "It is possible to specify noisy speed in order to match the characteristics\n"
122 "of the real robot. This can be done with the attribute: 'noise_std_dev',\n"
123 "which indicates the standard deviation of a gaussian noise applied to the\n"
124 "desired velocity of the steering:\n\n"
127 " <my_controller ...>\n"
131 " <differential_steering implementation=\"default\"\n"
132 " noise_std_dev=\"1\" />\n"
136 " </my_controller>\n"
Real Gaussian(Real f_std_dev, Real f_mean=0.0f)
Returns a random value from a Gaussian distribution.
virtual void Reset()
Resets the actuator to the state it had just after Init().
const std::string & GetId() const
Returns the id of this entity.
virtual void Init(TConfigurationNode &t_tree)
Initializes the actuator from the XML configuration tree.
The namespace containing all the ARGoS related code.
Basic class for an entity that contains other entities.
The exception that wraps all errors in ARGoS.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
Real m_fNoiseStdDeviation
Noise parameters, at the moment noise is Gaussian.
void Enable()
Enables the entity.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
CRandom::CRNG * m_pcRNG
Random number generator.
#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.
virtual void Update()
Updates the state of the entity associated to this actuator.
virtual void AddGaussianNoise()
Adds noise to the steering velocity.
void SetVelocities(Real *pf_velocities)
Real m_fCurrentVelocity[2]
CDifferentialSteeringDefaultActuator()
Constructor.
static CRNG * CreateRNG(const std::string &str_category)
Creates a new RNG inside the given category.
REGISTER_ACTUATOR(CDifferentialSteeringDefaultActuator, "differential_steering", "default", "Carlo Pinciroli [ilpincy@gmail.com]", "1.0", "The differential steering actuator.", "This actuator controls the two wheels a differential steering robot. For a\n" "complete description of its usage, refer to the\n" "ci_differential_steering_actuator.h file.\n\n" "REQUIRED XML CONFIGURATION\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <differential_steering 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 steering:\n\n" " <controllers>\n" " ...\n" " <my_controller ...>\n" " ...\n" " <actuators>\n" " ...\n" " <differential_steering implementation=\"default\"\n" " noise_std_dev=\"1\" />\n" " ...\n" " </actuators>\n" " ...\n" " </my_controller>\n" " ...\n" " </controllers>\n", "Usable")
size_t GetNumWheels() const
virtual void SetLinearVelocity(Real f_left_velocity, Real f_right_velocity)
Sets the linear velocity of the two steering.
float Real
Collects all ARGoS code.
virtual void Init(TConfigurationNode &t_node)
Initializes the actuator from the XML configuration tree.
CWheeledEntity * m_pcWheeledEntity
virtual void SetRobot(CComposableEntity &c_entity)
Sets the entity associated to this actuator.