PhyDOF class. More...

List of all members.

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 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
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 92 of file phyjoint.h.

void appliedForce ( real  newforce) [signal]

emitted when a Force/Torque is applied

void applyForce ( real  newforce) [inline, slot]

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 231 of file phyjoint.h.

wVector axis ( ) const [inline]

return the axis of rotation/translation

Definition at line 172 of file phyjoint.h.

Referenced by PhyObjectsGroup::setDOFPosition().

wVector centre ( ) const [inline]

return the centre of rotation/translation

Definition at line 112 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 97 of file phyjoint.h.

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

real desiredVelocity ( ) const [inline]

Return the desired position setted.

Definition at line 102 of file phyjoint.h.

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

void disableLimits ( ) [inline]

enable limits

Definition at line 219 of file phyjoint.h.

void enableLimits ( ) [inline]

enable limits

Definition at line 214 of file phyjoint.h.

bool isLimited ( ) const [inline]

return true if rotation/translation are limited

Definition at line 209 of file phyjoint.h.

const PhyJoint* joint ( ) const [inline]

return the PhyJoint (const version)

Definition at line 87 of file phyjoint.h.

PhyJoint* joint ( ) [inline]

return the PhyJoint

Definition at line 82 of file phyjoint.h.

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

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

return the limits

Definition at line 144 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 167 of file phyjoint.h.

MotionMode motion ( ) const [inline]

return the actual motion mode

Definition at line 107 of file phyjoint.h.

bool rotate ( ) const [inline]

return true if it rotate around axis

Definition at line 204 of file phyjoint.h.

void setDesiredPosition ( real  wishpos) [inline, slot]

Move the DOF at the position passed and try to stay there.

Warning:
it doesn't check for DOF limits

Definition at line 240 of file phyjoint.h.

References farsa::ramp().

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

void setDesiredVelocity ( real  wishvel) [inline, slot]

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 252 of file phyjoint.h.

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

void setLimits ( real  lowlimit,
real  highlimit 
) [inline, slot]

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 264 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 162 of file phyjoint.h.

void setStiffness ( real  newstiff) [inline]

set the stiffness about this DOF

Definition at line 155 of file phyjoint.h.

References farsa::ramp().

real stiffness ( ) const [inline]

return the stiffness

Definition at line 150 of file phyjoint.h.

bool translate ( ) const [inline]

return true if it translate along axis

Definition at line 199 of file phyjoint.h.

real velocity ( ) const [inline]

return the actual relative velocity of bodies along the axis of rotation/translation

Definition at line 134 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 181 of file phyjoint.h.

wVector yAxis ( ) const [inline]

return the Y axis of local DOF frame

Definition at line 190 of file phyjoint.h.


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