Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
control_toolbox::Dither Class Reference

Gives white noise at specified amplitude. More...

#include <dither.h>

Public Member Functions

 Dither ()
 
bool init (const double &amplitude, const double &seed)
 
double update ()
 Get next Gaussian white noise point. Called in RT loop. More...
 
 ~Dither ()
 Destructor. More...
 

Static Public Member Functions

static double generateRandomSeed ()
 

Private Attributes

double amplitude_
 
std::mt19937 generator_
 
bool has_saved_value_
 
double s_
 
double saved_value_
 
double x_
 

Detailed Description

Gives white noise at specified amplitude.

This class gives white noise at the given amplitude when update() is called. It can be used to vibrate joints or to break static friction.

Definition at line 58 of file dither.h.

Constructor & Destructor Documentation

◆ Dither()

control_toolbox::Dither::Dither ( )

Definition at line 43 of file dither.cpp.

◆ ~Dither()

control_toolbox::Dither::~Dither ( )

Destructor.

Definition at line 48 of file dither.cpp.

Member Function Documentation

◆ generateRandomSeed()

static double control_toolbox::Dither::generateRandomSeed ( )
inlinestatic

Definition at line 100 of file dither.h.

◆ init()

bool control_toolbox::Dither::init ( const double &  amplitude,
const double &  seed 
)
inline

Definition at line 81 of file dither.h.

◆ update()

double control_toolbox::Dither::update ( )

Get next Gaussian white noise point. Called in RT loop.

Returns
White noise of given amplitude.

Definition at line 52 of file dither.cpp.

Member Data Documentation

◆ amplitude_

double control_toolbox::Dither::amplitude_
private

Amplitude of the sweep.

Definition at line 108 of file dither.h.

◆ generator_

std::mt19937 control_toolbox::Dither::generator_
private

random number generator for white noise.

Definition at line 113 of file dither.h.

◆ has_saved_value_

bool control_toolbox::Dither::has_saved_value_
private

Definition at line 110 of file dither.h.

◆ s_

double control_toolbox::Dither::s_
private

Definition at line 111 of file dither.h.

◆ saved_value_

double control_toolbox::Dither::saved_value_
private

Definition at line 109 of file dither.h.

◆ x_

double control_toolbox::Dither::x_
private

Definition at line 112 of file dither.h.


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


control_toolbox
Author(s): Melonee Wise, Sachin Chitta, John Hsu
autogenerated on Wed May 11 2022 02:11:48