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. More...
 

Signals

void appliedForce (real newforce)
 emitted when a Force/Torque is applied More...
 
void changedDesiredPosition (real wishpos)
 emitted when the Desired Position changes More...
 
void changedDesiredVelocity (real wishvel)
 emitted when the Desired Velocity changes More...
 
void changedLimits (real lowlimit, real highlimit)
 emitted when limits changes More...
 
void changedPosition (real newpos)
 emitted when position changes More...
 
void changedStiffness (real newstiff)
 emitted when stiffness changes More...
 
void changedVelocity (real newvel)
 emitted when velocity changes More...
 

Public Member Functions

 PhyDOF (PhyJoint *parent, wVector axis, wVector centre, bool translate=false)
 constructor (it's used by PhyJoint subclasses) More...
 
real appliedForce () const
 Return the Force/Torque applied using applyForce. More...
 
wVector axis () const
 return the axis of rotation/translation More...
 
wVector centre () const
 return the centre of rotation/translation More...
 
real desiredPosition () const
 Return the desired position setted. More...
 
real desiredVelocity () const
 Return the desired position setted. More...
 
void disableLimits ()
 enable limits More...
 
void enableLimits ()
 enable limits More...
 
bool isLimited () const
 return true if rotation/translation are limited More...
 
PhyJointjoint ()
 return the PhyJoint More...
 
const PhyJointjoint () const
 return the PhyJoint (const version) More...
 
void limits (real &lo, real &hi) const
 return the limits More...
 
real maxForce () const
 returns the maximum force/torque. More...
 
real maxVelocity () const
 return the maximum velocity (rad/sec) More...
 
MotionMode motion () const
 return the actual motion mode More...
 
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
More...
 
bool rotate () const
 return true if it rotate around axis More...
 
void setAxis (const wVector &ax)
 
void setCentre (const wVector &cent)
 
void setDesiredPosition (real wishpos)
 Move the DOF at the position passed and try to stay there. More...
 
void setDesiredVelocity (real wishvel)
 Accelerate the DOF to the velocity passed and try to stay at that velocity. More...
 
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. More...
 
void setMaxForce (real maxforce)
 sets the maximum force/torque applied by the joint. More...
 
void setMaxVelocity (real maxvel)
 set the maximum velocity for the joint (rad/sec) More...
 
void setMotionMode (enum MotionMode m)
 change the modality of motion More...
 
void setPosition (real newpos)
 
void setStiffness (real newstiff)
 set the stiffness about this DOF More...
 
void setVelocity (real newvel)
 
void setXAxis (const wVector &x_ax)
 
void setYAxis (const wVector &y_ax)
 
real stiffness () const
 return the stiffness More...
 
void switchOff ()
 Switches the motor off. More...
 
bool translate () const
 return true if it translate along axis More...
 
real velocity () const
 return the actual relative velocity of bodies along the axis of rotation/translation More...
 
wVector xAxis () const
 return the X axis of local DOF frame, this is the zero angle position More...
 
wVector yAxis () const
 return the Y axis of local DOF frame More...
 

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

wVector axis ( ) const
inline

return the axis of rotation/translation

Definition at line 193 of file phyjoint.h.

wVector centre ( ) const
inline

return the centre of rotation/translation

Definition at line 123 of file phyjoint.h.

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

real desiredVelocity ( ) const
inline

Return the desired position setted.

Definition at line 108 of file phyjoint.h.

void disableLimits ( )
inline

enable limits

Definition at line 240 of file phyjoint.h.

void enableLimits ( )
inline

enable limits

Definition at line 235 of file phyjoint.h.

bool isLimited ( ) const
inline

return true if rotation/translation are limited

Definition at line 230 of file phyjoint.h.

PhyJoint* joint ( )
inline

return the PhyJoint

Definition at line 88 of file phyjoint.h.

const PhyJoint* joint ( ) const
inline

return the PhyJoint (const version)

Definition at line 93 of file phyjoint.h.

void limits ( real lo,
real hi 
) const
inline

return the limits

Definition at line 155 of file phyjoint.h.

real maxForce ( ) const
inline

returns the maximum force/torque.

A negative value means no limit

Definition at line 188 of file phyjoint.h.

real maxVelocity ( ) const
inline

return the maximum velocity (rad/sec)

Definition at line 178 of file phyjoint.h.

MotionMode motion ( ) const
inline

return the actual motion mode

Definition at line 113 of file phyjoint.h.

real position ( ) const
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 135 of file phyjoint.h.

Referenced by PhySlider::updateJointInfo(), PhySuspension::updateJointInfo(), and PhyHinge::updateJointInfo().

bool rotate ( ) const
inline

return true if it rotate around axis

Definition at line 225 of file phyjoint.h.

void setDesiredPosition ( real  wishpos)
inline

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

Warning
it doesn't check for DOF limits

Definition at line 261 of file phyjoint.h.

References farsa::ramp().

void setDesiredVelocity ( real  wishvel)
inline

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

void setLimits ( real  lowlimit,
real  highlimit 
)
inline

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

References farsa::ramp().

void setMaxForce ( real  maxforce)
inline

sets the maximum force/torque applied by the joint.

A negative value means no limit

Definition at line 183 of file phyjoint.h.

void setMaxVelocity ( real  maxvel)
inline

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

Definition at line 173 of file phyjoint.h.

void setMotionMode ( enum MotionMode  m)
inline

change the modality of motion

Definition at line 118 of file phyjoint.h.

void setStiffness ( real  newstiff)
inline

set the stiffness about this DOF

Definition at line 166 of file phyjoint.h.

References farsa::ramp().

real stiffness ( ) const
inline

return the stiffness

Definition at line 161 of file phyjoint.h.

void switchOff ( )
inline

Switches the motor off.

Definition at line 83 of file phyjoint.h.

bool translate ( ) const
inline

return true if it translate along axis

Definition at line 220 of file phyjoint.h.

real velocity ( ) const
inline

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

Definition at line 145 of file phyjoint.h.

wVector xAxis ( ) const
inline

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

Definition at line 202 of file phyjoint.h.

wVector yAxis ( ) const
inline

return the Y axis of local DOF frame

Definition at line 211 of file phyjoint.h.


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