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... | |
PhyJoint * | joint () |
return the PhyJoint More... | |
const PhyJoint * | joint () 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 ¢) |
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
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 98 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 252 of file phyjoint.h.
|
inline |
return the axis of rotation/translation
Definition at line 193 of file phyjoint.h.
|
inline |
return the centre of rotation/translation
Definition at line 123 of file phyjoint.h.
|
signal |
emitted when the Desired Position changes
|
signal |
emitted when the Desired Velocity 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 103 of file phyjoint.h.
|
inline |
Return the desired position setted.
Definition at line 108 of file phyjoint.h.
|
inline |
enable limits
Definition at line 240 of file phyjoint.h.
|
inline |
enable limits
Definition at line 235 of file phyjoint.h.
|
inline |
return true if rotation/translation are limited
Definition at line 230 of file phyjoint.h.
|
inline |
return the PhyJoint
Definition at line 88 of file phyjoint.h.
|
inline |
return the PhyJoint (const version)
Definition at line 93 of file phyjoint.h.
return the limits
Definition at line 155 of file phyjoint.h.
|
inline |
returns the maximum force/torque.
A negative value means no limit
Definition at line 188 of file phyjoint.h.
|
inline |
return the maximum velocity (rad/sec)
Definition at line 178 of file phyjoint.h.
|
inline |
return the actual motion mode
Definition at line 113 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 135 of file phyjoint.h.
Referenced by PhySlider::updateJointInfo(), PhySuspension::updateJointInfo(), and PhyHinge::updateJointInfo().
|
inline |
return true if it rotate around axis
Definition at line 225 of file phyjoint.h.
|
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().
|
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.
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().
|
inline |
sets the maximum force/torque applied by the joint.
A negative value means no limit
Definition at line 183 of file phyjoint.h.
|
inline |
set the maximum velocity for the joint (rad/sec)
Definition at line 173 of file phyjoint.h.
|
inline |
change the modality of motion
Definition at line 118 of file phyjoint.h.
|
inline |
set the stiffness about this DOF
Definition at line 166 of file phyjoint.h.
References farsa::ramp().
|
inline |
return the stiffness
Definition at line 161 of file phyjoint.h.
|
inline |
Switches the motor off.
Definition at line 83 of file phyjoint.h.
|
inline |
return true if it translate along axis
Definition at line 220 of file phyjoint.h.
|
inline |
return the actual relative velocity of bodies along the axis of rotation/translation
Definition at line 145 of file phyjoint.h.
|
inline |
return the X axis of local DOF frame, this is the zero angle position
Definition at line 202 of file phyjoint.h.
|
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:
- worldsim/include/phyjoint.h