Public Types | |
enum | MotionMode { force, vel, pos, off } |
Type that encode the current modality of motion (off means motor switched off) More... | |
Public Slots | |
void | applyForce (real newforce) |
Apply a Force to the object linked by this DOF. | |
void | setDesiredPosition (real wishpos) |
Move the DOF at the position passed and try to stay there. | |
void | setDesiredVelocity (real wishvel) |
Accelerate the DOF to the velocity passed and try to stay at that velocity. | |
void | setLimits (real lowlimit, real highlimit) |
Set limits of this DOF The meaning of parameters changes depending if it's a rotational or translation DOF. | |
Signals | |
void | appliedForce (real newforce) |
emitted when a Force/Torque is applied | |
void | changedDesiredPosition (real wishpos) |
emitted when the Desired Position changes | |
void | changedDesiredVelocity (real wishvel) |
emitted when the Desired Velocity changes | |
void | changedLimits (real lowlimit, real highlimit) |
emitted when limits changes | |
void | changedPosition (real newpos) |
emitted when position changes | |
void | changedStiffness (real newstiff) |
emitted when stiffness changes | |
void | changedVelocity (real newvel) |
emitted when velocity changes | |
Public Member Functions | |
PhyDOF (PhyJoint *parent, wVector axis, wVector centre, bool translate=false) | |
constructor (it's used by PhyJoint subclasses) | |
real | appliedForce () const |
Return the Force/Torque applied using applyForce. | |
wVector | axis () const |
return the axis of rotation/translation | |
wVector | centre () const |
return the centre of rotation/translation | |
real | desiredPosition () const |
Return the desired position setted. | |
real | desiredVelocity () const |
Return the desired position setted. | |
void | disableLimits () |
enable limits | |
void | enableLimits () |
enable limits | |
bool | isLimited () const |
return true if rotation/translation are limited | |
PhyJoint * | joint () |
return the PhyJoint | |
const PhyJoint * | joint () const |
return the PhyJoint (const version) | |
void | limits (real &lo, real &hi) const |
return the limits | |
real | maxVelocity () const |
return the maximum velocity (rad/sec) | |
MotionMode | motion () const |
return the actual motion mode | |
real | position () const |
return the actual position of bodies For rotational DOF is the angle of rotation For linear DOF is the offset from the centre | |
bool | rotate () const |
return true if it rotate around axis | |
void | setAxis (const wVector &ax) |
void | setCentre (const wVector ¢) |
void | setMaxVelocity (real maxvel) |
set the maximum velocity for the joint (rad/sec) | |
void | setMotionMode (enum MotionMode m) |
change the modality of motion | |
void | setPosition (real newpos) |
void | setStiffness (real newstiff) |
set the stiffness about this DOF | |
void | setVelocity (real newvel) |
void | setXAxis (const wVector &x_ax) |
void | setYAxis (const wVector &y_ax) |
real | stiffness () const |
return the stiffness | |
void | switchOff () |
Switches the motor off. | |
bool | translate () const |
return true if it translate along axis | |
real | velocity () const |
return the actual relative velocity of bodies along the axis of rotation/translation | |
wVector | xAxis () const |
return the X axis of local DOF frame, this is the zero angle position | |
wVector | yAxis () const |
return the Y axis of local DOF frame | |
Detailed Description
PhyDOF class.
\
- Motivation
- describe a DOF
- Description
- Details
- Warnings
- Warnings
Definition at line 50 of file phyjoint.h.
Member Enumeration Documentation
enum MotionMode |
Type that encode the current modality of motion (off means motor switched off)
Definition at line 54 of file phyjoint.h.
Constructor & Destructor Documentation
constructor (it's used by PhyJoint subclasses)
- Parameters
-
axis is the main axis of translation/rotation centre is the centre of translation/rotation frame translate true mean that it is a linear DOF, otherwise is an rotational DOF
Definition at line 61 of file phyjoint.h.
Member Function Documentation
|
inline |
Return the Force/Torque applied using applyForce.
Definition at line 97 of file phyjoint.h.
|
signal |
emitted when a Force/Torque is applied
|
inlineslot |
Apply a Force to the object linked by this DOF.
For prismatic DOF this means that the force will be applied to both bodies in opposite direction along axis of DOF
For rotational DOF the force will be intepreted as a torque applied around the axis of the DOF.
Definition at line 241 of file phyjoint.h.
|
inline |
return the axis of rotation/translation
Definition at line 182 of file phyjoint.h.
Referenced by PhyObjectsGroup::setDOFPosition().
|
inline |
return the centre of rotation/translation
Definition at line 122 of file phyjoint.h.
Referenced by PhyObjectsGroup::setDOFPosition().
|
signal |
emitted when the Desired Position changes
|
signal |
emitted when the Desired Velocity changes
|
signal |
emitted when limits changes
|
signal |
emitted when position changes
|
signal |
emitted when stiffness changes
|
signal |
emitted when velocity changes
|
inline |
Return the desired position setted.
Definition at line 102 of file phyjoint.h.
Referenced by PhyiCub::vergenceChangedDesiredPosition(), and PhyiCub::versionChangedDesiredPosition().
|
inline |
Return the desired position setted.
Definition at line 107 of file phyjoint.h.
Referenced by PhyiCub::vergenceChangedDesiredVelocity(), and PhyiCub::versionChangedDesiredVelocity().
|
inline |
enable limits
Definition at line 229 of file phyjoint.h.
|
inline |
enable limits
Definition at line 224 of file phyjoint.h.
|
inline |
return true if rotation/translation are limited
Definition at line 219 of file phyjoint.h.
|
inline |
return the PhyJoint
Definition at line 87 of file phyjoint.h.
Referenced by PhyObjectsGroup::setDOFPosition(), and DOFStatusListener::update().
|
inline |
return the PhyJoint (const version)
Definition at line 92 of file phyjoint.h.
|
inline |
return the limits
Definition at line 154 of file phyjoint.h.
Referenced by DOFStatusListener::update(), PhyiCub::vergenceChangedLimits(), and PhyiCub::versionChangedLimits().
|
inline |
return the maximum velocity (rad/sec)
Definition at line 177 of file phyjoint.h.
|
inline |
return the actual motion mode
Definition at line 112 of file phyjoint.h.
|
inline |
return the actual position of bodies For rotational DOF is the angle of rotation
For linear DOF is the offset from the centre
Definition at line 134 of file phyjoint.h.
Referenced by PhyiCub::configurePosture(), PhyiCub::leftEyeChangedDesiredPosition(), PhyiCub::leftEyeChangedDesiredVelocity(), PhyiCub::leftEyeChangedPosition(), PhyiCub::leftEyeChangedVelocity(), PhyiCub::rightEyeChangedDesiredPosition(), PhyiCub::rightEyeChangedDesiredVelocity(), PhyiCub::rightEyeChangedPosition(), PhyiCub::rightEyeChangedVelocity(), PhyObjectsGroup::setDOFPosition(), PhySuspension::updateJointInfo(), PhyHinge::updateJointInfo(), PhyiCub::vergenceChangedPosition(), and PhyiCub::versionChangedPosition().
|
inline |
return true if it rotate around axis
Definition at line 214 of file phyjoint.h.
|
inlineslot |
Move the DOF at the position passed and try to stay there.
- Warning
- it doesn't check for DOF limits
Definition at line 250 of file phyjoint.h.
References farsa::ramp().
Referenced by PhyiCub::leftEyeChangedDesiredPosition(), PhyiCub::rightEyeChangedDesiredPosition(), PhyiCub::vergenceChangedDesiredPosition(), and PhyiCub::versionChangedDesiredPosition().
|
inlineslot |
Accelerate the DOF to the velocity passed and try to stay at that velocity.
- Warning
- it doesn't check for DOF limits
Definition at line 262 of file phyjoint.h.
Referenced by PhyiCub::leftEyeChangedDesiredVelocity(), PhyiCub::rightEyeChangedDesiredVelocity(), PhyiCub::vergenceChangedDesiredVelocity(), and PhyiCub::versionChangedDesiredVelocity().
|
inlineslot |
Set limits of this DOF The meaning of parameters changes depending if it's a rotational or translation DOF.
- Warning
- Low-Limit must be greater that -pi and High-Limit must be lesser that pi. Only when the library is compiled in debug, it will checks for correct settings of these parameters.
Definition at line 274 of file phyjoint.h.
References farsa::ramp().
Referenced by PhyiCub::PhyiCub(), PhyiCub::vergenceChangedLimits(), and PhyiCub::versionChangedLimits().
|
inline |
set the maximum velocity for the joint (rad/sec)
Definition at line 172 of file phyjoint.h.
|
inline |
change the modality of motion
Definition at line 117 of file phyjoint.h.
|
inline |
set the stiffness about this DOF
Definition at line 165 of file phyjoint.h.
References farsa::ramp().
|
inline |
return the stiffness
Definition at line 160 of file phyjoint.h.
|
inline |
Switches the motor off.
Definition at line 82 of file phyjoint.h.
|
inline |
return true if it translate along axis
Definition at line 209 of file phyjoint.h.
|
inline |
return the actual relative velocity of bodies along the axis of rotation/translation
Definition at line 144 of file phyjoint.h.
Referenced by PhyiCub::vergenceChangedVelocity(), and PhyiCub::versionChangedVelocity().
|
inline |
return the X axis of local DOF frame, this is the zero angle position
Definition at line 191 of file phyjoint.h.
|
inline |
return the Y axis of local DOF frame
Definition at line 200 of file phyjoint.h.
The documentation for this class was generated from the following file:
- worldsim/include/phyjoint.h