WheelMotorController Class Reference

Dedicated controller for wheeled robots. More...

Inheritance diagram for WheelMotorController:

Public Member Functions

 WheelMotorController (QVector< PhyDOF * > wheels, World *world)
 Constructor. More...
 
virtual ~WheelMotorController ()
 Destructor. More...
 
void getDesiredSpeeds (QVector< double > &speeds) const
 gets the desired speed of the wheels More...
 
void getDesiredSpeeds (double &sp1, double &sp2) const
 utility method to get the desired speed to the first two wheels More...
 
double getMaxTorque () const
 gets the maximum allowed torque of wheels More...
 
void getSpeedLimits (QVector< double > &minSpeeds, QVector< double > &maxSpeeds) const
 gets the minimum and maximum velocities for each wheel More...
 
void getSpeedLimits (double &minSpeed1, double &minSpeed2, double &maxSpeed1, double &maxSpeed2) const
 utility method to get the minimum and maximum velocities of the first two wheels More...
 
void getSpeeds (QVector< double > &speeds) const
 gets the current speed of the wheels More...
 
void getSpeeds (double &sp1, double &sp2) const
 utility method to get the current speed to the first two wheels More...
 
void setMaxTorque (double maxTorque)
 sets the maximum allowed torque of wheels More...
 
void setSpeedLimits (QVector< double > minSpeeds, QVector< double > maxSpeeds)
 sets the minimum and maximum velocities for each wheel More...
 
void setSpeedLimits (double minSpeed1, double minSpeed2, double maxSpeed1, double maxSpeed2)
 utility method to set the minimum and maximum velocities of the first two wheels More...
 
void setSpeeds (QVector< double > speeds)
 sets the desired speed for the wheels More...
 
void setSpeeds (double sp1, double sp2)
 utility method for setting speeds to the first two wheels More...
 
virtual void update ()
 apply the velocities on the wheels More...
 
QVector< PhyDOF * > & wheels ()
 return the wheels controlled More...
 
- Public Member Functions inherited from MotorController
 MotorController (World *world)
 constructor More...
 
virtual ~MotorController ()
 Destructor. More...
 
bool isEnabled ()
 return true is if enable (hence if it is on) More...
 
void setEnabled (bool b)
 Enable/Disable this motorcontroller. More...
 
Worldworld ()
 return the world More...
 
- Public Member Functions inherited from Ownable
 Ownable ()
 Constructor. More...
 
virtual ~Ownable ()
 Destructor. More...
 
const QList< Owned > & owned () const
 Returns the list of objects owned by this one. More...
 
Ownableowner () const
 Returns the owner of this object. More...
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object. More...
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 The type for the list of owned objects. More...
 

Detailed Description

Dedicated controller for wheeled robots.

Definition at line 167 of file motorcontrollers.h.

Constructor & Destructor Documentation

WheelMotorController ( QVector< PhyDOF * >  wheels,
World world 
)

Constructor.

Parameters
dofsvector of wheels actuated by this controller

Definition at line 379 of file motorcontrollers.cpp.

~WheelMotorController ( )
virtual

Destructor.

Definition at line 387 of file motorcontrollers.cpp.

Member Function Documentation

void getDesiredSpeeds ( QVector< double > &  speeds) const

gets the desired speed of the wheels

Note
speed is expressed in rad/sec

Definition at line 439 of file motorcontrollers.cpp.

void getDesiredSpeeds ( double &  sp1,
double &  sp2 
) const

utility method to get the desired speed to the first two wheels

Note
speed is expressed in rad/sec

Definition at line 443 of file motorcontrollers.cpp.

double getMaxTorque ( ) const

gets the maximum allowed torque of wheels

Note
this only reads the max torque of the first dof as methods of this class only allow to set all max torques at the same value

Definition at line 478 of file motorcontrollers.cpp.

void getSpeedLimits ( QVector< double > &  minSpeeds,
QVector< double > &  maxSpeeds 
) const

gets the minimum and maximum velocities for each wheel

Note
speed is expressed in rad/sec

Definition at line 460 of file motorcontrollers.cpp.

void getSpeedLimits ( double &  minSpeed1,
double &  minSpeed2,
double &  maxSpeed1,
double &  maxSpeed2 
) const

utility method to get the minimum and maximum velocities of the first two wheels

Note
speed is expressed in rad/sec

Definition at line 465 of file motorcontrollers.cpp.

void getSpeeds ( QVector< double > &  speeds) const

gets the current speed of the wheels

Note
speed is expressed in rad/sec

Definition at line 427 of file motorcontrollers.cpp.

void getSpeeds ( double &  sp1,
double &  sp2 
) const

utility method to get the current speed to the first two wheels

Note
speed is expressed in rad/sec

Definition at line 434 of file motorcontrollers.cpp.

void setMaxTorque ( double  maxTorque)

sets the maximum allowed torque of wheels

Definition at line 472 of file motorcontrollers.cpp.

void setSpeedLimits ( QVector< double >  minSpeeds,
QVector< double >  maxSpeeds 
)

sets the minimum and maximum velocities for each wheel

Note
speed is expressed in rad/sec

Definition at line 448 of file motorcontrollers.cpp.

Referenced by PhyEpuck::PhyEpuck(), PhyKhepera::PhyKhepera(), and PhyMarXbot::PhyMarXbot().

void setSpeedLimits ( double  minSpeed1,
double  minSpeed2,
double  maxSpeed1,
double  maxSpeed2 
)

utility method to set the minimum and maximum velocities of the first two wheels

Note
speed is expressed in rad/sec

Definition at line 453 of file motorcontrollers.cpp.

void setSpeeds ( QVector< double >  speeds)

sets the desired speed for the wheels

Note
speed is expressed in rad/sec

Definition at line 397 of file motorcontrollers.cpp.

void setSpeeds ( double  sp1,
double  sp2 
)

utility method for setting speeds to the first two wheels

Note
speed is expressed in rad/sec

Definition at line 409 of file motorcontrollers.cpp.

void update ( )
virtual

apply the velocities on the wheels

Implements MotorController.

Definition at line 391 of file motorcontrollers.cpp.

Referenced by PhyMarXbot::preUpdate(), PhyKhepera::preUpdate(), and PhyEpuck::preUpdate().

QVector<PhyDOF*>& wheels ( )
inline

return the wheels controlled

Definition at line 176 of file motorcontrollers.h.


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