V-ART
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Friends | List of all members
VART::NoisyDofMover Class Reference

Noisy Controller for DOF movement. More...

#include <noisydofmover.h>

Inheritance diagram for VART::NoisyDofMover:
VART::DofMover

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 DofGetTarget ()
 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...
 
DoftargetDofPtr
 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 InterpolatorinterpolatorPtr = 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
 

Detailed Description

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.

Constructor & Destructor Documentation

VART::NoisyDofMover::NoisyDofMover ( )
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.

Member Function Documentation

void VART::NoisyDofMover::Initialize ( float  iniTime,
float  finTime,
float  finPos 
)
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().

void VART::NoisyDofMover::Move ( )
protectedvirtual

Changes target DOF.

Reimplemented from VART::DofMover.

Definition at line 77 of file noisydofmover.cpp.

float VART::NoisyDofMover::Noise ( )
protected

Generates and returns corehent noise.

Definition at line 142 of file noisydofmover.cpp.

References VART::SineInterpolator::GetValue().

float VART::NoisyDofMover::PositionalError ( )
protected

Generates and returns positional error.

Computes overshoot and offset for producing positional error.

float VART::NoisyDofMover::Random ( )
protected

Generates and returns a pseudo-random number within internal noise amplitude.

Definition at line 188 of file noisydofmover.cpp.

void VART::NoisyDofMover::SetDefaultNoiseAmplitude ( float  value)
static

Definition at line 193 of file noisydofmover.cpp.

void VART::NoisyDofMover::SetDefaultNoiseWaveLenght ( float  value)
static

Definition at line 198 of file noisydofmover.cpp.

void VART::NoisyDofMover::SetDefaultOffset ( float  value)
static

Definition at line 208 of file noisydofmover.cpp.

void VART::NoisyDofMover::SetDefaultOvershoot ( float  value)
static

Definition at line 203 of file noisydofmover.cpp.

void VART::NoisyDofMover::SetDefaultPeakTime ( float  value)
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.

Friends And Related Function Documentation

friend class Action
friend

Definition at line 19 of file noisydofmover.h.

friend class JointMover
friend

Definition at line 18 of file noisydofmover.h.

Member Data Documentation

float VART::NoisyDofMover::defaultNoiseAmplitude = 0.0f
staticprotected

Definition at line 65 of file noisydofmover.h.

float VART::NoisyDofMover::defaultNoiseWaveLenght = 1.01f
staticprotected

Definition at line 66 of file noisydofmover.h.

float VART::NoisyDofMover::defaultOffset = 0.0f
staticprotected

Definition at line 68 of file noisydofmover.h.

float VART::NoisyDofMover::defaultOvershoot = 0.0f
staticprotected

Definition at line 67 of file noisydofmover.h.

float VART::NoisyDofMover::defaultPeakTime = 0.9f
staticprotected

Definition at line 69 of file noisydofmover.h.

float VART::NoisyDofMover::finalRange
protected

Movement range from overshoot position to goal position.

Definition at line 111 of file noisydofmover.h.

bool VART::NoisyDofMover::hasNoise
protected

Definition at line 114 of file noisydofmover.h.

bool VART::NoisyDofMover::hasOvershoot
protected

Definition at line 113 of file noisydofmover.h.

float VART::NoisyDofMover::nextSubGoalPosition
protected

Amplitude of next noise peek.

Definition at line 86 of file noisydofmover.h.

float VART::NoisyDofMover::nextSubGoalTime
protected

Time for next noise peek.

Definition at line 80 of file noisydofmover.h.

float VART::NoisyDofMover::noiseAmplitude
protected

Noise amplitude (noise level)

Definition at line 72 of file noisydofmover.h.

float VART::NoisyDofMover::noiseWaveLenght
protected

Noise wave length.

Time space between randoms in DOF's normalized time.

Definition at line 77 of file noisydofmover.h.

float VART::NoisyDofMover::offset
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.

float VART::NoisyDofMover::overshoot
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.

float VART::NoisyDofMover::overshootPosition
protected

Definition at line 112 of file noisydofmover.h.

float VART::NoisyDofMover::overshootRange
protected

Movement range from intial position to overshoot position.

Definition at line 109 of file noisydofmover.h.

float VART::NoisyDofMover::peakTime
protected

Overshoot time.

Peak time is the (normalized) time of maximum overshoot error.

Definition at line 107 of file noisydofmover.h.

float VART::NoisyDofMover::previousSubGoalPosition
protected

Amplitude of previous noise peek.

Definition at line 89 of file noisydofmover.h.

float VART::NoisyDofMover::previousSubGoalTime
protected

Time of previous noise peek.

Definition at line 83 of file noisydofmover.h.


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