The base class for iCub motors that are controlled by target posture and move the robot with velocity commands. More...
Public Member Functions | |
iCubPosToVelMotor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. | |
virtual | ~iCubPosToVelMotor () |
Destructor. | |
real | getK () const |
Returns the value of the gain (k) used by the proportional controller. | |
real | getMaxVelocity () const |
Returns the maximum velocity used by the proportional controller. | |
const ProportionalController & | proportionalController () const |
Returns a const reference to the proportional controller. | |
virtual void | save (ConfigurationParameters ¶ms, QString prefix) |
Saves the parameters of the sensor into the ConfigurationParameters object. | |
void | setK (real k) |
Sets the value of the gain (k) used by the proportional controller. | |
void | setMaxVelocity (real maxVelocity) |
Sets the maximum velocity used by the proportional controller. | |
Public Member Functions inherited from iCubMotor | |
iCubMotor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor. | |
virtual | ~iCubMotor () |
Destructor. | |
Public Member Functions inherited from Motor | |
Motor (ConfigurationParameters ¶ms, QString prefix) | |
Constructor and Configure. | |
~Motor () | |
Destructor. | |
QString | name () |
Return the name of the Sensor. | |
void | save (ConfigurationParameters ¶ms, QString prefix) |
Save the parameters into the ConfigurationParameters. | |
void | setName (QString name) |
Use this method for changing the name of the Sensor. | |
virtual int | size ()=0 |
Return the number of neurons from which the Motor will get the output. | |
virtual void | update ()=0 |
Update the state of the Motor every time step; the actual behaviour is implemented in subclasses. | |
Public Member Functions inherited from ParameterSettableInConstructor | |
ParameterSettableInConstructor (ConfigurationParameters &, QString) | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
virtual ParameterSettableUI * | getUIManager () |
ParameterSettable () | |
virtual void | postConfigureInitialization () |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Public Member Functions inherited from ParameterSettable | |
void | addObserver (RuntimeParameterObserver *obs) |
T | getRuntimeParameter (QString paramName) |
void | removeObserver (RuntimeParameterObserver *obs) |
void | setRuntimeParameter (QString paramName, T newvalue) |
QString | typeName () const |
Public Member Functions inherited from ConcurrentResourcesUser | |
void | addUsableResource (QString resource) |
void | addUsableResources (QStringList resources) |
void | declareResource (QString name, T *resource, QString lockBuddy="") |
void | deleteResource (QString name) |
T * | getResource (QString name, bool *resourceExists=NULL) |
bool | hasResource (QString name) const |
void | removeAllUsableResources () |
void | removeUsableResource (QString resource) |
void | removeUsableResources (QStringList resources) |
virtual void | shareResourcesWith (ResourcesUser *buddy) |
void | usableResources (QStringList resources) |
bool | usedResourcesExist (QStringList *nonExistingResources=NULL) const |
Static Public Member Functions | |
static void | describe (QString type) |
Describes all the parameters for this sensor. | |
Static Public Member Functions inherited from iCubMotor | |
static void | describe (QString type) |
Describes all the parameters for this motor. | |
Static Public Member Functions inherited from Motor | |
static void | describe (QString type) |
Describe all the parameter for configuring the Motor. | |
Static Public Member Functions inherited from ParameterSettableInConstructor | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Static Public Member Functions inherited from ParameterSettable | |
static void | describe (QString type) |
static QString | fullParameterDescriptionPath (QString type, QString param) |
static QString | fullSubgroupDescriptionPath (QString type, QString sub) |
Additional Inherited Members | |
Public Types inherited from ParameterSettableInConstructor | |
enum | Property |
Public Types inherited from ConcurrentResourcesUser | |
typedef Resource::ResourceChangeType | ResourceChangeType |
Public Attributes inherited from ParameterSettableInConstructor | |
AllowMultiple | |
Default | |
IsList | |
IsMandatory | |
Static Public Attributes inherited from ParameterSettableInConstructor | |
static const double | Infinity |
static const int | MaxInteger |
static const int | MinInteger |
Protected Member Functions inherited from iCubMotor | |
virtual void | resourceChanged (QString resourceName, ResourceChangeType changeType) |
The function called when a resource used here is changed. | |
Static Protected Member Functions inherited from ParameterSettableInConstructor | |
static Descriptor | addTypeDescription (QString type, QString shortHelp, QString longHelp=QString("")) |
static void | setGraphicalEditor (QString type) |
Protected Attributes inherited from iCubMotor | |
QString | icubResource |
The name of the resource associated with the icub robot. | |
QString | neuronsIteratorResource |
The name of th resource associated with the neural network iterator. | |
Detailed Description
The base class for iCub motors that are controlled by target posture and move the robot with velocity commands.
This class defines some parameters that are common to all iCub motors that get absolute postures and send velocity commands.
In addition to all parameters defined by the parent class (iCubMotor), this class also defines the following parameters:
- k: the gain for the proportional controller converting position displacement (desired position minus current position) to a velocity to apply to the joints. The default is 0.3
- maxVelocity: the absolute value of the maximum velocity for joints (i.e. the velocity applied to joints are always in the range [+maxvel, -maxvel]). The default is 20
The resources required by this Motor are the same as those of the parent class
Definition at line 426 of file icubmotors.h.
Constructor & Destructor Documentation
iCubPosToVelMotor | ( | ConfigurationParameters & | params, |
QString | prefix | ||
) |
Constructor.
This also reads configuration parameters
- Parameters
-
params the ConfigurationParameters containing the parameters for the sensor prefix the path prefix to the paramters for this sensor
Definition at line 771 of file icubmotors.cpp.
|
virtual |
Destructor.
Definition at line 777 of file icubmotors.cpp.
Member Function Documentation
|
static |
Describes all the parameters for this sensor.
- Parameters
-
type the name with which this sensor is registered into the factory
Definition at line 793 of file icubmotors.cpp.
References ParameterSettableInConstructor::addTypeDescription(), ParameterSettable::RealDescriptor::def(), iCubMotor::describe(), ParameterSettable::Descriptor::describeReal(), ParameterSettable::RealDescriptor::help(), ParameterSettableInConstructor::Infinity, and ParameterSettable::RealDescriptor::limits().
Referenced by iCubArmPosToVelMotor::describe(), iCubTorsoPosToVelMotor::describe(), iCubHeadPosToVelMotor::describe(), and iCubConfigurableHandPosToVelMotor::describe().
|
inline |
Returns the value of the gain (k) used by the proportional controller.
- Returns
- the value of the gain used by the proportional controller
Definition at line 481 of file icubmotors.h.
References ProportionalController::getK().
Referenced by iCubPosToVelMotor::save().
|
inline |
Returns the maximum velocity used by the proportional controller.
- Returns
- the maximum velocity used by the proportional controller
Definition at line 503 of file icubmotors.h.
Referenced by iCubPosToVelMotor::save().
|
inline |
Returns a const reference to the proportional controller.
The returned object is the one that converts displacements to velocities to apply to joints
- Returns
- the proportional controller
Definition at line 470 of file icubmotors.h.
Referenced by iCubArmPosToVelMotor::update(), iCubTorsoPosToVelMotor::update(), iCubHeadPosToVelMotor::update(), and iCubConfigurableHandPosToVelMotor::update().
|
virtual |
Saves the parameters of the sensor into the ConfigurationParameters object.
- Parameters
-
params the ConfigurationParameters where save the parameters of the sensors prefix the path prefix for the parameters to save
Reimplemented from iCubMotor.
Reimplemented in iCubConfigurableHandPosToVelMotor, iCubHeadPosToVelMotor, iCubTorsoPosToVelMotor, and iCubArmPosToVelMotor.
Definition at line 782 of file icubmotors.cpp.
References ConfigurationParameters::createParameter(), iCubPosToVelMotor::getK(), iCubPosToVelMotor::getMaxVelocity(), iCubMotor::save(), and ConfigurationParameters::startObjectParameters().
Referenced by iCubArmPosToVelMotor::save(), iCubTorsoPosToVelMotor::save(), iCubHeadPosToVelMotor::save(), and iCubConfigurableHandPosToVelMotor::save().
|
inline |
Sets the value of the gain (k) used by the proportional controller.
- Parameters
-
k the value of the gain used by the proportional controller
Definition at line 492 of file icubmotors.h.
|
inline |
Sets the maximum velocity used by the proportional controller.
- Parameters
-
maxvelocity the maximum velocity used by the proportional controller
Definition at line 514 of file icubmotors.h.
The documentation for this class was generated from the following files:
- experiments/include/icubmotors.h
- experiments/src/icubmotors.cpp