V-ART
|
Noisy Controller for DOF movement. More...
#include <noisydofmover.h>
Public Member Functions | |
void | SetNoise (float newNoiseAmplitude, float newNoiseWaveLenght) |
Sets the noise attributes. More... | |
void | SetOvershoot (float amplitude, float peak) |
Sets the overshoot attributes. More... | |
void | SetOffset (float newOffset) |
Set the offset attribute. More... | |
Public Member Functions inherited from VART::DofMover | |
const Dof * | GetTarget () |
Returns a pointer to the target DOF. More... | |
Static Public Member Functions | |
static void | SetDefaultNoiseAmplitude (float value) |
static void | SetDefaultNoiseWaveLenght (float value) |
static void | SetDefaultOvershoot (float value) |
static void | SetDefaultOffset (float value) |
static void | SetDefaultPeakTime (float value) |
Protected Member Functions | |
NoisyDofMover () | |
Creates an unitialized noisy DOF mover. More... | |
virtual void | Initialize (float iniTime, float finTime, float finPos) |
Initializes a noisy DOF mover. More... | |
virtual void | Move () |
Changes target DOF. More... | |
float | Noise () |
Generates and returns corehent noise. More... | |
float | PositionalError () |
Generates and returns positional error. More... | |
float | Random () |
Generates and returns a pseudo-random number within internal noise amplitude. More... | |
Protected Member Functions inherited from VART::DofMover | |
DofMover () | |
Creates an unitialized DOF mover. More... | |
DofMover (const VART::DofMover &dofMover) | |
Creates a copy of an DofMover. All data are copied, except the 'active' atribute, that is set to false. More... | |
virtual | ~DofMover () |
void | SetDof (Dof *dofPtr) |
Sets the target DOF. More... | |
void | GetFinalTime (std::list< float > *resultPtr) |
Adds the final time to the list. More... | |
Protected Attributes | |
float | noiseAmplitude |
Noise amplitude (noise level) More... | |
float | noiseWaveLenght |
Noise wave length. More... | |
float | nextSubGoalTime |
Time for next noise peek. More... | |
float | previousSubGoalTime |
Time of previous noise peek. More... | |
float | nextSubGoalPosition |
Amplitude of next noise peek. More... | |
float | previousSubGoalPosition |
Amplitude of previous noise peek. More... | |
float | offset |
how much to miss the DOF target position More... | |
float | overshoot |
how much to pass the DOF target position before correction More... | |
float | peakTime |
Overshoot time. More... | |
float | overshootRange |
Movement range from intial position to overshoot position. More... | |
float | finalRange |
Movement range from overshoot position to goal position. More... | |
float | overshootPosition |
bool | hasOvershoot |
bool | hasNoise |
Protected Attributes inherited from VART::DofMover | |
float | targetPosition |
Target position. More... | |
float | initialPosition |
Position of target DOF upon activation. More... | |
float | initialTime |
Time of predicted activation (normalized). More... | |
float | activationTime |
Time of actual activation (normalized). More... | |
float | finalTime |
Normalized deactivation time. More... | |
float | positionRange |
How far from target at activation time. More... | |
float | timeRange |
How much time to reach target position. More... | |
Dof * | targetDofPtr |
Target DOF. More... | |
bool | active |
Tells whether a DOF mover is active. More... | |
Static Protected Attributes | |
static float | defaultNoiseAmplitude = 0.0f |
static float | defaultNoiseWaveLenght = 1.01f |
static float | defaultOvershoot = 0.0f |
static float | defaultOffset = 0.0f |
static float | defaultPeakTime = 0.9f |
Static Protected Attributes inherited from VART::DofMover | |
static float | goalTime |
Time of next snapshot, normalized to joint movement's duration. More... | |
static bool | cycle |
Indicates whether the current action is cyclic. More... | |
static const Interpolator * | interpolatorPtr = NULL |
Position interpolator. More... | |
static unsigned int | priority = 1 |
Priority of active action. More... | |
static float | minimumDuration |
Minimum duration when computing motion paths. More... | |
Friends | |
class | JointMover |
class | Action |
Noisy Controller for DOF movement.
A DOF mover that adds noise to movement (See DofMover). NoisyDofMover is not meant to be used by the application programmer. Use the interface methods in Action and JointMover.
Definition at line 17 of file noisydofmover.h.
|
protected |
Creates an unitialized noisy DOF mover.
After creating a noisy dof mover with the default constructor, call Initialize() to make sure all attributes will be initialized.
Definition at line 19 of file noisydofmover.cpp.
|
protectedvirtual |
Initializes a noisy DOF mover.
This method takes only values for attributes in the base class because all noise and error attributes are initialized to their default values. See also SetNoise() and SetPositionalError().
Reimplemented from VART::DofMover.
Definition at line 24 of file noisydofmover.cpp.
Referenced by VART::JointMover::AddNoisyDofMover().
|
protectedvirtual |
Changes target DOF.
Reimplemented from VART::DofMover.
Definition at line 77 of file noisydofmover.cpp.
|
protected |
Generates and returns corehent noise.
Definition at line 142 of file noisydofmover.cpp.
References VART::SineInterpolator::GetValue().
|
protected |
Generates and returns positional error.
Computes overshoot and offset for producing positional error.
|
protected |
Generates and returns a pseudo-random number within internal noise amplitude.
Definition at line 188 of file noisydofmover.cpp.
|
static |
Definition at line 193 of file noisydofmover.cpp.
|
static |
Definition at line 198 of file noisydofmover.cpp.
|
static |
Definition at line 208 of file noisydofmover.cpp.
|
static |
Definition at line 203 of file noisydofmover.cpp.
|
static |
Definition at line 213 of file noisydofmover.cpp.
void VART::NoisyDofMover::SetNoise | ( | float | newNoiseAmplitude, |
float | newNoiseWaveLenght | ||
) |
Sets the noise attributes.
Definition at line 39 of file noisydofmover.cpp.
Referenced by VART::XmlJointAction::ParseDofMovement(), and VART::XmlAction::ParseDofMovement().
void VART::NoisyDofMover::SetOffset | ( | float | newOffset | ) |
Set the offset attribute.
Definition at line 72 of file noisydofmover.cpp.
Referenced by VART::OffsetModifier::Modify().
void VART::NoisyDofMover::SetOvershoot | ( | float | amplitude, |
float | peak | ||
) |
Sets the overshoot attributes.
Definition at line 65 of file noisydofmover.cpp.
|
friend |
Definition at line 19 of file noisydofmover.h.
|
friend |
Definition at line 18 of file noisydofmover.h.
|
staticprotected |
Definition at line 65 of file noisydofmover.h.
|
staticprotected |
Definition at line 66 of file noisydofmover.h.
|
staticprotected |
Definition at line 68 of file noisydofmover.h.
|
staticprotected |
Definition at line 67 of file noisydofmover.h.
|
staticprotected |
Definition at line 69 of file noisydofmover.h.
|
protected |
Movement range from overshoot position to goal position.
Definition at line 111 of file noisydofmover.h.
|
protected |
Definition at line 114 of file noisydofmover.h.
|
protected |
Definition at line 113 of file noisydofmover.h.
|
protected |
Amplitude of next noise peek.
Definition at line 86 of file noisydofmover.h.
|
protected |
Time for next noise peek.
Definition at line 80 of file noisydofmover.h.
|
protected |
Noise amplitude (noise level)
Definition at line 72 of file noisydofmover.h.
|
protected |
Noise wave length.
Time space between randoms in DOF's normalized time.
Definition at line 77 of file noisydofmover.h.
|
protected |
how much to miss the DOF target position
The offset is a controlled error that makes the position of a DOF go from zero to target+offset, aiding the creation of a sense of weight for natural movements.
Definition at line 95 of file noisydofmover.h.
|
protected |
how much to pass the DOF target position before correction
The overshoot is a controlled error that makes the position of a DOF pass the desired target position and then fall back to the desired value. This may help creating an effect associated with inertia.
Definition at line 102 of file noisydofmover.h.
|
protected |
Definition at line 112 of file noisydofmover.h.
|
protected |
Movement range from intial position to overshoot position.
Definition at line 109 of file noisydofmover.h.
|
protected |
Overshoot time.
Peak time is the (normalized) time of maximum overshoot error.
Definition at line 107 of file noisydofmover.h.
|
protected |
Amplitude of previous noise peek.
Definition at line 89 of file noisydofmover.h.
|
protected |
Time of previous noise peek.
Definition at line 83 of file noisydofmover.h.