motors.cpp
36 m_additionalOutputs(ConfigurationHelper::getUnsignedInt(params, prefix + "additionalOutputs", 1)),
37 m_neuronsIteratorResource(actualResourceNameForMultirobot(ConfigurationHelper::getString(params, prefix + "neuronsIterator", "neuronsIterator"))),
38 m_additionalOutputsResource(actualResourceNameForMultirobot(ConfigurationHelper::getString(params, prefix + "additionalOutputsResource", "additionalOutputs"))),
62 params.createParameter(prefix, "additionalOutputs", QString::number(m_additionalOutputs.size()));
71 Descriptor d = addTypeDescription(type, "Adds output neurons that can be used for custom operations", "With this motor you can specify how many additional outputs are needed in the controller. This also declares a resource that can be used to access the additional outputs");
72 d.describeInt("additionalOutputs").def(1).limits(1,100).props(IsMandatory).help("The number of additional outputs that will be added to the controller (default 1)");
73 d.describeString("neuronsIterator").def("neuronsIterator").help("The name of the resource associated with the neural network iterator (default is \"neuronsIterator\")");
74 d.describeString("additionalOutputsResource").def("additionalOutputs").help("The name of the resource associated with the vector of additional outputs (default is \"additionalOutputs\")");
void usableResources(QStringList resources)
double velocityForJoint(double desired, double current) const
Returns the velocity to apply to a joint to reach the desired position.
Definition: motors.cpp:158
void declareResource(QString name, T *resource, QString lockBuddy="")
void save(ConfigurationParameters ¶ms, QString prefix)
Save the parameters into the ConfigurationParameters.
Definition: neuroninterfaces.cpp:201
void checkAllNeededResourcesExist()
Checks whether all resources we need are existing and throws an exception if they aren't...
Definition: neuroninterfaces.cpp:231
virtual void shareResourcesWith(ResourcesUser *other)
The function to share resources.
Definition: motors.cpp:96
void resetNeededResourcesCheck()
Resets the check on needed resources so that the next call to checkAllNeededResourcesExist() will per...
Definition: neuroninterfaces.cpp:246
virtual bool nextNeuron()=0
Go to the next neuron of the current block.
virtual bool setCurrentBlock(QString blockName)=0
Set the current blocks of neurons to iterate.
ProportionalController & operator=(const ProportionalController &other)
Copy operator.
Definition: motors.cpp:141
virtual void shareResourcesWith(ResourcesUser *buddy)
ResourceVector< real > m_additionalOutputs
The vector with additional outputs.
Definition: motors.h:130
void resourceChanged(QString resourceName, ResourceChangeType changeType)
The function called when a resource used here is changed.
Definition: motors.cpp:105
static void info(QString msg)
const QString m_neuronsIteratorResource
The name of th resource associated with the neural network iterator.
Definition: motors.h:136
virtual void save(ConfigurationParameters ¶ms, QString prefix)
Saves the parameters of the FakeMotor into the provided ConfigurationParameters object.
Definition: motors.cpp:58
bool startObjectParameters(QString groupPath, QString typeName, ParameterSettable *object)
static void describe(QString type)
Describes all the parameter needed to configure this class.
Definition: motors.cpp:67
static Descriptor addTypeDescription(QString type, QString shortHelp, QString longHelp=QString(""))
const QString m_additionalOutputsResource
The name of the resource associated with the vector of additional outputs.
Definition: motors.h:142
NeuronsIterator * m_neuronsIterator
The object to iterate over neurons of the neural network.
Definition: motors.h:147
unsigned int size() const
virtual void setGraphicProperties(QString label, double minValue, double maxValue, QColor color)=0
Set the graphic properties for the current neuron (in case it will be visualized on a GUI) ...
void deleteResource(QString name)
static void describe(QString type)
Describe all the parameter for configuring the Motor.
Definition: neuroninterfaces.cpp:214
void createParameter(QString groupPath, QString parameter)
IsMandatory
ResourceChangeType