PhyDOF class. More...

Inheritance diagram for PhyDOF:

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
 
PhyJointjoint ()
 return the PhyJoint
 
const PhyJointjoint () 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 &cent)
 
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

PhyDOF ( PhyJoint parent,
wVector  axis,
wVector  centre,
bool  translate = false 
)
inline

constructor (it's used by PhyJoint subclasses)

Parameters
axisis the main axis of translation/rotation
centreis the centre of translation/rotation frame
translatetrue mean that it is a linear DOF, otherwise is an rotational DOF

Definition at line 61 of file phyjoint.h.

Member Function Documentation

real appliedForce ( ) const
inline

Return the Force/Torque applied using applyForce.

Definition at line 97 of file phyjoint.h.

void appliedForce ( real  newforce)
signal

emitted when a Force/Torque is applied

void applyForce ( real  newforce)
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.

wVector axis ( ) const
inline

return the axis of rotation/translation

Definition at line 182 of file phyjoint.h.

Referenced by PhyObjectsGroup::setDOFPosition().

wVector centre ( ) const
inline

return the centre of rotation/translation

Definition at line 122 of file phyjoint.h.

Referenced by PhyObjectsGroup::setDOFPosition().

void changedDesiredPosition ( real  wishpos)
signal

emitted when the Desired Position changes

void changedDesiredVelocity ( real  wishvel)
signal

emitted when the Desired Velocity changes

void changedLimits ( real  lowlimit,
real  highlimit 
)
signal

emitted when limits changes

void changedPosition ( real  newpos)
signal

emitted when position changes

void changedStiffness ( real  newstiff)
signal

emitted when stiffness changes

void changedVelocity ( real  newvel)
signal

emitted when velocity changes

real desiredPosition ( ) const
inline

Return the desired position setted.

Definition at line 102 of file phyjoint.h.

Referenced by PhyiCub::vergenceChangedDesiredPosition(), and PhyiCub::versionChangedDesiredPosition().

real desiredVelocity ( ) const
inline

Return the desired position setted.

Definition at line 107 of file phyjoint.h.

Referenced by PhyiCub::vergenceChangedDesiredVelocity(), and PhyiCub::versionChangedDesiredVelocity().

void disableLimits ( )
inline

enable limits

Definition at line 229 of file phyjoint.h.

void enableLimits ( )
inline

enable limits

Definition at line 224 of file phyjoint.h.

bool isLimited ( ) const
inline

return true if rotation/translation are limited

Definition at line 219 of file phyjoint.h.

PhyJoint* joint ( )
inline

return the PhyJoint

Definition at line 87 of file phyjoint.h.

Referenced by PhyObjectsGroup::setDOFPosition(), and DOFStatusListener::update().

const PhyJoint* joint ( ) const
inline

return the PhyJoint (const version)

Definition at line 92 of file phyjoint.h.

void limits ( real &  lo,
real &  hi 
) const
inline

return the limits

Definition at line 154 of file phyjoint.h.

Referenced by DOFStatusListener::update(), PhyiCub::vergenceChangedLimits(), and PhyiCub::versionChangedLimits().

real maxVelocity ( ) const
inline

return the maximum velocity (rad/sec)

Definition at line 177 of file phyjoint.h.

MotionMode motion ( ) const
inline

return the actual motion mode

Definition at line 112 of file phyjoint.h.

bool rotate ( ) const
inline

return true if it rotate around axis

Definition at line 214 of file phyjoint.h.

void setDesiredPosition ( real  wishpos)
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().

void setDesiredVelocity ( real  wishvel)
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().

void setLimits ( real  lowlimit,
real  highlimit 
)
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().

void setMaxVelocity ( real  maxvel)
inline

set the maximum velocity for the joint (rad/sec)

Definition at line 172 of file phyjoint.h.

void setMotionMode ( enum MotionMode  m)
inline

change the modality of motion

Definition at line 117 of file phyjoint.h.

void setStiffness ( real  newstiff)
inline

set the stiffness about this DOF

Definition at line 165 of file phyjoint.h.

References farsa::ramp().

real stiffness ( ) const
inline

return the stiffness

Definition at line 160 of file phyjoint.h.

void switchOff ( )
inline

Switches the motor off.

Definition at line 82 of file phyjoint.h.

bool translate ( ) const
inline

return true if it translate along axis

Definition at line 209 of file phyjoint.h.

real velocity ( ) const
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().

wVector xAxis ( ) const
inline

return the X axis of local DOF frame, this is the zero angle position

Definition at line 191 of file phyjoint.h.

wVector yAxis ( ) const
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: