It controls each head joint (up to 2) in position by adjusting the joint's velocity with the proportional controller. More...

Inheritance diagram for iCubHeadPosToVelMotor:

Public Member Functions

 iCubHeadPosToVelMotor (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 
 ~iCubHeadPosToVelMotor ()
 Destructor.
 
void save (ConfigurationParameters &params, QString prefix)
 Save the parameters of the iCubHeadPosToVelMotor into the ConfigurationParameters.
 
int size ()
 Return the number of neurons from which the Motor will get the output: 7.
 
void update ()
 Update the state of the Motor every time step.
 
- Public Member Functions inherited from iCubPosToVelMotor
 iCubPosToVelMotor (ConfigurationParameters &params, 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 ProportionalControllerproportionalController () const
 Returns a const reference to the proportional controller.
 
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 &params, QString prefix)
 Constructor.
 
virtual ~iCubMotor ()
 Destructor.
 
- Public Member Functions inherited from Motor
 Motor (ConfigurationParameters &params, QString prefix)
 Constructor and Configure.
 
 ~Motor ()
 Destructor.
 
QString name ()
 Return the name of the Sensor.
 
void save (ConfigurationParameters &params, QString prefix)
 Save the parameters into the ConfigurationParameters.
 
void setName (QString name)
 Use this method for changing the name of the Sensor.
 
- Public Member Functions inherited from ParameterSettableInConstructor
 ParameterSettableInConstructor (ConfigurationParameters &, QString)
 
void addObserver (RuntimeParameterObserver *obs)
 
getRuntimeParameter (QString paramName)
 
virtual ParameterSettableUIgetUIManager ()
 
 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)
 
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)
 Describe all the parameter for configuring the iCubArmRandomMotor.
 
- Static Public Member Functions inherited from iCubPosToVelMotor
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)
 

Protected Member Functions

void resourceChanged (QString resourceName, ResourceChangeType changeType)
 The function called when a resource used here is changed.
 

Protected Attributes

bool headDofs [6]
 the indication of which Dofs are enabled to move
 
iCubRoboticub
 the icub to move
 
MultiMotorControllericubMotors
 the motor controller for reading limits
 

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
 
- Static Protected Member Functions inherited from ParameterSettableInConstructor
static Descriptor addTypeDescription (QString type, QString shortHelp, QString longHelp=QString(""))
 
static void setGraphicalEditor (QString type)
 

Detailed Description

It controls each head joint (up to 2) in position by adjusting the joint's velocity with the proportional controller.

Definition at line 609 of file icubmotors.h.

Constructor & Destructor Documentation

iCubHeadPosToVelMotor ( farsa::ConfigurationParameters params,
QString  prefix 
)

Constructor and Configure.

Parameters
paramsis the ConfigurationParameters containing the parameters
prefixis the path prefix to the paramters for this Motor

Definition at line 980 of file icubmotors.cpp.

References ConfigurationHelper::getBool(), iCubHeadPosToVelMotor::headDofs, iCubMotor::icubResource, iCubMotor::neuronsIteratorResource, and ConcurrentResourcesUser::usableResources().

Destructor.

Definition at line 995 of file icubmotors.cpp.

Member Function Documentation

void resourceChanged ( QString  resourceName,
ResourceChangeType  changeType 
)
protectedvirtual

The function called when a resource used here is changed.

Parameters
resourceNamethe name of the resource that has changed.
chageTypethe type of change the resource has gone through (whether it was created, modified or deleted)

Reimplemented from iCubMotor.

Definition at line 1070 of file icubmotors.cpp.

References PhyiCub::headNeckController(), iCubHeadPosToVelMotor::icub, iCubHeadPosToVelMotor::icubMotors, iCubMotor::icubResource, Logger::info(), Motor::name(), iCubMotor::neuronsIteratorResource, NeuronsIterator::nextNeuron(), iCubMotor::resourceChanged(), NeuronsIterator::setCurrentBlock(), NeuronsIterator::setGraphicProperties(), and iCubHeadPosToVelMotor::size().

void save ( ConfigurationParameters params,
QString  prefix 
)
virtual

Save the parameters of the iCubHeadPosToVelMotor into the ConfigurationParameters.

Parameters
paramsis the ConfigurationParameters where save the parameters
prefixis the path prefix for the parameters to save

Reimplemented from iCubPosToVelMotor.

Definition at line 999 of file icubmotors.cpp.

References ConfigurationParameters::createParameter(), iCubHeadPosToVelMotor::headDofs, iCubPosToVelMotor::save(), and ConfigurationParameters::startObjectParameters().

int size ( )
virtual

Return the number of neurons from which the Motor will get the output: 7.

Implements Motor.

Definition at line 1064 of file icubmotors.cpp.

References iCubHeadPosToVelMotor::headDofs.

Referenced by iCubHeadPosToVelMotor::resourceChanged().

Member Data Documentation

bool headDofs[6]
protected

the indication of which Dofs are enabled to move

Definition at line 641 of file icubmotors.h.

Referenced by iCubHeadPosToVelMotor::iCubHeadPosToVelMotor(), iCubHeadPosToVelMotor::save(), iCubHeadPosToVelMotor::size(), and iCubHeadPosToVelMotor::update().

iCubRobot* icub
protected

the icub to move

Definition at line 637 of file icubmotors.h.

Referenced by iCubHeadPosToVelMotor::resourceChanged().

MultiMotorController* icubMotors
protected

the motor controller for reading limits

Definition at line 639 of file icubmotors.h.

Referenced by iCubHeadPosToVelMotor::resourceChanged(), and iCubHeadPosToVelMotor::update().


The documentation for this class was generated from the following files: