MultiMotorController class. More...

Public Member Functions | |
MultiMotorController (QVector< PhyDOF * > motors, World *world) | |
Constructor. | |
virtual | ~MultiMotorController () |
Destructor. | |
QVector< PhyDOF * > & | motors () |
return motors controlled | |
QVector< wPID * > & | positionPIDs () |
return PID used for controlling motors with position modality | |
bool | setEnableLimitsRaw (int axis, bool b) |
Enable/disable the limits for the corresponding joint. | |
virtual void | update () |
apply the torque on the basis of minimum-jerk trajectory | |
QVector< wPID * > & | velocityPIDs () |
return PID used for controlling motors with velocity modality | |
DeviceDriver Interface | |
virtual bool | close () |
close | |
virtual bool | configure (yarp::os::Searchable &config) |
configure | |
virtual bool | open (yarp::os::Searchable &config) |
open | |
Common Control Interface | |
virtual bool | getAxes (int *ax) |
see YARP documentation | |
virtual bool | getRefAcceleration (int j, double *acc) |
see YARP documentation | |
virtual bool | getRefAccelerations (double *accs) |
see YARP documentation | |
virtual bool | setRefAcceleration (int j, double acc) |
see YARP documentation | |
virtual bool | setRefAccelerations (const double *accs) |
see YARP documentation | |
virtual bool | stop (int j) |
see YARP documentation | |
virtual bool | stop () |
see YARP documentation | |
IPositionControl Interface | |
virtual bool | checkMotionDone (int j, bool *flag) |
see YARP documentation | |
virtual bool | checkMotionDone (bool *flag) |
see YARP documentation | |
virtual bool | getRefSpeed (int j, double *ref) |
see YARP documentation | |
virtual bool | getRefSpeeds (double *spds) |
see YARP documentation | |
virtual bool | positionMove (int j, double ref) |
see YARP documentation | |
virtual bool | positionMove (const double *refs) |
see YARP documentation | |
virtual bool | relativeMove (int j, double delta) |
see YARP documentation | |
virtual bool | relativeMove (const double *deltas) |
see YARP documentation | |
virtual bool | setPositionMode () |
see YARP documentation | |
virtual bool | setRefSpeed (int j, double sp) |
see YARP documentation | |
virtual bool | setRefSpeeds (const double *spds) |
see YARP documentation | |
IVelocityControl Interface | |
virtual bool | setVelocityMode () |
see YARP documentation | |
virtual bool | velocityMove (int j, double sp) |
see YARP documentation | |
virtual bool | velocityMove (const double *sp) |
see YARP documentation | |
IControlMode Interface | |
virtual bool | getControlMode (int j, int *mode) |
see YARP documentation | |
virtual bool | getControlModes (int *modes) |
see YARP documentation | |
virtual bool | setImpedancePositionMode (int) |
TOMASSINO: I don't know what to put here, leaving empty. | |
virtual bool | setImpedanceVelocityMode (int) |
TOMASSINO: I don't know what to put here, leaving empty. | |
virtual bool | setOpenLoopMode (int j) |
see YARP documentation | |
virtual bool | setPositionMode (int j) |
see YARP documentation | |
virtual bool | setTorqueMode (int j) |
see YARP documentation | |
virtual bool | setVelocityMode (int j) |
see YARP documentation | |
IEncoders Interface | |
virtual bool | getEncoder (int j, double *v) |
see YARP documentation | |
virtual bool | getEncoders (double *encs) |
see YARP documentation | |
virtual bool | getEncoderAcceleration (int j, double *spds) |
see YARP documentation | |
virtual bool | getEncoderAccelerations (double *accs) |
see YARP documentation | |
virtual bool | getEncoderSpeed (int j, double *sp) |
see YARP documentation | |
virtual bool | getEncoderSpeeds (double *spds) |
see YARP documentation | |
virtual bool | resetEncoder (int j) |
see YARP documentation | |
virtual bool | resetEncoders () |
see YARP documentation | |
virtual bool | setEncoder (int j, double val) |
see YARP documentation | |
virtual bool | setEncoders (const double *vals) |
see YARP documentation | |
IControlLimits Interface | |
virtual bool | getLimits (int axis, double *min, double *max) |
see YARP documentation | |
virtual bool | setLimits (int axis, double min, double max) |
see YARP documentation | |
IControlLimitsRaw Interface | |
virtual bool | getLimitsRaw (int axis, double *min, double *max) |
see YARP documentation | |
virtual bool | setLimitsRaw (int axis, double min, double max) |
see YARP documentation | |
![]() | |
MotorController (World *world) | |
constructor | |
virtual | ~MotorController () |
Destructor. | |
bool | isEnabled () |
return true is if enable (hence if it is on) | |
void | setEnabled (bool b) |
Enable/Disable this motorcontroller. | |
World * | world () |
return the world | |
![]() | |
Ownable () | |
Constructor. | |
virtual | ~Ownable () |
Destructor. | |
const QList< Owned > & | owned () const |
Returns the list of objects owned by this one. | |
Ownable * | owner () const |
Returns the owner of this object. | |
void | setOwner (Ownable *owner, bool destroy=true) |
Sets the owner of this object. | |
Additional Inherited Members | |
![]() | |
typedef QList< Owned > | OwnedList |
The type for the list of owned objects. | |
Detailed Description
MultiMotorController class.
- Motivation
- This class allow to control the position or the velocity of a vector of PhyDOF
- Description
- It work in two modality: position and velocity.
- Position Modality
- It compute a minimum-jerk trajectory accordlying to the same equation implemented into iCub DSP chips.
if start position,
final (desired) position,
is the period on which movement will last and
is the velocity of joint when movement starts. The joints will be actuated in order to stay at position
during the movement.
is calculated on the basis of reference speed (setRefSpeed) accordlying to following equation:
will resetted to zero at each positionMove calls and it span from 0 to
incremented at each step of World::timeStep(), hence the total movement will require
steps to get completed.
The reference acceleration (RefAcceleration) will be used to know how much acceleration to set on motor during the movement.
- Velocity Modality
- It accelerate/decelerate the joint velocity in order to reach the desired setted by velocityMove without execeeding the reference acceleration setted (RelAcceleration)
- Warnings
Definition at line 179 of file motorcontrollers.h.
Constructor & Destructor Documentation
MultiMotorController | ( | QVector< PhyDOF * > | motors, |
World * | world | ||
) |
Constructor.
- Parameters
-
dofs vector of TorqueMotors actuated by this controller
Definition at line 152 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
Destructor.
Definition at line 211 of file motorcontrollers.cpp.
Member Function Documentation
|
virtual |
see YARP documentation
Definition at line 402 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 412 of file motorcontrollers.cpp.
|
virtual |
close
Definition at line 270 of file motorcontrollers.cpp.
|
virtual |
configure
Definition at line 274 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 280 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 595 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 603 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 630 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 676 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 680 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 642 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 653 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 665 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 698 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 724 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 495 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 507 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 472 of file motorcontrollers.cpp.
References farsa::toDegree().
|
virtual |
see YARP documentation
Definition at line 484 of file motorcontrollers.cpp.
References farsa::toDegree().
|
inline |
return motors controlled
Definition at line 192 of file motorcontrollers.h.
|
virtual |
open
Definition at line 266 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 290 of file motorcontrollers.cpp.
References farsa::ramp(), and farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 319 of file motorcontrollers.cpp.
References farsa::ramp(), and farsa::toRad().
|
inline |
return PID used for controlling motors with position modality
Definition at line 196 of file motorcontrollers.h.
|
virtual |
see YARP documentation
Definition at line 347 of file motorcontrollers.cpp.
References farsa::ramp(), and farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 375 of file motorcontrollers.cpp.
References farsa::ramp(), and farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 614 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 618 of file motorcontrollers.cpp.
bool setEnableLimitsRaw | ( | int | axis, |
bool | b | ||
) |
Enable/disable the limits for the corresponding joint.
Definition at line 740 of file motorcontrollers.cpp.
Referenced by PhyiCub::PhyiCub().
|
virtual |
see YARP documentation
Definition at line 622 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 626 of file motorcontrollers.cpp.
|
inlinevirtual |
TOMASSINO: I don't know what to put here, leaving empty.
Definition at line 277 of file motorcontrollers.h.
|
inlinevirtual |
TOMASSINO: I don't know what to put here, leaving empty.
Definition at line 279 of file motorcontrollers.h.
|
virtual |
see YARP documentation
Definition at line 684 of file motorcontrollers.cpp.
References farsa::max(), farsa::min(), and farsa::toRad().
Referenced by PhyiCub::PhyiCub().
|
virtual |
see YARP documentation
Definition at line 712 of file motorcontrollers.cpp.
References farsa::toRad().
Referenced by PhyiCub::PhyiCub().
|
virtual |
see YARP documentation
Definition at line 610 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 285 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 565 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 449 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 461 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 424 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 437 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 587 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 543 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 576 of file motorcontrollers.cpp.
|
virtual |
see YARP documentation
Definition at line 518 of file motorcontrollers.cpp.
Referenced by PhyiCub::configurePosture().
|
virtual |
see YARP documentation
Definition at line 531 of file motorcontrollers.cpp.
|
virtual |
apply the torque on the basis of minimum-jerk trajectory
Implements MotorController.
Definition at line 218 of file motorcontrollers.cpp.
References World::timeStep(), and MotorController::world().
Referenced by PhyiCub::preUpdate().
|
virtual |
see YARP documentation
Definition at line 548 of file motorcontrollers.cpp.
References farsa::toRad().
|
virtual |
see YARP documentation
Definition at line 557 of file motorcontrollers.cpp.
References farsa::toRad().
|
inline |
return PID used for controlling motors with velocity modality
Definition at line 204 of file motorcontrollers.h.
The documentation for this class was generated from the following files:
- worldsim/include/motorcontrollers.h
- worldsim/src/motorcontrollers.cpp